If present and truthy, it will cause the output
to contain two extra fields: missing_raw and
missing_final, each consisting of a JSON array
containing missing raw and final shots for the
corresponding sequence.
In the event that the option was passed but
there are no missing shots, the two aforementioned
fields will still be present and consist of
empty arrays.
Note that this makes the query significantly
slower.
We do this so that we can look for the "saillineOffset"
parameter, which we expect to be present in source
preplot imports and allows us to correlate source
and sail lines.
The change to bin/sps.py is necessary to let the JSON
serialisation take place.
Doing otherwise will result in the gun data file
appearing has having been read, but no data will
have been saved as there was nowhere to save to.
Fixes#29.
Each of the save_* operations starts a transaction
(which is automatically commited if all goes well).
The main reason for this is to ensure that by the
time raw_lines and final_lines events fire, the
corresponding entries in raw_shots and final_shots
have already been populated.
When final shots are inserted, updated or
deleted, the corresponding QC info (which
is always held in raw_shots.meta->'qc')
is deleted.
If applicable, it will be recreated on the
next QC run.
Not sure if this is going to do anything in
terms of improving the handling of and reacting
to events, but it doesn't seem to hurt terribly.
Eventually, all this will probably need to be
refactored to use EventEmitter.
When inserting or updating a timed event, a trigger
searches the real time events table for a position
close (within one minute) of the event time and
adds it to the event's metadata.
It shows a graphical representation of the
acquisition status of a preplot line, as
stacked bars where each bar represents the
acquisition extent of a sequence. This is
complemented by colour denoting the raw/final/
ntbp status of the sequence and by a tooltip
with the same information. Sequence bars may be
made clickable by providing a function to the
"sequence-href" property; this function should
take a sequence object and return a URL.
We try to ensure that for each sequence we have
at least FSP and LSP entries. We do this by:
* If there exists a FGSP / LGSP, we clone those as
FSP / LSP respectively.
* Otherwise, we take the first and last shots
found in the final P1 which have a preplot.
We also include log comments whenever possible and
format the azimuth a bit better.
On the backend, the events endpoint caches responses
by ETag in order to reduce the load on the database
and response times. That cache is supposed to be
invalidated with the middleware receives a notification
that the underlying data has changed. However, that
change might arrive just *after* the HTTP request,
meaning that if we let the browser do its thing we
will probably be returning stale data.
So what we do is we explicitly request a non-cached
response when we know that something has changed
because we changed it ourselves.
What we do not do is bypass the cache if we receive
a change event notification, as we assume that the
HTTP roundtrip will be more than sufficient for
the server to have invalidated (and perhaps even
refreshed) its response.
If the nav header is being received, this will
try to detect the start and end of line and create
an entry in the log.
It doesn't check whether FSP/FGSP LSP/LGSP entries
already do exist for that sequence.
Closes # 28.
If a QC has failed in the past there will be a
record of it in raw_lines, raw_shots or preplot_points.
If that QC then stopped failing, e.g., because of a
change of parameters, then the QC results would correctly
reflect the change but not the line/shot tables and
hence, the event log.
This commit hopefully takes care of that.