• Antelope Release 5.9 Mac OS X 10.13.2 2019-05-01

 

NAME

traceview - Program to view waveforms and edit arrivals

SYNOPSIS

traceveiw dbname
traceview [-sc sta:chans] [-ts start_time] [-tw time_window]
          [-trefresh trefresh] [-usewheel|-dontusewheel]
          [-import fname] [-nfsok] [-pf pfname] dbname

DESCRIPTION

traceview is a program to display seismic waveform traces, arrival flags, detections, predicted arrivals, seismic event associations and residuals. As well, traceview supports interactive editing of seismic arrivals. This program is meant to provide the same functionality as dbpick(1) but using Qt-based display graphics and graphical user interface. traceview uses a BQTraceview(3) class object to effect the main display graphics and GUI. Also used are a typein command console, using a BQCommandConsole(3) object, and an events/origins spreadsheet, for show event information and providing an event-based selection mechanism, use a BQEVTableview object.

An attempt has been made to make traceview 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.

DISPLAY COMPONENTS AND LAYOUT

traceview has three main windows. There is a main display window that shows the BQTraceview(3) object consisting of waveforms, arrivals, predicted arrivals, detections and residuals, along with trace and timing annotations, three test status displays immediately above the waveform display, the bottom one for displaying the current selected event information and the top one for displaying the current cursor position or the current selected arrival information. Above the status displays is a taskbar that is configurable using the traceview parameter file.

There as a second command window that shows the BQCommandConsole(3) command typein window. This window shows a history of commands that can be generated by either direct user typing or remotely by other interactions through the main display window as described below. The user can re-generate commands by using the Up and Down keyboard arrow keys. Commands can be edited inline before they are executed using the Return key. Commands and command syntax are described in the COMMANDS section following.

At startup, the main display window and command window are shown side-by-side. The command window is implemented as a QDockWidget object and can be moved to become a free floating top-level window or re-attached to the main display at some other docking position. The window can be dismissed completely and brought back using the Windows pull-down menu in the menu bar as described below.

A third optional events information window can be created using the Windows pull-down menu. This window a BQEVTableview(3) object that shows event/origin information in spreadsheet styles. The particular columns shown are configured in the tableview parameter file. This events window shows a list of events that can be sorted along with the currently selected event and origin. The event and origin selections can be changed by clicking on a particular row in the spreadsheet. This third events window is displayed to the left of the main display window when first created. As with the command window, the events window is implemented as a QDockWidget object and can be moved to become a free floating top-level window or re-attached to the main display at some other docking position. The window can be dismissed completely and brought back using the Windows pull-down menu in the menu bar as described below.

The main display window looks similar to the dbpick(1) display. Seismic waveforms are drawn horizontally and are arranged vertically for the individual traces. The horizontal X-axis is time. The vertical Y-axis is trace index. Channels can be shown or hidden and sorted as described below. Arrival flags, detections, predicted arrivals, residual bars and time uncertainty bars are all implemented using BQPolypoint(3) glyph objects. There are copious display configuration parameters, set through the commands and parameter file 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.

traceview 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.

A taskbar, implemented with BQTaskbar(3), is specified using the traceview parameter file. This taskbar has been enhanced so that its actions can be to send traceview commands as defined below.

INDIVIDUAL TRACE REPRESENTATION

Each individual trace in traceview 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 traceview objects as needed.

Each trace within the traceview main display is assigned a trace label when it is created. This trace label is displayed to the left of the trace. 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 traceview 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 number 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 objects, 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 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

Interactions with the input database data sources use automatically created EVServer and EVClient objects. Notifications of database changes from the internal EVServer object are sent to the internal EVClient object. traceview responds to these notifications by immediately updating the display. In order for spontaneous dynamic display updates to be realized, the -trefresh command line option must be specified, as described below.

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 PARAMETER FILE 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:

Following is a list of mouse interactions when the display is in edit mode.

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:

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 traceview. 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.

COMMANDS

traceview can be configured through a set of string commands that can be typed in through the command console window, or through the taskbar buttons, hotkeys or arrivals menus defined below. 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.

OPTIONS

PARAMETER FILE

An example traceview parameter file is as follows:
# This is the default traceview parameter file

use_wheel                       yes  #<str> use mouse wheel or track pad gestures for panning display
max_events                      1000 #<int> maximum number of events to process
max_traces                      40   #<int> maximum number of traces to display
min_pixels_traces               10   #<int> minimum pixel height per trace
auto_distance_sort              no   #<str> automatically sort traces by distance from event
predicted_phases                P,S  #<str> phases for predicted arrivals
default_phase                   P    #<str> default phase code for new arrivals
preserve_time_scale_on_resize   yes  #<str> preserve pixels per second horizontal scale on resize?
preserve_traces_scale_on_resize yes  #<str> preserve pixels per trace vertical scale on resize?
auto_select_event 				no   #<str> automatically select event?

# aliases contains command aliases
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
  }
}

