NAME
BQTraceview - BRTT Qt graphics extension for drawing waveform traces and editing arrivals
SYNOPSIS
$(QTNATIVELIBS) -lbqplot_native -lbanner -lbrttutil -lbumapdata $(DBLIBS) $(TRLIBS)
#include "BQ.h"
DESCRIPTION
BQTraceview objects are used to display seismic waveform traces, arrival flags, detections,
predicted arrivals, seismic event associations and residuals.
As well,
BQTraceview objects support interactive editing of seismic arrivals. This class is meant
to provide the same functionality as
dbpick(1) but in a Qt-based c++ class object that can be used
in a variety of application programs. In addition this class provides much advanced functionality when
compared to
dbpick(1) and will provide a basis for other more advanced display and editing capabilities
in the future.
An attempt has been made to make BQTraceview objects to behave as much like dbpick(1) as
is reasonably possible. Most of the trace display interaction has been preserved. Arrival editing interaction has
also been preserved as much as reasonably possible. In addition many new capabilities and interactions have been
introduced. In particular, the user typein interface from dbpick(1) and the ability to send commands
through the typein interface have been preserved and enhanced using the BQCommandConsole(3) class along with
a helper BQTraceviewCommands class.
The BQTraceview class has been designed to eventually provide waveform display functionality for a variety
of input data sources, including databases and real-time ORB data sources. In this first implementation only
database sources are supported. Database sources are supported through the use of EV(3) server and class
objects. This provides the capability to display and edit dynamically changing data in a completely safe manner.
This class inherits the BQConfigure class which is itself a subclass of the BUConfigure class
with extensions to process Qt colors and fonts. The configure methods are implemented
in the BUConfigure parent (see BUConfigure(3)).
DISPLAY COMPONENTS AND LAYOUT
The
BQTraceview object display looks similar to the
dbpick(1) display. Seismic waveforms are drawn
horizontally and are arranged vertically for the individual channels. Each
BQTraceview object is a
proper
BQViewport(3) item and requires the
BQViewport object in its constructor. The
horizontal X-axis is time and the parent
BQViewport is automatically configured so that its
xmode
configuration parameter is set to
time (see
BQViewport(3)). The parent viewport's margins are also
set automatically. All of the parent viewport's
xleft,
xright,
ybottom and
ytop world
coordinate scales are all slaved to the
BQTraceview object and should not be set by the calling
program.
A simple non-dimensional Y-axis scaling is implemented internally to draw the waveform traces. This Y-axis
variable ranges from 0.0 for the bottom of the display to 1.0 for the top of the display. Each
waveform trace is automatically scaled to fit within this 0.0 to 1.0 range in a manner that
determines its vertical position in the display. Once the waveform sample values have been transformed into
the non-dimensional Y-axis scaling, then the normal viewport-based plot rendering is performed. Zooming and
panning of the display in the vertical direction is done by setting the parent viewport ybottom
and ytop world coordinate scales, all done automatically. In addition a vertical scrollbar has been added
to the display for control of Y-axis panning. Trace labels are automatically generated and displayed along
with amplitude units strings and scales which are displayed if there is enough vertical space, similar
to dbpick(1).
Arrival flags, detections, predicted arrivals and residual bars are all implemented using BQPolypoint(3)
glyph objects. Each of these glyphs are automatically scaled and displayed within the parent viewport and
should not be manipulated by the calling program. There are copious display configuration parameters, set
through the standard configure methods and parameters defined below, relating to component colors, linewidths,
the various display modes and other parameters. There are status display lines, implemented as BQText(3)
objects, to show the current mouse cursor coordinates, arrival information and event information. The mouse cursor
is implemented with a set of crosshairs that can be used to determine feature alignment in both time and amplitude.
When the data source is coming from an EVServer object, the BQTraceview object can display
detailed event information through the various glyphs and through the status display lines. A particular origin
of a particular event can be put into a selected state, in which case the associated arrival glyphs are
color coded according to their associations within the database.
There are two basic display modes; "normal" mode and "edit" mode. In normal display mode, interaction allows
time-axis panning and zooming, trace-axis panning and zooming, selection and ordering of traces to display,
waveform filtering, selection of events and origins, P-alignment, automatic trace selection based on existence
of arrivals and/or detections, waveform amplitude scaling and units to display and other configure options
such as show/hide of arrivals, detections and predicted arrivals. However, in normal display
mode all arrival editing is disabled. In edit mode certain of the display mouse interactions are usurped from
the normal mode to be used for arrival editing. All interactive arrival editing must be done in edit mode. Many
of the configuration parameters, such as colors, can be specified with mode-dependent values. For instance
the basic background and foreground colors can be (and usually are) different for normal and edit display modes.
In edit mode arrivals can be "tagged" as being defining or non-defining to specify the associations for a new
location to be determined.
An optional taskbar, implemented with BQTaskbar(3), can be specified and assigned to either the BQTraceview
object's parent viewport or to any other programmer defined viewport. This taskbar is configured through
the BQTraceview object configuration parameters defined below. This taskbar has been enhanced so that its
actions can be to send BQTraceview commands as defined below.
INDIVIDUAL TRACE REPRESENTATION
Each individual trace in a
BQTraceview object is represented as a
BQTrace(3) object.
The
BQTrace class is a helper class and its objects currently can only be used from within
BQTraceview
objects.
BQTrace objects are created automatically by
BQTraceview objects as needed. Each of
the
BQTrace object pointers can be determined through several methods described below. These single
trace object pointers can then be used to execute public methods described in
BQTrace(3).
Each trace within the BQTraceview display is assigned a trace label when it is created. This trace label
is displayed to the left of the trace. For database data sources, the trace label is in the
form <sta> <chan>[;<copy>], where <sta> and <chan> are the
CSS sta and chan codes and <copy> is an optional copy number. Individual traces
within a BQTraceview object can be duplicated as many times as desired. A duplicated trace will
have an ordinal <copy> number starting with 1 for the first copy. The original trace is
assigned a copy numbr of 0. The automatically
generated trace labels will only show the <copy> numbers for numbers >= 1. The trace labels can be
used to determine individual BQTrace object pointers, as described below, which can then
be used to set different parameters for individual traces. For instance, a trace can be duplicated n times
and each of the duplicated traces can be assigned different filters.
TRACE EXPRESSIONS
A trace expression language has been developed to allow the programmer and user to specify an ordered
set of traces to be subject to various actions. Ordering traces in the display is the simplest
of these actions. A trace expression is of the
form
<expression1>[,<expression2>[,<expression3>[,...]]], where
each of the
<expressionN> strings is of the
form
<sta_expr>[:<chan_expr>[;<copy_expr>]]. Each trace is compared against
the expressions in the comma separated list. If a trace satisfies one of the expressions in the comma separated list,
then that trace is given an order number based on its position in the comma separated list. Each of the expressions
in the comma separated list are evaluated against each trace in the
BQTraceview object as follows. The
CSS
sta code is compared against
<sta_expr> which can be
*, matching all
sta codes,
or a normal datascope-style expression to match against
sta. The trace continues to match against
the optional
<chan_expr> and
<copy_expr> strings. If these expressions are not specified, then
all channels and all copies will match. A single
* character will also match all channels or copies.
Trace matches with the same order number from the original comma separated list are ordered alphabetically
according to their trace labels. Note that if only original traces are desired, then the
<copy_expr>
should be specified and set to
0. For instance, an expression that matches all stations and channels
but only for the original traces would be
*:*;0. As another example, the expression that would
produce an ordered list of traces in which all of the
Z components were first followed by all of the
N
components then all of the
E components would be
*:..Z.*,*:..N.*,*:..E.*. Note that with this
expression all copies match as well.
INTERACTIONS WITH DATA SOURCES
For database data sources from
EVServer and
EVClient, notifications of
BQTraceview
objects are made by
EVServer objects through the
EVClient::responseCallback and
the
EVClient::checkDatabaseCallback methods defined in a special
EVClient sub-class (see
EV(3))
that gets automatically created whenever the
EVServer version of
BQTraceview::createTraces is
called (see below).
BQTraceview objects respond to these notifications by immediately updating the display.
This provides a mechanism for spontaneous dynamic display updates due to changing databases.
In order for spontaneous dynamic display updates to be realized, the application programmer must
arrange for the
EVServer object to be updated through calls to
EVServer::autoRefreshEvents,
for automatic periodic refreshes of the event-oriented tables, or
EVServer::autoCheckDatabase,
for automatic periodic refreshes of the non-event-oriented tables, such as the
wfdisc table.
Alternatively the application programmer can control exactly when
EVServer refreshes are done,
or not done, through calls to
EVServer::refreshEvents,
EVClient::refreshEvents,
EVClient::refreshEventsForce and
EVClient::checkDatabase.
GRAPHICAL USER INTERACTION
Other than direct user typein interaction through the attached command console,
there are various user graphical interfaces that are configured at run time
through
OBJECT CONFIGURATION PARAMETERS defined below. These configurable
interactions include hotkeys, popup arrival menus and taskbar buttons, all defined below.
Most mouse interactions are currently hardwired and are meant to mimic the dbpick(1) mouse
interactions as much as possible. In particular, single arrival editing by a single click on an arrival flag
without previously selecting that arrival, as it is in dbpick(1) is supported.
There are differences between some of the mouse interactions
when the main display is in edit mode relative to when it is not in edit mode. Following is a list
of mouse interactions in normal, non-edit, mode.
There is a confusion factor that is caused by the Qt graphics engine relating to various keyboard
keys used in the graphical user interface. On Apple systems running MacOS, key modifier combinations
are internally mapped so that a Control modifier is actually mapped to the Apple Command
keyboard key, an Alt modifier is mapped to the Apple Option keyboard key and a Meta
modifier is mapped to the Apple Control key. This mapping is done automatically by the Qt engine
for Apple systems running MacOS. For Linux systems, the Control modifier uses the Control
keyboard key, the Alt modifier uses the Alt keyboard key (the Option keyboard
key on an Apple keyboard) and the Meta modifier uses the Meta keyboard key (the Command keyboard
key on an Apple keyboard.
The Trace Display Region is the area, excluding the arrival flags, where the
traces are displayed. Within this region, while in non-edit mode, the mouse acts as follows:
-
Left-Click
The left mouse button causes the traces to be time
scrolled to the left so that the mouse position is shifted to the left
edge of the screen.
-
Middle-Drag
Dragging the middle mouse button causes the traces to follow the movement
of the mouse in time.
-
Right-Click
The right mouse button causes the traces to be time
scrolled to the right so that the mouse position is shifted to the right
edge of the screen.
-
Shift-Left-Click
Holding the SHIFT key while clicking the left mouse button causes a sequence
to be initiated that controls expansion (or zoom-in) of the time scale.
After the initial mouse Shift-Left-Click, a rubberband box will track the
mouse cursor until one of the three mouse buttons is clicked again. If the
left or right button is clicked, then the time scale expands so that the delineated
rubberband box fills the new display window. If the middle mouse button is clicked, then the zoom-in
action is aborted.
-
Shift-Right-Click
Holding the SHIFT key while clicking the right mouse button causes a sequence
to be initiated that controls contraction (or zoom-out) of the time scale.
After the initial mouse Shift-Right-Click, a rubberband box will track the
mouse cursor until one of the three mouse buttons is clicked again. If the
left or right button is clicked, then the time scale contracts so that the
current display time window maps to the delineated
rubberband box in the new window. If the middle mouse button is clicked, then the zoom-out
action is aborted.
-
Control-Middle-Drag
Holding the Control key while dragging the middle mouse button causes the traces to follow the movement
of the mouse in the Y-axis traces direction.
Note that the Control modifier key under MacOS is mapped to the Command key (i.e. you need to
press the Command key on the mac keyboard to get the Control modifier behavior).
Under linux, the Control modifier key behavior is implemented with the normal Control
keyboard key.
-
Control-Left-Click
Holding the Control key while clicking the left mouse button causes a sequence
to be initiated that controls expansion (or zoom-in) of the Y-axis traces scale.
Note that the Control modifier key under MacOS is mapped to the Command key (i.e. you need to
press the Command key on the mac keyboard to get the Control modifier behavior).
Under linux, the Control modifier key behavior is implemented with the normal Control
keyboard key.
After the initial mouse Control-Left-Click, a rubberband box will track the
mouse cursor until one of the three mouse buttons is clicked again. If the
left or right button is clicked, then the traces scale expands so that the delineated
rubberband box fills the new display window. If the middle mouse button is clicked, then the zoom-in
action is aborted.
-
Control-Right-Click
Holding the Control key while clicking the left mouse button causes a sequence
to be initiated that controls contraction (or zoom-out) of the Y-axis traces scale.
Note that the Control modifier key under MacOS is mapped to the Command key (i.e. you need to
press the Command key on the mac keyboard to get the Control modifier behavior).
Under linux, the Control modifier key behavior is implemented with the normal Control
keyboard key.
After the initial mouse Control-Left-Click, a rubberband box will track the
mouse cursor until one of the three mouse buttons is clicked again. If the
left or right button is clicked, then the traces scale contracts so that the
current display traces window maps to the delineated
rubberband box in the new window. If the middle mouse button is clicked, then the zoom-out
action is aborted.
-
Shift-Middle-Drag
Holding the SHIFT key while dragging the middle mouse button causes the traces to follow the movement
of the mouse in the both the time and Y-axis traces directions.
-
Alt-Left-Click
Holding the Alt key while clicking the left mouse button causes a sequence
to be initiated that controls expansion (or zoom-in) of both the time and the Y-axis traces scales.
Note that the Alt modifier key under MacOS is mapped to the Option key (i.e. you need to
press the Option key on the mac keyboard to get the Alt modifier behavior).
Under linux, the Alt modifier key behavior is implemented with the normal Alt
keyboard key or the Option key on an Apple keyboard.
After the initial mouse Alt-Left-Click, a rubberband box will track the
mouse cursor until one of the three mouse buttons is clicked again. If the
left or right button is clicked, then the time and traces scales expand so that the delineated
rubberband box fills the new display window. If the middle mouse button is clicked, then the zoom-in
action is aborted.
-
Alt-Right-Click
Holding the Alt key while clicking the left mouse button causes a sequence
to be initiated that controls contraction (or zoom-out) of the time and Y-axis traces scales.
Note that the Alt modifier key under MacOS is mapped to the Option key (i.e. you need to
press the Option key on the mac keyboard to get the Alt modifier behavior).
Under linux, the Alt modifier key behavior is implemented with the normal Alt
keyboard key or the Option key on an Apple keyboard.
After the initial mouse Alt-Left-Click, a rubberband box will track the
mouse cursor until one of the three mouse buttons is clicked again. If the
left or right button is clicked, then the time and traces scales contract so that the
current display traces window maps to the delineated
rubberband box in the new window. If the middle mouse button is clicked, then the zoom-out
action is aborted.
-
Wheel
Mouse wheel events, including trackpad gestures, will cause panning in both the time
and Y-axis traces directions. Note that Wheel event interaction is only enabled
when the use_wheel configuration parameter has been set (see OBJECT CONFIGURATION PARAMETERS
below).
Following is a list of mouse interactions when the display is in edit mode.
-
Left-Click
If the internal add arrivals mode has been set through a call to setAddArrivalsMode method
or a arrivals add_mode command, defined below, then a Left-Click will add
a new arrival at the mouse cursor position.
If the internal add arrivals mode is not set and the cursor is within an arrival flag,
then this initiates a time edit of either a single arrival or all of the selected arrivals.
If the internal add arrivals mode is not set and the cursor is not within an arrival flag, then
this initiates an arrival selection rubberband box. Any previous arrival selections are first cleared.
Note that this usurps the non-edit mode Left-Click behavior.
-
Shift-Left-Click
If the cursor is within an arrival flag,
then this initiates a deltim (time uncertainty) edit of either a single arrival or all of the selected arrivals
and this usurps the non-edit mode Shift-Left-Click behavior.
If the cursor is not within an arrival flag, then the non-edit mode Shift-Left-Click behavior is preserved.
-
Control-Left-Click
If the cursor is not within an arrival flag, then
this initiates an arrival selection rubberband box. This appends arrival selections to the current
arrivals selection list.
Note that the Control modifier key under MacOS is mapped to the Command key (i.e. you need to
press the Command key on the mac keyboard to get the Control modifier behavior).
Under linux, the Control modifier key behavior is implemented with the normal Control
keyboard key.
Note that this usurps the non-edit mode Control-Left-Click behavior.
-
Left-Drag
If the initial Left-Click was within an arrival flag, then this will continue the arrival time edits until the
left mouse button is released.
If the initial Left-Click was not within an arrival flag, then this will continue modifying the
rubberband box and the selection of arrivals within the box until the left mouse button is released.
-
Shift-Left-Drag
If the initial Shift-Left-Click was within an arrival flag, then this will continue the arrival deltim (time
uncertainty edits until the left mouse button is released.
-
Control-Left-Drag
If the initial Control-Left-Click was not within an arrival flag, then this will continue modifying the
rubberband box and the selection of arrivals within the box until the left mouse button is released.
Note that the Control modifier key under MacOS is mapped to the Command key (i.e. you need to
press the Command key on the mac keyboard to get the Control modifier behavior).
Under linux, the Control modifier key behavior is implemented with the normal Control
keyboard key.
-
Right-Click
If the internal add arrivals mode has been set through a call to setAddArrivalsMode method
or a arrivals add_mode command, defined below, then a Right-Click will clear
the internal add arrivals mode and stop the creation of new arrivals.
If the internal add arrivals mode is not set and the cursor is within an arrival flag,
then this will normally cause a popup menu to appear, as defined by the arrivals_menus
parameter defined in OBJECT CONFIGURATION PARAMETERS below.
If the internal add arrivals mode is not set and the cursor is not within an arrival flag,
then this first clears all arrival selections and then
initiates an arrival selection rubberband box.
Note that this usurps the non-edit mode Right-Click behavior.
-
Right-Drag
If the initial Right-Click was within an arrival flag, then popup menu, if any, interaction
is processed.
If the initial Right-Click was not within an arrival flag, then this will continue modifying the
rubberband box and the selection of arrivals within the box until the right mouse button is released.
The Trace Label Region is the area to the left of the traces where the
trace labels and amplitude annotations are displayed. Within this region the
mouse acts as follows:
-
Left-Click or Left-Drag
Pressing and/or dragging the left mouse button in this region causes the specified traces
to be selected/unselected.
-
Right-Click
Holding down the right mouse button shows a popup menu. This menu contains an item order selected traces,
which will show and order the traces according to the current traces selection,
and an item zoom selected traces, which will maintain the current trace ordering but will zoom
the display in the Y-axis direction so that topmost trace in the selected list is at the top
of the display and the bottommost trace in the selected list is at the bottom of the display.
EDIT QUEUE
Whenever arrivals are edited, a record of that edit is kept in an internal edit queue. The edit queue
is a single threaded history of arrival edits made during the running of a
BQTraceview object.
If a set of arrivals are edited, then the edit queue treats those together as a single edit.
Arrival edits can be rolled back to previous states using the
arrivals edit_queue undo command described below.
Arrival edits can then be redone using the
arrivals edit_queue redo command described below.
Note that the edit queue is single threaded. This means that if edits are undone and then a new edit is made, then
the edit queue history from that new edit is erased.
An arrival edit state can be set using the arrivals edit_queue setstate command described below.
When a state has been set, it is possible to roll back/forward arrival edits to that state
using the arrivals edit_queue setstate command described below.
INHERITS FROM
BQViewportItem,
BQConfigure
CONSTRUCTOR
BQTraceview(BQViewport *master, BQCommandConsole *cc=NULL, int make_taskbar=1, BQViewport *vptaskbar=NULL);
Where master is the BQViewport master for this object. An interactive user typein interface is
provided through the cc pointer to a previously assigned BQCommandConsole(3) object.
A BQCommandConsole object can be assigned later using the setCommandConsole method defined below.
An optional BQTaskbar(3) object, enhanced to support commands through the BQTaskview command
interface defined below, will be created if make_taskbar is specified as non-zero. If make_taskbar
is non-zero, then if vptaskbar is non-NULL, then the taskbar is assigned to that viewport. Otherwise the
taskbar is assigned to the master viewport.
METHODS INHERITED FROM BQConfigure
-
void configure (Pf *params);
An Antelope parameter file object pointer that contains the BQTraceview object
parameters. The parameters are described below.
-
void configure (...);
A variable argument list composed entirely of character string key-value pairs with
a single NULL terminating argument. This is an alternate method for specifying
the BQTraceview object parameters. The parameters are described below.
METHODS INHERITED FROM BQViewportItem
-
void setLayer (QString name);
This will cause the BQTraceview object to be put into the BQLayer object buffer with name name (see BQLayer(3)).
The BQLayer object will automatically be created if an object with name name does not exist.
-
void showItem();
-
void hideItem();
These will cause the polyline object to be shown (displayed) or hidden (not displayed).
BQTraceview METHODS
-
void createTraces (EVServer *evserver, QString stachan_accept=QString());
This will create a set of seismic waveform traces from the database being served by EVServer
object evserver. A new EVCLient object is automatically created (see EV(3)). Only
traces that match stachan_accept will be processed. If stachan_accept is empty, then all
stations and channels will be processed. The format of stachan_accept is a station expression
followed by a whitespace separated channel expression.
-
EVClient *getEVClient (QString dbname=QString());
This will return the EVClient object pointer of the EVClient object used by BQTraceview
for managing data through EVServer objects. The database name is specified by dbname.
If dbname is empty, then the most currently used EVClient object pointer is
returned. A NULL
return means there is no EVClient object for the database with name dbname.
-
void setCommandConsole (BQCommandConsole *cc);
This will set the typein command console to cc.
-
int sendCommand (QString command, QString *output=NULL, int send_to_cc=1, int nofeedback=-1);
This causes a BQTraceview command, specified by the string command, to be sent to the object
where it is then executed. If output is non-NULL, then any string output or error messages generated by the
command will be deposited in *output. If the flag send_to_cc is set, then the command is echoed through
the attached BQCommandConsole is if it were typed. The nofeedback argument is an advanced argument
used to control command feedback. If it is set to < 0, then it is ignored in this call. Otherwise
the BQTraceview internal nofeedback variable is set to nofeedback. See the callback
virtual method below for a description of how nofeedback is used. This method returns -1 if an
error has occurred and will return a string error message in *output. BQTraceview commands
are described in the COMMANDS section.
-
int importCommands (QString file_name);
This will open a file with name file_name for reading, read each line in the file and send each line to
the BQTraceview command processor with calls to sendCommand with the send_to_cc
argument set to 1. This method returns -1 if an error opening or reading the file occurs.
-
int exportCommands (QString file_name);
This will open a file with name file_name for writing and dump the contents of the attached BQCommandConsole
stored command queue into the file. This method returns -1 if an error opening or writing the file occurs.
-
void refresh (int traces=0);
This forces the display to be refreshed which involves redrawing of all of the object components.
If the traces flag is set, then in addition all of the trace waveforms are re-read, re-filtered,
re-pixelated and redrawn. Display refreshing is normally automatically done within the class code.
-
int duplicateTrace (QString &trace_label);
This will cause the trace with label trace_label to be duplicated. The new duplicated trace
label with the copy number will be returned in trace_label. A return value of -1
indicates an error.
-
BQTrace *getTrace (int trace_index_original);
This will return the BQTrace object corresponding to index trace_index_original
or a NULL pointer if the index is out of range. Note that the index is an index
into the original unsorted list of traces.
-
BQTrace *getTrace (QString trace_label);
This will return the BQTrace object with the trace label trace_label
or a NULL pointer if there is no trace with that trace label.
-
BQTrace *getTrace (double yviewport, int *trace_index=NULL);
This will return the BQTrace object corresponding to the non-dimensional Y-axis
value yviewport
or a NULL pointer if the yviewport is out of range. If trace_index is non-NULL,
then the sorted trace index is returned in *trace_index.
-
int resolveTracesExpressions (QString expressions, int copyok, QList<BQTrace *> &traces);
This will evaluate all of the original traces against the comma separated list of expressions,
specified by expressions, and return a an ordered list of BQTrace objects that
match expressions. The syntax of the expressions is defined previously in
the section TRACE EXPRESSIONS. If the copyok flag is not set, then only original traces
will be returned in the list regardless of the expressions. A return value of -1
indicates an error. This is the method used to determine lists of trace objects for further
actions.
-
int setPreserveTimeScaleOnResize (QString answer);
This will set the display behavior in the X-axis time direction when the display is resized.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
When this is set to yes, then the pixels per second time scale is preserved when the display is
resized keeping the time at the left of the display unchanged. If this is set to no, then the
left and right edge time values are preserved during resizes. Note that the behavior of dbpick(1)
corresponds to the no value.
-
int setPreserveTracesScaleOnResize (QString answer);
This will set the display behavior in the Y-axis traces direction when the display is resized.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
When this is set to yes, then the pixels per non-dimensional Y-axis trace value scale is preserved when the
display is resized keeping the value at the top of the display unchanged. If this is set to no, then the
top and bottom edge Y-axis values are preserved during resizes. Note that the behavior of dbpick(1)
corresponds to the no value.
-
int setEditMode (QString answer);
This enables or disables the display edit mode as described previously.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
A return value of -1 indicates an error. A return of 0 indicates the mode did not change.
A return of 1 indicates the mode was changed.
-
void setTimeWindow (double tstart=BQ_TIME_NULL, double twin=BQ_TIME_NULL);
This will set the display time window to tstart start time at the left of the display and twin
time duration. Times are double precision epoch times. If tstart is set to BQ_TIME_NULL, then
the start time will remain unchanged. If twin is set to BQ_TIME_NULL, then
the time duration will remain unchanged.
-
void panX (double tstart);
This will pan the display in time so that the double epoch time tstart is at the left edge of the display.
The display time duration is unchanged.
-
void zoomX (double tstart, double tend);
This will zoom in or out the display in time so that the double epoch time tstart is at the left edge of the display
and the double epoch time tend is at the right edge of the display.
-
void panY (double ytop);
This will pan the display in the vertical traces direction so that the non-dimensional Y-axis
value ytop is at the top edge of the display. If ytop is > 1.0, then ytop
is reset to 1.0. The range of the trace display is preserved. If ytop minus the current range
of the display is < 0.0, then ytop is reset to a value such that the range is
preserved and the bottom of the display is 0.0.
-
void panY (BQTrace *trace);
This will pan the display in the vertical traces direction so that the trace specified by trace
is at the top edge of the display. As with the ytop version of panY, the range of the display is preserved
which can cause the topmost trace to be different from trace.
-
void panY (int itrace);
This will pan the display in the vertical traces direction so that the trace index itrace
is at the top edge of the display. The trace index itrace refers to the ordinal position, starting with 0,
from the top to the bottom so that itrace of 0 refers to the topmost trace.
As with the ytop version of panY, the range of the display is preserved
which can cause the trace at the top of the display to be different from itrace.
-
void zoomY (double yref, double factor);
This will zoom the display in the vertical traces direction so that the non-dimensional
Y-axis value yref will occupy the same vertical position after the zoom. The
Y-axis range will be multiplied by factor, so that factor < 1.0 will
result in a zoom in and factor > 1.0 will result in a zoom out.
-
void zoomY (BQTrace *trace_top, BQTrace *trace_bottom);
This will zoom the display in the vertical traces direction so that the trace trace_top
will be at the top of the display and the trace trace_bottom will be at the
bottom of the display.
-
void zoomY (int ifirst, int number);
This will zoom the display in the vertical traces direction so that the trace index itrace
will be at the top of the display and the range will be set to number.
-
void zoomY2 (double ytop, double ybottom);
This will zoom the display in the vertical traces direction so that the non-dimensional
Y-axis scale of the top of the display will be set to ytop and the non-dimensional
Y-axis scale of the bottom of the display will be set to ybottom.
-
int setShowTracesWithArrivals (QString answer);
This sets or unsets automatically showing only traces that have arrivals within the current display time window.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
This behavior is dynamic with any change of the display time window.
-
int setShowTracesWithDetections (QString answer);
This sets or unsets automatically showing only traces that have detections within the current display time window.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
This behavior is dynamic with any change of the display time window.
-
int setShowTracesWithArrivalsOrDetections (QString answer);
This sets or unsets automatically showing only traces that have arrivals or detections
within the current display time window.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
This behavior is dynamic with any change of the display time window.
-
void getEvent (QString string_index, QString &output);
For database sources using EVServer or EVClient, this will set or unset the current
selected event and origin. If string_index is set to noev, then the
current event and origins selections are cleared, so that there will be no selected event or origin.
If string_index is set to e<evid>, where <evid> is a valid database evid value,
then the event will be set to the corresponding <evid> and the origin will be set to the event's
preferred origin.
If string_index is set to +<number>, then the event will be incremented by <number>
entries in the event list returned by EVClient::getEvents() (see EV(3)) and the origin will be set
to the event's preferred origin.
If string_index is set to -<number>, then the event will be decremented by <number>
entries in the event list returned by EVClient::getEvents() (see EV(3)) and the origin will be set
to the event's preferred origin.
If string_index is set to <index>, then the event will be set to the <index>th
entry in the event list returned by EVClient::getEvents() (see EV(3)) and the origin will be set
to the event's preferred origin.
When an event and origin are selected, the display is automatically time scrolled to the origin time
and the selected event status display is updated.
Textual event information is return in output.
-
void getOrigin (QString string_index, QString &output);
For database sources using EVServer or EVClient, this will set the current
selected origin. Only the origins associated with the current selected event can be selected
with this call. If string_index is set to pref, then the
preferred origin is selected.
If string_index is set to o<orid>, where <orid> is a valid database orid value
for one of the origins associated with the current selected event,
then the origin will be set to the corresponding <orid>.
If string_index is set to +<number>, then the origin will be incremented by <number>
entries in the origin list within the current selected event EVEvent structure (see EV(3)).
If string_index is set to -<number>, then the origin will be decremented by <number>
entries in the origin list within the current selected event EVEvent structure (see EV(3)).
If string_index is set to <index>, then the origin will be set to the <index>th
entry in the selected event origin list in the EVEvent structure (see EV(3)).
When an origin is selected, the display is automatically time scrolled to the origin time
and the selected event status display is updated.
Textual event information is return in output.
-
int setShowPredictedArrivals (QString answer);
This sets or unsets showing predicted arrivals.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
This behavior is dynamic with any change of the selected event or origin.
-
int setAutoDistanceSort (QString answer);
This sets or unsets automatically sorting traces according to distance from the selected event and origin.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
This behavior is dynamic with any change of the selected event or origin.
-
int setPalign (QString answer);
This sets or unsets automatically time aligning traces to the first predicted P-arrival time for the selected event
and origin.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
This behavior is dynamic with any change of the selected event or origin.
-
int setSelectedArrival (long arid, QString answer);
One or more arrivals can be put into a "selected" state for subsequent editing or tagging.
This sets or unsets the selected state for the arrival with arid value arid.
If answer is toggle, then the selection state is toggled,
otherwise answer is interpreted as a string boolean for setting or unsetting the selection state.
-
void clearSelectedArrivals ();
This will clear the selection state for all arrivals.
-
void setTags (long arid, QString tag, int emptyfirst=1);
String tags can be associated with arrivals. Within a BQTraceview object, these string tags
can be used to identify sets of arrivals to be used for subsequent earthquake location and to identify
each arrival as being defining or non-defining in the earthquake location.
This method sets a tag value tag to an arrival with arid value arid. Each arrival can
have more than one tag. If emptyfirst is set, then the arrival tags list is cleared before
the new tag is added.
-
void setSelectedArrivalsTags (QString tag, int emptyfirst=1);
This method sets a tag value tag to all of the currently selected arrivals. Each arrival can
have more than one tag. If emptyfirst is set, then all of the arrival tags lists are cleared before
the new tag is added.
-
void setAssociatedArrivalsTags (int emptyfirst=1);
This method sets the arrival tag values for all of the arrivals that are associated with the
currently selected event and origin so that the tag is D for defining arrivals
and N for non-defining arrivals. Each arrival can
have more than one tag. If emptyfirst is set, then all of the arrival tags lists are cleared before
the new tag is added.
-
void clearSelectedArrivalsTags ();
This will clear the arrival tags for all of the currently selected arrivals.
-
void clearAllTags ();
This will clear all arrival tags.
-
int setAddArrivalsMode (QString mode);
This sets or unsets the add new arrival modes used only when the main display is in edit mode.
If the main display is in edit mode and if the add arrivals mode flag is set, then a left
mouse click will add new arrivals and continue to add new arrivals until either the
add arrivals mode flag has been unset, or the right mouse button is clicked which automatically
unsets the add arrivals mode flag.
If mode is toggle, then the add arrivals mode flag is toggled,
otherwise mode is interpreted as a string boolean for setting or unsetting the add arrivals mode flag.
-
int setBatch (QString answer);
This sets or unsets the BQTraceview object rendering "batch" mode.
If answer is toggle, then the behavior is toggled, otherwise answer is interpreted as a string boolean.
When the batch mode has been set, then subsequent commands and method calls to change the display in any way are
performed but are not actually rendered on the screen. When the batch mode is unset, then a refresh is
called which will immediately render the display with all changes that occurred since the last time the batch
mode was set and subsequent changes will be rendered immediately.
This provides a way to prevent display "flashing" and to increase the performance when a set
of object changes are made.
-
int setCopyClipboard ();
This sets the copy clipboard to the currently selected arrivals.
-
int clearCopyClipboard ();
This clears the copy clipboard.
-
int pasteCopyClipboard (QString time_string, int paste_tags);
This will paste the contents of the copy clipboard as new arrivals with the time of the earliest
arrival set to time_string and the other times set to preserve relative times. If paste_tags
is set, then any arrival tags are copied as well.
-
void arrivalEditQueueClear ();
This will clear the arrivals edit queue. See EDIT QUEUE.
-
int arrivalEditQueueUndo ();
This causes a single arrival edit to be undone.
-
int arrivalEditQueueRedo ();
This causes a single arrival edit to be redone.
-
void arrivalEditQueueSetState (name);
This sets the arrival edit state name to name at the current position of the arrival edit queue.
-
int arrivalEditQueueGotoState (name);
This will cause the arrival edits to be rolled back or forward to correspond to the edit queue
position with state of name.
-
void linkBQEVEventsTableview (BQEVEventsTableview *evtableview);
This will cause a BQEVEventsTableview(3) object, evtableview, to be linked to the traceview object.
When the two objects are linked, then they are internally and automatically synchronized, in both directions,
with no need for application program callbacks or any other application program intervention.
Synchronization means that when an event or origin is selected in the evtableview and its
associated BQEVOriginsTableview(3) spreadsheets, it will be shown in the traceview object display,
through automatically generated event show and origin show commands,
and when an event or origin is selected within the traceview object by sending event show and origin show commands
either by typing in the command console or from some other source (such as task buttons),
that event or origin is automatically selected in the linked BQEVEventsTableview and BQEVOriginsTableview
objects.
-
virtual void callback (QString pfstring);
This is a callback method that would be programmer defined in sub-classes of BQTraceview.
This is intended to be called when significant actions occur in the BQTraceview object.
This is called with a parameter file string, pfstring.
The callback pfstring parameter file string contents are as follows.
callback_type
This defines the particular action that caused the callback. Following are the currently defined
values for callback_type.
The callback was triggered because of a change in the selected event. When callback_type
is select_event, then the following additional parameters will be in pfstring.
evid_value
The new selected evid value. If -1, then there is no selected event.
-
select_origin
The callback was triggered because of a change in the selected origin. When callback_type
is select_origin, then the following additional parameters will be in pfstring.
orid_value
The new selected orid value. If -1, then there is no selected origin.
-
command
The callback was triggered because a command was sent to the object, whether programmatically or through
a command console user typein. When callback_type
is command, then the following additional parameters will be in pfstring.
command_value
The BQTraceview command.
Automatic callbacks are blocked whenever the internal nofeedback flag is set. This provides
a mechanism for the application programmer to avoid undesired event processing recursion loops.
The internal nofeedback can be set or unset with a call to setNofeedback defined following.
-
void setNofeedback (int nofeedback=1);
This will set or unset the internal nofeedback flag. Note that the flag is always
cleared automatically whenever a blocked attempt to make a callback occurs.
OBJECT CONFIGURATION PARAMETERS
-
traceview_display_parameters pfstring
This specifies a number of display parameters.
The pfstring value is a parameter file string of the following form.
/B>
traceview_display_parameters &Arr{
main_display &Arr{ # these are display parameters for the main window
color_background \#000080 #<color> color of the trace window background
color_foreground yellow #<color> color of the trace window foreground (traces color)
color_time_grids \#80e0e0e0 #<color> color of the time grid lines
font_trace_label courier,16,Normal #<font> font used for trace labels
color_trace_label black #<color> color used for trace labels
color_trace_select_background lightgray #<color> color used for selected trace label backgrounds
color_trace_select_order_label blue #<color> color used for selected trace labels
font_trace_amp_label courier,12,Normal #<font> font used for trace amplitude labels
color_trace_amp_label \#808080 #<color> color used for trace amplitude labels
font_trace_filter_label courier,14,Normal #<font> font used for trace filter labels
color_trace_filter_label blue #<color> color used for trace filter labels
color_coordinates_status \#d0ffffff #<color> color used for coordinate status background
color_origin_status pink #<color> color used for origin status background
color_preferred_origin_status lightblue #<color> color used for preferred origin status background
linewidth 1 #<float> linewidth used for trace plots
color_detection_outline 0.0,1.0,0.7 #<color> color for detection flag outline
color_detection_text 0.0,1.0,0.7 #<color> color for detection flag text
color_detection_fill \#00000000 #<color> color for detection flag fill
linewidth_detection 3 #<float> detection flag linewidth
color_predicted_arrival_outline lightblue #<color> color for predicted arrival flag outline
color_predicted_arrival_text lightblue #<color> color for predicted arrival flag text
color_predicted_arrival_fill \#00000000 #<color> color for predicted arrival flag fill
linewidth_predicted_arrival 3 #<float> predicted arrival flag linewidth
color_arrival_normal_outline \#ffc0c0c0 #<color> color for normal arrival flag outline
color_arrival_normal_text \#ffc0c0c0 #<color> color for normal arrival flag text
color_arrival_normal_fill red #<color> color for normal arrival flag fill
linewidth_arrival_normal 3 #<float> normal arrival flag linewidth
color_arrival_defining_outline \#ffc0c0c0 #<color> color for defining arrival flag outline
color_arrival_defining_text \#ffc0c0c0 #<color> color for defining arrival flag text
color_arrival_defining_fill blue #<color> color for defining arrival flag fill
linewidth_arrival_defining 3 #<float> defining arrival flag linewidth
color_arrival_nondefining_outline \#ffc0c0c0 #<color> color for non-defining arrival flag outline
color_arrival_nondefining_text \#ffc0c0c0 #<color> color for non-defining arrival flag text
color_arrival_nondefining_fill green #<color> color for non-defining arrival flag fill
linewidth_arrival_nondefining 3 #<float> non-defining arrival flag linewidth
color_arrival_magnitude_outline \#ffc0c0c0 #<color> color for magnitude arrival flag outline
color_arrival_magnitude_text \#ffc0c0c0 #<color> color for magnitude arrival flag text
color_arrival_magnitude_fill 300.0,0.9,0.2 #<color> color for magnitude arrival flag fill
linewidth_arrival_magnitude 3 #<float> magnitude arrival flag linewidth
color_arrival_nonassociated_outline \#ffc0c0c0 #<color> color for non-associated arrival flag outline
color_arrival_nonassociated_text black #<color> color for non-associated arrival flag text
color_arrival_nonassociated_fill yellow #<color> color for non-associated arrival flag fill
linewidth_arrival_nonassociated 3 #<float> non-associated arrival flag linewidth
arrival_select_expr .* #<expr> arrival flag select expression applied to phase
arrival_reject_expr #<expr> arrival flag reject expression applied to phase
arrival_status_line &Arr{ # define status print line
format %s %s %s arid=%s phase=%s deltim=%s fm=%s auth=%s
arguments &Tbl{
epoch2str(time,\"%Y%j:%T\") %s
sta %s
chan %s
arid %ld
iphase %s
deltim %.2f
fm %s
auth %s
}
}
}
edit_display &Arr{ # these are display parameters for the arrival edit window
color_background \#e0e0e0 #<color> color of the trace window background
color_foreground gray #<color> color of the trace window foreground (traces color)
color_time_grids \#80000000 #<color> color of the time grid lines
linewidth 1 #<float> linewidth used for trace plots
color_detection_outline 0.0,1.0,0.7 #<color> color for detection flag outline
color_detection_text 0.0,1.0,0.7 #<color> color for detection flag text
color_detection_fill \#00000000 #<color> color for detection flag fill
color_detection_fill \#00000000 #<color> color for detection flag fill
color_predicted_arrival_outline pink #<color> color for predicted arrival flag outline
color_predicted_arrival_text pink #<color> color for predicted arrival flag text
color_predicted_arrival_fill \#00000000 #<color> color for predicted arrival flag fill
linewidth_predicted_arrival 3 #<float> predicted arrival flag linewidth
color_arrival_normal_outline \#ffc0c0c0 #<color> color for normal arrival flag outline
color_arrival_normal_text \#ffc0c0c0 #<color> color for normal arrival flag text
color_arrival_normal_fill red #<color> color for normal arrival flag fill
linewidth_arrival_normal 3 #<float> normal arrival flag linewidth
color_arrival_selected_outline black #<color> color for selected arrival flag outline
color_arrival_selected_text black #<color> color for selected arrival flag text
color_arrival_selected_fill cyan #<color> color for selected arrival flag fill
linewidth_arrival_selected 3 #<float> selected arrival flag linewidth
color_arrival_edit_outline red #<color> color for edited arrival flag outline
color_arrival_edit_text red #<color> color for edited arrival flag text
color_arrival_edit_fill lightblue #<color> color for edited arrival flag fill
linewidth_arrival_edit 3 #<float> edited arrival flag linewidth
color_arrival_defining_outline \#ffc0c0c0 #<color> color for defining arrival flag outline
color_arrival_defining_text \#ffc0c0c0 #<color> color for defining arrival flag text
color_arrival_defining_fill blue #<color> color for defining arrival flag fill
linewidth_arrival_defining 3 #<float> defining arrival flag linewidth
color_arrival_nondefining_outline \#ffc0c0c0 #<color> color for non-defining arrival flag outline
color_arrival_nondefining_text \#ffc0c0c0 #<color> color for non-defining arrival flag text
color_arrival_nondefining_fill green #<color> color for non-defining arrival flag fill
linewidth_arrival_nondefining 3 #<float> non-defining arrival flag linewidth
color_arrival_defining_tag_outline black #<color> color for tagged defining arrival flag outline
color_arrival_defining_tag_text black #<color> color for tagged defining arrival flag text
color_arrival_defining_tag_fill lightblue #<color> color for tagged defining arrival flag fill
linewidth_arrival_defining_tag 3 #<float> tagged defining arrival flag linewidth
color_arrival_nondefining_tag_outline black #<color> color for tagged non-defining arrival flag outline
color_arrival_nondefining_tag_text black #<color> color for tagged non-defining arrival flag text
color_arrival_nondefining_tag_fill lightgreen #<color> color for tagged non-defining arrival flag fill
linewidth_arrival_nondefining_tag 3 #<float> tagged non-defining arrival flag linewidth
color_arrival_nonassociated_outline black #<color> color for non-associated arrival flag outline
color_arrival_nonassociated_text black #<color> color for non-associated arrival flag text
color_arrival_nonassociated_fill yellow #<color> color for non-associated arrival flag fill
linewidth_arrival_nonassociated 3 #<float> non-associated arrival flag linewidth
color_arrival_residual_outline 0.0,1.0,0.7 #<color> color for arrival residual glyph outline
color_arrival_residual_text 0.0,1.0,0.7 #<color> color for arrival residual glyph text
linewidth_arrival_residual 5 #<float> arrival residual glyph linewidth
color_arrival_deltime_fill \#a0a0ffa0 #<color> color for arrival deltime glyph fill
arrival_select_expr .* #<expr> arrival flag select expression applied to phase
arrival_reject_expr [Mm].* #<expr> arrival flag reject expression applied to phase
arrival_status_line &Arr{ # define status print line
format %s %s %s arid=%s phase=%s deltim=%s fm=%s auth=%s
arguments &Tbl{
epoch2str(time,\"%Y%j:%T\") %s
sta %s
chan %s
arid %ld
iphase %s
deltim %.2f
fm %s
auth %s
}
}
}
}
/B>
-
The parameter file string must contain an associative array named traceview_display_params.
The traceview_display_params array defines display parameters for the normal (main) display
window, when the display is not in edit mode, and for the arrival edit display window, when the display is in edit mode.
Main display window parameters are defined in an associative array named main_display.
Arrival edit display window parameters are defined in an associative array named edit_display.
The individual parameters are defined above in the example pfstring value. Note that
only parameters that change need to be specified.
-
show_arrivals {yes|no}
This sets the BQTraceview object default show arrivals flag. Each individual BQTrace object
will use this to show or hide arrival flags when the corresponding BQTrace object configuration value
is set to default.
-
show_detections {yes|no}
This sets the BQTraceview object default show detections flag. Each individual BQTrace object
will use this to show or hide detection glyphs when the corresponding BQTrace object configuration value
is set to default.
-
show_predicted_arrivals {yes|no}
This sets the BQTraceview object default show predicted arrivals flag. Each individual BQTrace object
will use this to show or hide predicted arrival flags when the corresponding BQTrace object configuration value
is set to default.
-
show_residuals {yes|no}
This sets the BQTraceview object default show residuals flag. Each individual BQTrace object
will use this to show or hide residual glyphs when the corresponding BQTrace object configuration value
is set to default.
-
trace_label_visible {yes|no}
This sets the BQTraceview object trace label visibility. Each individual BQTrace object
will use this to show or hide trace labels when the BQTrace object label_visible configuration value
is set to default.
-
ampscale_visible {yes|no}
This sets the BQTraceview object default trace amplitude scales visibility. Each individual BQTrace object
will use this to show or hide trace amplitude scale annotations when the corresponding BQTrace object
configuration value is set to default.
-
show_crosshairs {yes|no}
This will enable or disable the mouse cursor crosshairs in the display.
-
show_coordinates_status {yes|no}
This will enable or disable the coordinates status text in the display
-
show_arrival_status {yes|no}
This will enable or disable the arrival status text in the display
-
show_origin_status {yes|no}
This will enable or disable the selected event and origin status text in the display.
-
use_wheel {yes|no}
This will enable or disable the use of the mouse wheel (including the track pad).
-
palign {yes|no}
This will enable or disable the P-alignment of traces and is equivalent to
calling setPalign({yes|no}).
-
auto_distance_sort {yes|no}
This will enable or disable the automatic distance sorting of traces and is equivalent to
calling setAutoDistanceSort({yes|no}).
-
preserve_time_scale_on_resize {yes|no}
When this is set to yes, then the pixels per second time scale is preserved when the display is
resized keeping the time at the left of the display unchanged. If this is set to no, then the
left and right edge time values are preserved during resizes. Note that the behavior of dbpick(1)
corresponds to the no value. This is equivalent to
calling setPreserveTimeScaleOnResize({yes|no}).
-
preserve_traces_scale_on_resize {yes|no}
When this is set to yes, then the pixels per non-dimensional Y-axis trace value scale is preserved when the
display is resized keeping the value at the top of the display unchanged. If this is set to no, then the
top and bottom edge Y-axis values are preserved during resizes. Note that the behavior of dbpick(1)
corresponds to the no value. This is equivalent to
calling setPreserveTracesScaleOnResize({yes|no}).
-
max_traces number
This will set a maximum number of traces, specified by number, to be displayed. If set to < = 0,
then there is no maximum number of trace to be displayed. This forces no more than number traces
to ever be displayed regardless of other settings.
-
min_pixels_traces npixels
This will set a minimum vertical pixel size for each trace, specified by npixels, to be displayed.
If set to < = 0, then there is no minimum trace vertical pixel size to be displayed.
This constrains each trace vertical height to be no less than npixels pixels and is enforced
regardless of other settings.
-
ampscale_mode {auto|fixed}
This sets the BQTraceview object default trace amplitude scale mode. Each individual BQTrace object
will use this as the trace amplitude scale mode when the corresponding BQTrace object
configuration value is set to default. A value of auto will cause automatic trace
amplitude scaling so that entire range of trace amplitudes within a display time window will be scaled
to the trace height. A value of fixed will fix trace amplitude scaling, in which case
the BQTrace::setScale method should be called to set the trace amplitude scale factors.
-
units {source|counts}
This sets the BQTraceview object default units display mode. Each individual BQTrace object
will use this as the trace units display mode when the corresponding BQTrace object
configuration value is set to default. A value of source will cause trace units
to correspond to the data source units.
A value of counts will cause trace units to be digital counts.
-
gain gain_value
This sets the BQTraceview object default trace gain value to gain_value. Each individual BQTrace object
will use this to set the trace gain value when the corresponding BQTrace object
configuration value is set to 0.0. The trace gain is applied to the trace amplitude plot scaling
to increase the trace amplitude, when gain_value > 1.0, or
to decrease the trace amplitude, when gain_value < 1.0.
-
clip {yes|no}
This sets the BQTraceview object default clip flag. Each individual BQTrace object
will use this to enable or disable display clipping when the corresponding BQTrace object configuration value
is set to default.
-
antialias {yes|no}
This sets the BQTraceview object display antialias flag. Each individual BQTrace object
will use this to enable or disable display plot antialiasing when the corresponding BQTrace object configuration value
is set to default.
-
filter_string filter_string
This sets the BQTraceview object default trace filter string. Each individual BQTrace object
will use this to set the trace filter string when the corresponding BQTrace object configuration value
is set to NULL. The filter_string can be none, meaning no filtering, or any proper
filter string as defined in wffil(3), wffilbrtt(3) and wffilave(3).
-
filter_tpad filter_tpad
This sets the BQTraceview object default trace filter time pad. Each individual BQTrace object
will use this to set the trace filter time pad when the BQTrace object filter_string configuration value
is set to NULL. The filter_tpad is a floating time pad in seconds for removing filter transients
in the display.
-
predicted_phases predicted_phases
This is used for determining the predicted arrival times. An example of predicted_phases is P,S.
The value of predicted_phases can be any phase list that is recognized by the tttaup(3) routines.
-
default_phase default_phase
This is the default phase code used whenever a new arrival is added.
-
traceview_buttons_definitions pfstring
This specifies button definitions for the optional taskbar.
The pfstring value is a parameter file string of the following form.
traceview_buttons_definitions &Arr{
pal &Arr{
height 20
description enable/disable P-arrival alignment
states &Arr{
on &Arr{
label Pal
description enable P-arrival alignment
action command display palign on
opacity 0.5
background_color #fff2e5
fill_color blue
order 0
}
off &Arr{
label Pal
show_not_symbol yes
description disable P-arrival alignment
action command display palign off
opacity 0.5
background_color #fff2e5
fill_color blue
order 1
}
}
}
spa &Arr{
height 20
description show/hide predicted arrivals
states &Arr{
on &Arr{
label Spa
description show predicted arrivals
action command display show_pred on
opacity 0.5
background_color #fff2e5
fill_color blue
order 0
}
off &Arr{
label Spa
show_not_symbol yes
description hide predicted arrivals
action command display show_pred off
opacity 0.5
background_color #fff2e5
fill_color blue
order 1
}
}
}
...
le &Arr{
height 20
description show last event
states &Arr{
on &Arr{
label Evl
description show last event
action &Tbl{
command display batch on
command arrivals tag clear_all
command arrivals select clear
command event show 10000000
command display batch off
}
opacity 0.5
background_color #fff2e5
fill_color blue
order 0
}
}
}
...
}
-
The parameter file string must contain an associative array named traceview_buttons_definitions.
The contents of the traceview_buttons_definitions array is parsed the same as
the BQTaskbar(3) taskbar_buttons_definitions configuration parameter except that
the first field in the action parameter may be command, in which case the
remaining fields are interpreted as commands sent to the BQTraceview object (see COMMANDS below).
-
traceview_buttons pfstring
This specifies buttons for the optional taskbar.
The pfstring value is a parameter file string of the following form.
traceview_buttons &Tbl{
pal nwb 0.0v+5 ftop 1 1
spa nwb +1r-1 0r 0 0
stad nwb +1r-1 0r 1 1
ds nwb +1r-1 0r 0 1
fe nwb +1r-1 0r 0 0
ne nwb +1r-1 0r 0 0
ce nwb +1r-1 0r 0 0
pe nwb +1r-1 0r 0 0
le nwb +1r-1 0r 0 0
cle nwb +1r-1 0r 0 0
fo nwb +1r-1 0r 0 0
no nwb +1r-1 0r 0 0
pref nwb +1r-1 0r 0 0
po nwb +1r-1 0r 0 0
adda nwb +1r-1 0r 0 0
}
-
The parameter file string must contain an associative array named traceview_buttons.
The contents of the traceview_buttons array is parsed the same as
the BQTaskbar(3) taskbar_buttons configuration parameter.
-
aliases pfstring
This specifies command alias definitions.
The pfstring value is a parameter file string of the following form.
aliases &Arr{
ts display time_start
tw display time_window
cm traces maximum
cw traces zoom
z traces zoom
zs traces:selected zoom
ta arrivals tag associated
tc arrivals tag clear_all
to arrivals output tagged
z10 z 10
fit traces fit
f fit
stadon &Tbl{
traces stad on
z10
}
}
-
The parameter file string must contain an associative array named aliases.
The contents of the aliases array contain alias name keys with the values set to command definitions.
Commands issued by sendCommand or typed into the command console can be alias names
defined by the key values in the aliases array. The alias name is replaced by the corresponding aliases
array value. Any fields after the alias name are appended to the command value in aliases. Aliases
are recursively processed so that aliases of aliases are allowed and properly processed. Aliases can be
a list of commands by specifying the value as a &Tbl.
-
hotkeys pfstring
This specifies hot key command alias definitions.
A hot key is a key pressed while the mouse cursor is in the main BQTraceview display.
The pfstring value is a parameter file string of the following form.
hotkeys &Arr{
left display time_start +%dxw # pan time left
shift-left display time_zoom 1.25 %xw # zoom time out
right display time_start -%dxw # pan time right
shift-right display time_zoom 0.8 %xw # zoom time in
up traces start -%dyw # pan traces up
shift-up traces zoom 1.25 %yw # zoom traces out
control-up traces gain *1.25 # gain traces up
down traces start +%dyw # pan traces down
shift-down traces zoom 0.8 %yw # zoom traces in
control-down traces gain *0.8 # gain traces down
n traces filter none # clear all traces filters
0 traces filter none # clear all traces filters
1 traces filter TPAD 100.0 BW 0.8 4 3.0 4 \#tele # set all traces filters to teleseismic
2 traces filter TPAD 10.0 BW 1.0 4 0.0 0 \#1hp # set all traces filters to 1hz high pass
3 traces filter TPAD 10.0 BW 5.0 4 0.0 0 \#5hp # set all traces filters to 5hz high pass
shift-a display configure antialias toggle # toggle traces antialias flag
shift-c display configure clip toggle # toggle traces clip flag
e arrivals edit_mode toggle # toggle arrivals edit mode
a arrivals add_mode yes # enable arrivals add mode
f traces fit # fit traces
c arrivals select clear # clear arrival selections
shift-p arrivals phase P # set selected arrivals phase to P
shift-s arrivals phase S # set selected arrivals phase to S
shift-d arrivals tag D # set selected arrivals tag to D
shift-n arrivals tag N # set selected arrivals tag to N
}
-
The parameter file string must contain an associative array named hotkeys.
The contents of the hotkeys array contain hotkeys as associative array keys with the
values set to command definitions. A hot key should be a single printable character or of the
form [{shift|control|controlshift}-]{up|down|left|right|<key>},
where shift, control and controlshift
are modifier keys, up, down, left
and right are the corresponding keyboard arrow keys and <key> is a single lower case keyboard key.
The values are the commands that will be executed. Variable substitutions are made based
upon the mouse position when the key was pressed.
The mouse X-position in world coordinates (epoch time) is substituted for the %xw token.
The mouse X-position in world coordinates relative to the left edge of the display is substituted for the %dxw token.
The mouse Y-position in world coordinates (Y-axis non-dimensional value) is substituted for the %yw token.
The mouse Y-position in world coordinates relative to the bottom edge of the display is substituted for the %dyw token.
-
arrivals_menu pfstring
This specifies popup menus that appear when a key is pressed on an arrival flag and the BQTraceview object is in edit mode.
arrivals_menus &Arr{
right &Tbl{ # right mouse button menu
&Arr{ # set phase codes to P
label P # menu item label
command arrivals phase P # traceview command
}
&Arr{ # set phase codes to S
label S # menu item label
command arrivals phase S # traceview command
}
&Arr{ # mark arrivals as deleted
label delete # menu item label
command arrivals phase del # traceview command
}
&Arr{ # tag arrivals as defining
label tag as defining # menu item label
command arrivals tag D # traceview command
}
&Arr{ # tag arrivals as non-defining
label tag as non-defining # menu item label
command arrivals tag N # traceview command
}
&Arr{ # clear arrivals tags
label clear tag # menu item label
command arrivals tag clear_all # traceview command
}
}
}
-
The parameter file string must contain an associative array named arrivals_menus.
The contents of the arrivals_menus array may contain three
tables, right, corresponding to a mouse right button click popup
menu, middle, corresponding to a mouse middle button click popup
menu, or left, corresponding to a mouse left button click popup menu.
All three menus can be defined. Within each of the right, middle abd left
menus are a list of associative arrays each corresponding to a popup menu entry.
Within each of these associative arrays are two parameters, label, for
the menu item label and command, for the command executed for that item.
COMMANDS
BQTraceview objects can be configured through a set of string commands that can be
typed in through a command console object, or programmatically using the
sendCommand method,
or through the taskbar buttons, hotkeys or arrivals menus defined previously. This command interface provides
similar functionality to the typein interface for
dbpick(1). Note that commands typed
into the command console object or programmatic commands that have been routed through the
command console object can generate text output that will be shown in the command console.
Simple command aliases can be defined. The aliases are all evaluated against the first word
in a command. Arguments after the aliased command are appended to the unaliased command. Alias
substitutions are evaluated recursively providing aliases of aliases functionality. Certain tokens
in the commands will automatically be substituted by current display values. Substitution tokens are define below.
-
%time_start
This token will be substituted with the current epoch time at the left edge of the display.
-
%time_end
This token will be substituted with the current epoch time at the right edge of the display.
-
%time_middle
This token will be substituted with the current epoch time at the middle of the display.
-
%time_window
This token will be substituted with the current display time window.
Following is a list of the commands.
-
?
Show a help listing of all of the currently recognized commands.
-
help
Show a help listing of all of the currently recognized commands.
-
echo string
Echo the string with token substitution.
-
quit
Call exit which will cause the program to exit.
-
alias name [substitution_string]
Define a command alias with name name and command substitution string substitution_string.
If substitution_string is not specified, then the value of any existing substitution_string
for alias name will be output.
-
unalias name
This will remove any alias of name name.
-
aliases
This will output the list of all currently defined aliases.
-
hotkey name [substitution_string]
Define a hotkey command with key name and command substitution string substitution_string.
If substitution_string is not specified, then the value of any existing substitution_string
for hotkey name will be output.
A hot key name should be a single printable character or of the
form [{shift|control|controlshift}-]{up|down|left|right},
where shift, control and controlshift
are modifier keys and up, down, left
and right are the corresponding keyboard arrow keys.
The substitution_string is the command that will be executed. Variable substitutions are made based
upon the mouse position when the key was pressed.
The mouse X-position in world coordinates (epoch time) is substituted for the %xw token.
The mouse X-position in world coordinates relative to the left edge of the display is substituted for the %dxw token.
The mouse Y-position in world coordinates (Y-axis non-dimensional value) is substituted for the %yw token.
The mouse Y-position in world coordinates relative to the bottom edge of the display is substituted for the %dyw token.
If substitution_string is not specified, then the value of any existing substitution_string
for hotkey name will be output.
-
unhotkey name
This will remove any hotkey of name name.
-
hotkeys
This will output the list of all currently defined hotkeys.
-
main import file_name
This will import commands from file name file_name and is equivalent to
calling importCommands.
-
main export file_name
This will export commands to file name file_name and is equivalent to
calling exportCommands.
-
display time_start {time_string|+time_string|-time_string}
This will cause the main display to scroll in time.
For time_string specification,
then time_string is a proper Datascope epoch time string which will correspond to the
left edge of the display.
For +time_string specification,
then time_string is an increment in seconds that will shift the display in time that
many seconds to the left (increase the time at the left edge of the display).
For -time_string specification,
then time_string is an increment in seconds that will shift the display in time that
many seconds to the right (decrease the time at the left edge of the display).
-
display time_window time_string
This will cause the main display time window (display increment) to change to time_string seconds.
The time at the left edge of the display will remain unchanged.
-
display time_zoom factor [time_anchor]
This will zoom the time scale in or out according to factor and time_anchor. The
amount of zoom is determined by factor which should be a floating number where factor > 1.0
will cause the display to zoom out in time and factor < 1.0
will cause the display to zoom in in time. if time_anchor is specified, then it should be
an epoch time string corresponding to a time value that will stay unchanged in its X position
after the zoom. If time_anchor is not specified then
the time at the left edge of the display will remain unchanged.
-
display palign [{yes|no|toggle}]
This sets or unsets automatically time aligning traces to the first predicted P-arrival time for the selected event
and origin. This is equivalent to calling setPalign.
-
display show_pred [{yes|no|toggle}]
This sets or unsets showing predicted arrivals for the selected event
and origin. This is equivalent to calling setShowPredictedArrivals.
-
display batch [{yes|no|toggle}]
This sets or unsets the BQTraceview object rendering "batch" mode.
When the batch mode has been set, then subsequent commands and method calls to change the display in any way are
performed but are not actually rendered on the screen. When the batch mode is unset, then a refresh is
called which will immediately render the display with all changes that occurred since the last time the batch
mode was set and subsequent changes will be rendered immediately.
This provides a way to prevent display "flashing" and to increase the performance when a set
of object changes are made.
This is equivalent to calling setBatch.
-
display linewidth linewidth
This sets the BQTraceview object default trace linewidth to linewidth pixels.
Each individual BQTrace object
will use this to set the trace linewidth when the BQTrace object linewidth configuration value
is set to < 0.0.
-
traces maximum number
This will set a maximum number of traces, specified by number, to be displayed. If set to < = 0,
then there is no maximum number of trace to be displayed. This forces no more than number traces
to ever be displayed regardless of other settings.
-
traces minimum_pixels number
This will set a minimum vertical pixel size for each trace, specified by number, to be displayed.
If set to < = 0, then there is no minimum trace vertical pixel size to be displayed.
This constrains each trace vertical height to be no less than number pixels and is enforced
regardless of other settings.
-
traces fit [{auto|toggle|no}]
This will zoom the currently selected traces in the vertical direction to fit within the display window.
If the traces fit form is used with no other arguments, then the zoom is applied once.
If auto is specified, then the zoom is applied automatically whenever there is a change in the
event or origin displayed. If no is specified, then the automatic zooming is disabled.
If toggle is specified, then the automatic zooming is toggled.
Note that the number of traces that are displayed is still subject to the traces maximum
and traces minimum_pixels limits.
-
traces sta [{yes|no|toggle}]
This sets or unsets automatically showing only traces that have arrivals within the current display time window.
If toggle, then the behavior is toggled.
This behavior is dynamic with any change of the display time window.
This is equivalent to calling setShowTracesWithArrivals.
-
traces std [{yes|no|toggle}]
This sets or unsets automatically showing only traces that have detections within the current display time window.
If toggle, then the behavior is toggled.
This behavior is dynamic with any change of the display time window.
This is equivalent to calling setShowTracesWithDetections.
-
traces stad [{yes|no|toggle}]
This sets or unsets automatically showing only traces that have arrivals or detections within the
current display time window.
If toggle, then the behavior is toggled.
This behavior is dynamic with any change of the display time window.
This is equivalent to calling setShowTracesWithArrivalsdOrDetections.
-
traces auto_distance_sort [{yes|no|toggle}]
This sets or unsets automatically sorting traces according to distance from the selected event and origin.
If toggle, then the behavior is toggled.
This behavior is dynamic with any change of the selected event or origin.
This is equivalent to calling setAutoDistanceSort.
-
traces gain {gain|*gain_factor|/gain_factor}
This causes all trace amplitudes to be gained up or down in the display by the value gain.
The gain is applied to the trace amplitude plot scaling
to increase the trace amplitudes, when gain > 1.0, or
to decrease the trace amplitudes, when gain < 1.0.
If the *gain_factor form is used, then gain_factor is used to multiply
the current trace gains.
If the /gain_factor form is used, then gain_factor is used to divide
the current trace gains.
-
traces[:trace_exprs] select [{yes|no|toggle}]
This causes traces to be marked as selected or deselected. When a trace is marked as selected, its
trace label region is rendered with different colors along with a selection order text value.
If toggle, then the behavior is toggled.
If :trace_exprs is not specified, then all traces are selected or deselected.
If :trace_exprs is specified, then trace_exprs is evaluated against all of
the traces to produce an ordered list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously. Each trace in the list is then selected
or deselected. The traces selection list is cumulative. It can be cleared with a traces select no
command.
-
traces[:trace_exprs] configure key value
If :trace_exprs is not specified, then the BQTraceview object configure
method is called with arguments key and value.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of traces is used,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously. For each BQTrace object
in the list, its configure method is called with arguments key and value (see BQTrace(3)).
-
traces[:trace_exprs] dup
This duplicates traces.
If :trace_exprs is not specified, then all traces are duplicated.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of traces are duplicated,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces are duplicated.
Note that you cannot duplicate duplicated traces, only original traces. Duplicate traces are identified
by the <copy> field in the standard trace labels as described previously in
the INDIVIDUAL TRACE REPRESENTATION section.
-
traces[:trace_exprs] show [{yes|no|toggle}]
This will cause traces to be shown or hidden.
If toggle, then the behavior is toggled.
If :trace_exprs is not specified, then all traces are shown or hidden.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of traces are shown or hidden,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces are show or hidden.
If the "traces[:traces_exprs] show" form is used with no other arguments, then
the traces that match the expression are shown and all other traces are hidden.
-
traces[:trace_exprs] order
This both shows and orders traces in the display.
If :trace_exprs is not specified, then all traces are shown and ordered in the original traces source data order.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current ordered selected list of traces is used to show and order the traces in the display,
otherwise trace_exprs is evaluated against all of
the traces to produce an ordered list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces are show and ordered according to the list.
Note that traces that do not match are automatically hidden. Also not that ordering
traces with this command can work against other automatic trace show/hide/order,
commands like traces auto_distance_sort and traces stad commands. Usually when using this
command you would first want to disable the other automatic show/hide/order commands.
-
traces[:trace_exprs] zoom [{first_index number|number|factor [first_y]}]
This will zoom in the vertical traces dimension.
If there are no arguments specified, then first a list of traces is composed.
If there are no arguments and :trace_exprs is not specified, then all traces in the original traces source data
order are put into the list.
If There are no arguments and :trace_exprs is specified and trace_exprs is set to selected, then
the current ordered selected list of traces is used as the zoom list,
otherwise trace_exprs is evaluated against all of
the traces to produce an ordered list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces are used in the zoom list.
Once the zoom list has been composed, then the zoom is such that the first trace in the list
is at the top of the display and the last trace in the list is at the bottom of the display.
If the argument is first_index number, then :trace_exprs should not be specified
and the zoom will be such that the topmost trace is the trace with integer index first_index in
the current trace display (starting with 0) and number is the integer number of traces to the
bottom edge of the display.
If the argument is number, then :trace_exprs should not be specified
and the zoom will be such that the topmost trace remains unchanged
and number is the integer number of traces to the bottom edge of the display.
If the argument is factor [first_y], then :trace_exprs should not be specified
and the zoom will be such that the Y-axis scale is zoomed in by floating factor < 1.0
and zoomed out by floating factor > 1.0. The Y-axis zoom can be anchored
to Y-axis non-dimensional floating value first_y as the topmost trace, or if not specified
the topmost trace remains unchanged.
-
traces[:trace_exprs] start [first_index]
This will pan (scroll) in the vertical traces dimension.
If there are no arguments specified, then first a list of traces is composed.
If there are no arguments and :trace_exprs is not specified, then all traces in the original traces source data
order are put into the list.
If There are no arguments and :trace_exprs is specified and trace_exprs is set to selected, then
the current ordered selected list of traces is used as the pan list,
otherwise trace_exprs is evaluated against all of
the traces to produce an ordered list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces are used in the pan list.
Once the pan list has been composed, then the pan is such that the first trace in the list
is at the top of the display.
If the argument is first_index, then :trace_exprs should not be specified
and the pan will be such that the topmost trace is the trace with integer index first_index in
the current trace display (starting with 0).
-
traces[:trace_exprs] stretch factor
This applies a vertical stretch factor to one or more traces in the display.
The vertical stretch factor is used to make trace vertical height in the display larger or smaller than
other traces in the display. The vertical stretch factor is relative to all of the traces in
the display. Therefore is all of the traces are set to the same vertical stretch factor, then the
trace display heights will all be equal and remain the same regardless of the value of factor.
If :trace_exprs is not specified, then all trace stretch factor are set to the floating factor.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of trace stretch factors will be set to the floating factor,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces stretch factors are set to the floating factor.
-
traces[:trace_exprs] color [color_string]
This sets trace foreground colors. The foreground color is the color of the trace waveform lines.
If color_string is not specified, then the trace foreground colors are set to NULL which
causes the traces to use the default BQTraceview foreground color for the main and edit display windows.
If :trace_exprs is not specified, then all trace foreground colors are set to the color color_string.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of trace foreground colors will be set to the color color_string,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces foreground colors are set to the
color color_string.
-
traces[:trace_exprs] color_background [color_string]
This sets trace background colors.
If color_string is not specified, then the trace background colors are set to NULL which
causes the traces to use the default BQTraceview background color for the main and edit display windows.
If :trace_exprs is not specified, then all trace background colors are set to the color color_string.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of trace background colors will be set to the color color_string,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces background colors are set to the
color color_string.
-
traces[:trace_exprs] linewidth [linewidth]
This sets trace linewidths.
If linewidth is not specified, then the trace linewidths are set to -1.0 which
causes the traces to use the default BQTraceview linewidth for the main and edit display windows.
If :trace_exprs is not specified, then all trace linewidths are set to the floating pixel linewidth.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of trace background colors will be set to the floating pixel linewidth,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces background colors are set to the
floating pixel linewidth.
-
traces[:trace_exprs] filter [TPAD time_pad ]filter_string [# filter_label]
This specifies a waveform filter to be applied to traces before display.
If the filter parameters are not specified, then the trace filters are set to NULL which
causes the traces to use the default BQTraceview filter for the main and edit display windows.
If :trace_exprs is not specified, then all trace filters are set to the filter parameters.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of traces will have their filters set to the filter parameters,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces will have their filters
set to the filter parameters.
The filter_string can be none, meaning no filtering, or any proper
filter string as defined in wffil(3), wffilbrtt(3) and wffilave(3).
If TPAD time_pad is specified, then time_pad is a floating time
value in seconds that is used as a time pad for removing filter transients in the display.
If # filter_label is specified, then filter_label is a string
label for the filter that is displayed below the trace label to the left of the trace display,
otherwise the filter label is set to filter_string.
-
traces[:trace_exprs] units [{source|counts|sm}]
This sets the trace display units values.
If the filter parameters are not specified, then the trace display units are set to default which
causes the traces to use the default BQTraceview trace display units for the main and edit display windows.
If :trace_exprs is not specified, then all trace display unit are set to the units argument.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of traces will have their display units set to the units argument,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces will have their display units
set to the units argument.
A units argument value of source will cause trace units
to correspond to the data source units.
A value of counts will cause trace units to be digital counts.
A value of sm will cause trace units to be strong motion units of cm/s for
velocity traces and mg for acceleration traces.
-
traces[:trace_exprs] scale [{fixed abottom atop|auto}]
This sets the trace amplitude display scale modes and scale factors.
If the scale parameters are not specified, then the trace amplitude scale modes are set
to default which
causes the traces to use the default BQTraceview trace amplitude scale modes and scale factors for
the main and edit display windows.
If :trace_exprs is not specified, then all trace amplitude scale modes and scale factors are set to
the scale parameters.
If :trace_exprs is specified and trace_exprs is set to selected, then
the current selected list of traces will have their amplitude scale modes and scale factors set to
the scale parameters,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and those traces will have their amplitude scale modes and scale factors
set to the scale parameters.
If fixed abottom atop is specified, then the trace amplitude display scale modes are set to fixed,
the amplitude corresponding to the bottom of the single trace display window is abottom in native source units
and the amplitude corresponding to the top of the single trace display window is top in native source units.
If auto is specified, then the trace amplitude display scale modes are set to auto.
-
arrivals edit_mode {yes|no|toggle}
This will set or unset the display mode to the edit state. Arrival edits are only permitted when
the display mode is in the edit state.
If toggle, then the behavior is toggled.
-
arrivals edit_queue clear
This will clear the arrivals edit queue. See EDIT QUEUE.
-
arrivals edit_queue undo [{all|number}]
This causes arrival edits to be undone. if all is specified, then all arrival edits in the edit queue are undone.
If a number is specified, then that number of arrival edits in the edit queue are undone.
Otherwise, a single edit is undone.
-
arrivals edit_queue redo [{all|number}]
This causes arrival edits to be redone. if all is specified, then all arrival edits in the edit queue are redone.
If a number is specified, then that number of arrival edits in the edit queue are redone.
Otherwise, a single edit is redone.
-
arrivals edit_queue setstate name
This sets the arrival edit state name to name at the current position of the arrival edit queue.
-
arrivals edit_queue gotostate name
This will cause the arrival edits to be rolled back or forward to correspond to the edit queue
position with state of name.
-
arrivals select {clear|arid {yes|no|toggle}}
This will set or clear arrival selected states. When arrivals are selected, they can be edited.
if clear is specified, then all arrival selections are cleared.
If arid {yes|no|toggle} is specified, then the selection is set
or unset or toggled for arrival with arid value arid.
-
arrivals add_mode {yes|no|toggle}
This sets, unsets or toggles the add new arrival modes used only when the main display is in edit mode.
If the main display is in edit mode and if the add arrivals mode flag is set, then a left
mouse click will add new arrivals and continue to add new arrivals until either the
add arrivals mode flag has been unset, or the right mouse button is clicked which automatically
unsets the add arrivals mode flag.
-
arrivals phase phase_string
This will edit all of the currently selected arrivals so that the CSS iphase attribute is set to phase_string.
Only selected arrivals are edited and this happens only if the main display is in edit mode.
Arrival edits are immediately flushed out to the database files.
-
arrivals tag {clear|clear_all|associated|tag_string}
This clears and sets tag values for arrivals.
if clear is specified, then all currently selected arrival tags are cleared.
if clear_all is specified, then all arrival tags are cleared.
if associated is specified, then arrivals that are associated with the currently selected event and origin
are tagged according to the CSS assoc table timedef attribute so that defining arrivals
are tagged with D and non-defining arrivals are tagged with N.
if tag_string is specified, then the currently selected arrivals tags will be set to tag_string.
-
arrivals output {tagged|selected}
This will cause the output string in a SendCommand to contain a list of arrival arid
values and the associated tag values.
if tagged is specified, then the output list will contain all arrival with tags.
if selected is specified, then the output list will contain all currently selected arrivals.
-
arrivals copy [clear]
If clear is specified, this clears the copy clipboard, otherwise this sets the copy clipboard to the
currently selected arrivals. The current selection is cleared.
-
arrivals paste [dont_paste_tags] time_string
This pastes the copy clipboard as new arrivals. The time of the earliest arrival is set to time_string
and the other arrival times maintain their relative positions. If dont_paste_tags is specified,
then the copy clipboard arrival tags are not copied, otherwise they are copied. Note that when tags are copied
any existing tags are first cleared. Also, any existing selections are cleared and the newly added arrivals
are left in a selected state.
-
arrivals[:trace_exprs] show [{yes|no|toggle}]
This will cause arrivals to be shown or hidden.
If toggle, then the behavior is toggled.
If :trace_exprs is not specified, then all arrivals are shown or hidden.
If :trace_exprs is specified and trace_exprs is set to selected, then
the arrivals for the current selected list of traces are shown or hidden,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and the arrivals for those traces are shown or hidden.
-
detections[:trace_exprs] show [{yes|no|toggle}]
This will cause detections to be shown or hidden.
If toggle, then the behavior is toggled.
If :trace_exprs is not specified, then all detections are shown or hidden.
If :trace_exprs is specified and trace_exprs is set to selected, then
the detections for the current selected list of traces are shown or hidden,
otherwise trace_exprs is evaluated against all of
the traces to produce a list of matching BQTrace object pointers, as described
in the TRACE EXPRESSIONS section previously, and the detections for those traces are shown or hidden.
-
event show {index|+incr|-incr|eevid|noev}
This will set an event as selected, or no event will be selected if noev is set.
If eevid is specified, where evid is a valid database evid value,
then the event will be set to the corresponding evid and the origin will be set to the event's
preferred origin.
If +incr is specified, then the event will be incremented by incr
entries in the event list returned by EVClient::getEvents() (see EV(3)) and the origin will be set
to the event's preferred origin.
If -incr is specified, then the event will be decremented by incr
entries in the event list returned by EVClient::getEvents() (see EV(3)) and the origin will be set
to the event's preferred origin.
If index is specified, then the event will be set to the indexth
entry in the event list returned by EVClient::getEvents() (see EV(3)) and the origin will be set
to the event's preferred origin.
When an event and origin are selected, the display is automatically time scrolled to the origin time
and the selected event status display is updated.
-
origin show {index|+incr|-incr|oorid|pref}
This will set an origin as selected.
Only the origins associated with the current selected event can be selected
with this command. If pref is set, then the
preferred origin is selected.
If oorid is set, where orid is a valid database orid value
for one of the origins associated with the current selected event,
then the origin will be set to the corresponding orid.
If +incr is set, then the origin will be incremented by incr
entries in the origin list within the current selected event EVEvent structure (see EV(3)).
If -incr is set, then the origin will be decremented by incr
entries in the origin list within the current selected event EVEvent structure (see EV(3)).
If index is set, then the origin will be set to the indexth
entry in the selected event origin list in the EVEvent structure (see EV(3)).
When an origin is selected, the display is automatically time scrolled to the origin time
and the selected event status display is updated.
EXAMPLE
Following is a simple c++ example.
#include "BQ.h"
void
usage() {
fprintf (stderr, "usage: bqplot_test_traceview dbname\n");
}
int
main (int argc, char **argv)
{
if (argc != 2) {
usage();
exit (1);
}
char *dbname = argv[1];
QApplication qapp(argc, argv);
qapp.setApplicationName("bqplot_test_traceview");
QWidget *widget = new QWidget();
widget->setWindowTitle("bqplot_test_traceview");
widget->show();
QGridLayout *layout = new QGridLayout (widget);
layout->setSpacing (0);
layout->setContentsMargins (0, 0, 0, 0);
widget->setLayout (layout);
QSplitter *splitter = new QSplitter (Qt::Vertical, widget);
layout->addWidget (splitter, 0, 0, 1, 1);
QFrame *trframe = new QFrame (widget);
BQViewport *vp = new BQViewport (trframe);
BQCommandConsole *cc = new BQCommandConsole (widget);
BQTraceview *traceview = new BQTraceview (vp, cc);
EVServer *evserver = new EVServer(dbname);
traceview->createTraces (evserver);
traceview->configure ("max_traces", "40", NULL);
traceview->setTimeWindow (BQ_TIME_NULL, 1800.0);
traceview->sendCommand ("event show 0", NULL);
splitter->addWidget (trframe);
splitter->addWidget (cc);
QList<int> sizes({700, 100});
splitter->setSizes (sizes);
widget->setGeometry (50, 0, 1200, 800);
qapp.exec();
exit (0);
}
SEE ALSO
bqplot(3),
BQViewport(3),
BQConfigure(3),
BQCommandConsole(3),
BQTrace(3),
EV(3)
AUTHOR
Danny Harvey, BRTT