# hotkeys contains single character hot key aliases
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
  control-c    arrivals copy                                   # copy selected arrivals into the clipboard
  control-v    arrivals paste %xw                              # paste arrivals from the clipboard
  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
}

# arrivals_menus contains arrivals editing menu items
arrivals_menus &Arr{
  right &Tbl{                      # right mouse button menu
    &Arr{                          # set phase codes to P
      label   P
      command arrivals phase P
    }
    &Arr{                          # set phase codes to S
      label   S
      command arrivals phase S
    }
    &Arr{                          # mark arrivals as deleted
      label   delete
      command arrivals phase del
    }
    &Arr{                          # tag arrivals as defining
      label   tag as defining
      command arrivals tag D
    }
    &Arr{                          # tag arrivals as non-defining
      label   tag as non-defining
      command arrivals tag N
    }
    &Arr{                          # clear arrivals tags
      label   clear tag
      command arrivals tag clear_all
    }
  }
}

# traceview_display_parameters contains colors, fonts and linewidths for the traceview display windows
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
      }
    }
  }
}

# traceview_buttons_definitions contains definitions of task buttons along the top of the traceview window
# Note that the buttons definitions are defined in BQTaskbar(3)
traceview_buttons_definitions &Arr{
  pal &Arr{         # enable/disable P-arrival alignment
    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{         # show/hide predicted arrivals
    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
      }
    }
  }
  stad &Arr{        # hide/show traces without arrivals or detections
    height 20
    description hide/show traces without arrivals or detections
    states &Arr{
      on &Arr{
        label  Stad
        description hide traces without arrivals or detections
        action  command traces stad on
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
      off &Arr{
        label  Stad
        show_not_symbol  yes
        description hide traces without arrivals or detections
        action  command traces stad off
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  1
      }
    }
  }
  ds &Arr{          # enable/disable trace distance sorting
    height 20
    description enable/disable trace distance sorting
    states &Arr{
      on &Arr{
        label  Ds
        description enable trace distance sorting
        action  command traces auto_distance_sort on
        opacity  0.5
        background_color #fff2e5
        fill_color  blue
        order  0
      }
      off &Arr{
        label  Ds
        show_not_symbol  yes
        description disable trace distance sorting
        action  command traces auto_distance_sort off
        opacity  0.5
        background_color #fff2e5
        fill_color  blue
        order  1
      }
    }
  }
  le &Arr{          # show last event
    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
      }
    }
  }
  pe &Arr{          # show previous event
    height 20
    description show previous event
    states &Arr{
      on &Arr{
        label  Ev-
        description show previous event
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command event show -1
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  ce &Arr{          # show current event
    height 20
    description show current event
    states &Arr{
      on &Arr{
        label  Ev
        description show current event
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command event show +0
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  ne &Arr{          # show next event
    height 20
    description show next event
    states &Arr{
      on &Arr{
        label  Ev+
        description show next event
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command event show +1
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  fe &Arr{          # show first event
    height 20
    description show first event
    states &Arr{
      on &Arr{
        label  Ev0
        description show first event
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command event show 0
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  cle &Arr{         # clear event selection
    height 20
    description unselect event
    states &Arr{
      on &Arr{
        label  ClEv
        description unselect event
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command event show noev
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  fo &Arr {         # show first origin
    height 20
    description first origin
    states &Arr{
      on &Arr{
        label  Or0
        description first origin
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command origin show 0
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  no &Arr{         # show next origin
    height 20
    description next origin
    states &Arr{
      on &Arr{
        label  Or+
        description next origin
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command origin show +1
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  pref &Arr{       # show preferred origin
    height 20
    description preferred origin
    states &Arr{
      on &Arr{
        label  PrefOr
        description preferred origin
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command origin show pref
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  po &Arr{         # show previous origin
    height 20
    description previous origin
    states &Arr{
      on &Arr{
        label  Or-
        description previous origin
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command origin show -1
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  lo &Arr{         # show last origin
    height 20
    description last origin
    states &Arr{
      on &Arr{
        label  Orl
        description last origin
        action &Tbl{
          command display batch on
          command arrivals tag clear_all
          command arrivals select clear
          command origin show 1000000
          command display batch off
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
  adda &Arr{       # enable add arrivals mode
    height 20
    description Add arrivals
    states &Arr{
      on &Arr{
        label  AddA
        description Add arrivals
        action &Tbl{
          command arrivals add_mode on
        }
        opacity  0.5
        background_color \#fff2e5
        fill_color  blue
        order  0
      }
    }
  }
}

# traceview_buttons specifies which task buttons are displayed and where they are dispayed
# Note that the buttons are defined in BQTaskbar(3)
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
}

# events_params define the parameters for the events tableview
events_params &Arr{
  # column_definitions defines the column display definitions for the events
  # tableview as defined in BQEVTableview(3)
  column_definitions &Arr{
    evid &Arr{
      label evid
      text_template XXXXXX
      source events[%index].evid
      sort evid
      alignment e
      format %ld
    }
    time &Arr{
      label time
      text_template XXXXXXXXXXXXXXXXXXXXXX
      source events[%index].origins[pref_origin].record_origin{epoch2str(time,"%Y%j:%T")}
      sort origins[pref_origin].time
    }
    lat &Arr{
      label lat
      text_template XXXXXXXXXX
      source events[%index].origins[pref_origin].record_origin{lat}
      sort origins[pref_origin].record_origin{lat}
      alignment e
      format %.3lf
    }
    lon &Arr{
      label lon
      text_template XXXXXXXXXX
      source events[%index].origins[pref_origin].record_origin{lon}
      sort origins[pref_origin].record_origin{lon}
      alignment e
      format %.3lf
    }
    depth &Arr{
      label depth
      text_template XXXXXXXX
      source events[%index].origins[pref_origin].record_origin{depth}
      sort origins[pref_origin].record_origin{depth}
      alignment e
      format %.2lf
    }
    region &Arr{
      label region
      text_template XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      source events[%index].origins[pref_origin].record_origin{grname(lat,lon)}
      sort origins[pref_origin].record_origin{grname(lat,lon)}
      alignment w
    }
    auth &Arr{
      label auth
      text_template XXXXXXXXXXXXXXXXXX
      source events[%index].origins[pref_origin].record_origin{auth}
      sort origins[pref_origin].record_origin{auth}
      alignment w
    }
    magnitude &Arr{
      label magnitude
      text_template XXXXXXXXXX
      source events[%index].magnitude;events[%index].magtype
      sort magnitude;magtype
      alignment e
      format %4.2f;(%s)
      null -999.00()
    }
  }

  # column_names define the particular column names to display for the events
  # tableview as defined in BQEVTableview(3)
  column_names &Tbl{
    evid
    time
    magnitude
    depth
    auth
    region
  }

  font                      courier,12
  font_header               courier,12,Normal
  default_hover_interaction no
  show_record_numbers       yes
  default_cell_height       15
  auto_select_event         no
}

# origins_params define the parameters for the origins tableview
origins_params &Arr{
  # column_definitions defines the column display definitions for the origins
  # tableview as defined in BQEVTableview(3)
  column_definitions &Arr{
    evid &Arr{
      label evid
      text_template XXXXXX
      source origins[%index].record_origin{evid}
      sort record_origin{evid}
      alignment e
      format %ld
    }
    orid &Arr{
      label orid
      text_template XXXXXX
      source origins[%index].orid
      sort orid
      alignment e
      format %ld
    }
    ndef &Arr{
      label ndef
      text_template XXXXXX
      source origins[%index].record_origin{ndef}
      sort record_origin{ndef}
      alignment e
      format %ld
    }
    nass &Arr{
      label nass
      text_template XXXXXX
      source origins[%index].record_origin{nass}
      sort record_origin{nass}
      alignment e
      format %ld
    }
    latency &Arr{
      label latency
      text_template XXXXXX:XX:XX:XX.XXX
      source origins[%index].record_origin{strtdelta(lddate-time)}
      sort record_origin{lddate-time}
      alignment e
    }
    time &Arr{
      label time
      text_template XXXXXXXXXXXXXXXXXXXXXX
      source origins[%index].record_origin{epoch2str(time,"%Y%j:%T")}
      sort time
    }
    lat &Arr{
      label lat
      text_template XXXXXXXXXX
      source origins[%index].record_origin{lat}
      sort record_origin{lat}
      alignment e
      format %.3lf
    }
    lon &Arr{
      label lon
      text_template XXXXXXXXXX
      source origins[%index].record_origin{lon}
      sort record_origin{lon}
      alignment e
      format %.3lf
    }
    depth &Arr{
      label depth
      text_template XXXXXXXX
      source origins[%index].record_origin{depth}
      sort record_origin{depth}
      alignment e
      format %.2lf
    }
    region &Arr{
      label region
      text_template XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      source origins[%index].record_origin{grname(lat,lon)}
      sort record_origin{grname(lat,lon)}
      alignment e
    }
    auth &Arr{
      label auth
      text_template XXXXXXXXXXXXXXXXXX
      source origins[%index].record_origin{auth}
      sort record_origin{auth}
      alignment e
    }
    magnitude &Arr{
      label magnitude
      text_template XXXXXXXXXX'
      source origins[%index].magnitude;origins[%index].magtype
      sort magnitude;magtype
      alignment e
      format %4.2f;(%s)
      null -999.00()
    }
  }

  # column_names define the particular column names to display for the origins
  # tableview as defined in BQEVTableview(3)
  column_names &Tbl{
    evid
    orid
    ndef
    nass
    time
    depth
    magnitude
    auth
    latency
  }

  font                      courier,12
  font_header               courier,12,Normal
  default_hover_interaction no
  show_record_numbers       yes
  default_cell_height       15
}

SEE ALSO

BQTraceview(3), BQCommandConsole(3), BQEVTableview(3), BQTaskbar(3), EV(3)

AUTHOR

Danny Harvey