Xphase Manual

XPHASE MANUAL

Version 2001.1111


Table of Contents


NAME

Xphase - interactive phase picking GUI software

VERSION

These notes pertain to version 2001.1111

SYNOPSIS

There are two general invocations of Xphase. The first reads in segy, sac, ah, or ascii files:

Xphase ( SEGY_files or -s SAC_files or -a AH_files or -c ASCII_files ) [ -p pick_file ] [ -t timemark_file ] [-g] [-r] [-h]

The second uses conventions similar to a DataScope style database:

Xphase ( -db DB_name -sta station -tstr start_time -tend end_time -mode imode) [ -p pick_file ] [ -t timemark_file ] [-g] [-r] [-h]

DESCRIPTION

Xphase is a program used to interactively run FORTRAN subroutines developed by A. Kushnir and others for autoregressive analysis of time series. Useful functions include phase detection, estimation of onset times, and reconstitution filtering. Xphase also provides a useful tool for testing arguments to the batch version of this software, called Xest (which see).

Xphase was developed on a SUN SPARCstation LX running Solaris 2.3, and compatibility with other environments should not be assumed. It is a fairly straightforward program, however, so modifications should not be extensive. Xphase requires a color monitor to work properly.

ARGUMENTS

In the first invocation, the only argument is the file names. Wild cards (? and *) can be used.
SEGY_files Specifies the SEGY trace files containing seismic data.

-s SAC_files Read in SAC formatted data rather than SEGY.
-a AH_files Read in AH formatted data rather than SEGY. Note the the routine that reads in the AH data is not the standard LDGO AHIO routines but a cludge based on an interpretation of some AH seismic data that I had available. Therefore it may not work on all datasets.
-c ASCII_files Read in ASCII data rather than SEGY. Format is based the ASCII format of Klaus Stammler's SHC. SHC ASCII files have a few header variables followed by a sequence of amplitudes. At minimum the header contains the time interval (DELTA) and the number of samples (LENGTH) and may optionally include the time of the first sample (START), the station code (STATION) and the component (COMP). A suitable file can be produced in SHC by issuing the command:

writea/npl=1  1  start station comp

recall that the outfile name will appear as all caps (this is the SHC convention). Here, we expect the header to have 5 lines in the order of DELTA, LENGTH, START, STATION, and COMP. Here's an example:

DELTA: 5.000000e-02
LENGTH: 46520
START:  5-OCT-1997_18:21:33.000
STATION: ANA
COMP: E
0.23
0.45
-0.33
...

which says the sample interval is 0.05 s with 46520 samples in the file. The time of the first sample is 5-OCT-1997_18:21:33.000, the station is ANA and the component is E (east).

In the second invocation, several arguments must be sepecified:
DB_name Specifies the databas name, a la DataScope.

-sta station The code of the station for which data is to be uploaded. Note that only one station can be used.
-tstr start_time The start time of the data. Note that any of the DataScope conventions for specifying time (e.g., epoch or date) can be used.
-tend end_time The end time of the data. Note that any of the DataScope conventions for specifying time (e.g., epoch or date) can be used.
-mode imode Specifies the number of channels to be used:
imode = 1(Z)
imode = 2(N,E)
imode = 3(ZNE)
OPTIONS

-g For SEGY data, do not convert from digital counts to volts. The SEGY data is presumed to be in digital counts, and the default is the convert this number to volts using the scaleing values in the header. Specifying the -g option skips this conversion.
-r Reset the origin time so the the first sample of all files is at time 0:0:0.0. This is a useful option if files with very different origin times are viewed simultaneously.
-h Prints out the usage summary.
-p pick_file Causes a pick formatted file (see discussion below) by the name of pick_file to be read in for display.
-t timemark_file Causes a timemark formatted file (see discussion below) by the name of timemak_file to be read in for display.

SOME BASIC USAGE NOTES

READING IN TIME SERIES (SEISMOGRAMS)

Xphase will read in DataScope, SEGY, SAC, AH, and SHC-style (i.e., Seismic Handler) ASCII files from the command line. Simple ASCII files may also be read in by activating the "READ" button and selecting "Ascii Time Series". All other files read in that have have references to particular times (pick files, for example) are converted to the nearest sample.

Note on filename conventions: In some routines the program follows PASSCAL file naming conventions in its operation. In particular. the program expects that the last field is related to the channel and the next to last field is the station code. If the channels are numbered, then because the vertical component is usually channel one, the vertical will be the first component read in. For example, in the pick file line shown below, the file name is "22.17.7360.1" so when records are read in with a "*". The program takes the 7360 to be the station code, and the "1" will make this the first file read in. Note that later conventions use, for example, BHZ, BHE, and BHN to label the vertical, E-W, and N-S components, and in this case the wild card read will read the vertical in last. The users needs to be aware of when this is important (see below). The channel order is easy to circumvent (just read them in a different order or reorder them using the selection boxes - see below), but the station name convention is hard wired. Proper station identification can be a useful tool when correleating records with pick file entrees.

READING IN PICK FILES

Files containing arrival time picks can be read in at the time Xphase is called if the -p option is used, or by using the READ button and selecting "Pick File" under "Data Type". The format of a pick line is several columns of information as follows:

1999 206  6 17   0.0994 0  -4.0398   0.6600  0 -1 1999206055828.47.BBU.BHZ Whitened Wed Aug  2 15:01:38 2000

Where the numbers in the colums correspond to year, julian day, hour, minute, second, phase type (0 = P, 1 = S, 2 = Other), uncertainties to the left (-) and right (+) of the pick, a mode identifier used in auto picking (see discussion below), a polarity for the P phase (1 up, -1 down, 0 neither or not a P phase) an identifier showing which file was used in making the pick, and finally several columns composing a time stamp. The time stamp is not read in and is used only to separate "new" picks from "old" reads.

READING IN TIME MARK FILES

Time marks are like picks but are static (i.e., they are not edited or written). They are used primarily to show the user where certain times, for example predicted arrival times, occur. Files containing time marks are read in at the time Xphase is called if the -t option is used. The format of a time mak is exactly the same as that of a pick (see above).

READING IN FIR FILTER FILES

FIR filter files are created for specific recording devices and sample rates. Certain combinations (e.g., RefTek A08 at 100 sps) are included in the program, but the user can read in a user-defined filter and apply it. The file is just a sequence of numbers (one per line) that describes the filter.

DRAWING ON THE SCREEN

A screen plot can be made by selecting the "DRAW" button. Each seismogram or function will appear in its own subwindow. Units on the X axis are in samples or time (user selectable). The max and min amplitudes of each file, along with a file identifier, are shown along the left hand side of each subwindow.

QUITTING

You can quit Xphase at any time by selecting the "QUIT" button.

AN OVERVIEW OF THE PROCEDURES USED IN XPHASE AND XEST

The main functions of Xphase and Xest are (1) Data whitening, (2) Phase Detection, (3) Onset Estimation, and (4) Automatic Detection and Onset Estimation. Starting with version 2001.1030, Xphase also adjusts picks using least-squares waveform correlation. In addition, Xphase can calculate characteristic functions of particle motion to determine useful indicators of polarity, rectilinearity, and other phase-related properties.

The following provides some details about how these work. At the heart of much of the math behind Whitening, Phase Detection, and Onset Estimation is the autocorrelation or autocovariance function c of x which is defined as:

c(k) = sum(i=k,N) x(i)x(i-k+1)

The number of elements of c (plus one), or, equivalently, the number of covariance non-zero lags computed, is called the order of the autoregression (AR) model.

Whitening and Phase Detection are both accompished by the FORTRAN subroutine grbeamfep, and is driven by the routines rungrbeam (in Xphase) and rungrbeam2 (in Xest). Both take an option argument that tells the program how far to progress: iopt = 1 for stacking only; iopt = 2 for whitening only, and iopt = 3 for whitening and detection.

Data whitening

Phase Detection

Onset Estimation

Waveform Correlation

Estimation of S Arrival times by S-P times Characteristic Functions

Automatic Detection and Onset Estimation

PREFERENCES AND DEFAULTS

Several important parameters are given reasonable default values in the program. These values may be overridden by the user prior to any processing step simply by entering alternate values into the interactive windows that appear before the processing actually begins (Note that the "Option Windows" toggle must be set to "Show" for these windows to appear). These values may be defined by the user at startup through a file called Xphase.prefs located either in your home directory (defined by the environment variable "HOME") or in the working directory. Xphase will attempt to read files of this name when it begins, looking first in the working directory and then in your home directory. (If the file Xphase.prefs exists in both directories, the settings in the working directory will supercede those in the home directory). Variables are specified by including within the file a line with the variable name and its value (or 3 values, in the case of specifying colors). Only those variables which you wish to reset need be included. The items that Xphase tries to read are as follows (with default values):

arm The order of auto-regressive model. This essentially is the number of points used to predict the value of the following point. The larger the order, the slower the program. My experience is that order 3 works pretty well, and this is the default value (arm =3).
arwid Width, in samples, of the start of the window used in covariance modelling for estimation. The actual estimation takes place some distance inside the data window, because a few samples must be used in order to calculate the covariance matrix. The actual data window thus begins arwid samples after the defined beginning, and ends arwid samples before the defined end. The actual size of the data window is thus (arstop - arstrt) - 2*arwid. Default value is calculated from the size of the data window.
arstrt Start of data window, in samples. Default = first sample.
arstop End of data window, in samples. Default = last sample.
winsize Size of window, in samples, around a phase detection for onset estimation. Default value is calculated from the size of the data window.
mvwind Size of moving window, in samples, used for phase detection. Default value is calculated from the size of the data window.
pfact P threshold factor (* noise_max) Default = 100.
sfact S threshold factor (* detection_max) Default = .9
wfrac Fraction of winsize used to determine the onset local estimation maxima. Default is 0.1.
nstrt Start of noise window for phase detection, in samples. Default = 1st sample
nstop End of noise window for phase detection, in samples. Default = Last sample
perr Fallback P uncertainty (in seconds). Default is the time increment (delta).
serr Fallback S uncertainty (in seconds). Default is the time increment (delta).
unthr Uncertainty threshold, in fraction of estimation function maximum. Default = 0.9.
xmin Sample minimum for plotting. Default = Current screen dimension.
xmax Sample maximum for plotting. Default = Current screen dimension.
pickwin Number of points used to determine polarity. Default = 2.
colors Color scheme used, either black on white (0), or alternate (1). Default = 1. If alternate is chosen, the default is a yellow on blue scheme, but all of the colors in the alternate scheme can be modified by the user by specifying the next several preferences.
pcolor Alternate color for P arrivals. Specify red, green, and blue values. Default is (255, 69, 0) which is an Orange-Red.
scolor Alternate color for S arrivals. Specify red, green, and blue values. Default is (255, 255, 255) which is Pure White.
ocolor Alternate color for all other arrivals. Specify red, green, and blue values. Default is (85, 107, 47) which is Dark Olive Green.
bgcolor Alternate background color. Specify red, green, and blue values. Default is (0, 0, 53) which is dark blue.
fgcolor Alternate foreground (waveform) color. Specify red, green, and blue values. Default is (255, 255, 0) which is Pure Yellow.
tmcolor Alternate Time Mark color. Specify red, green, and blue values. Default is (255, 50, 200) which is a Pinkish color.
maxcolor Alternate Maximum Value color. Specify red, green, and blue values. Default is (224, 255, 255) which is a Light Cyan color.
dotcolor Alternate Time Dot color. Specify red, green, and blue values. Default is (204, 204, 255) which is a Light Grey color.
dwincolor Alternate Data Window color. Specify red, green, and blue values. Default is (0, 255, 0) which is Pure Green.
nwincolor Alternate Data Window color. Specify red, green, and blue values. Default is (255, 0, 0) which is Pure Red.
pthrcolor Alternate P Threshold Line color. Specify red, green, and blue values. Default is (255, 69, 0) which is an Orange-Red.
sthrcolor Alternate S Threshold Line color. Specify red, green, and blue values. Default is (255, 255, 255) which is Pure White.
nlvlcolor Alternate Noise Level Line color. Specify red, green, and blue values. Default is (0, 255, 0) which is Pure Green.
view_dwin View Data Window, either view (0), or don't view (1). Default = 0.
view_nwin View Noise Window, either view (0), or don't view (1). Default = 0.
view_pick View Picks, either view (0), or don't view (1). Default = 0.
view_picklab View Pick Labels, either view (0), or don't view (1). Default = 1.
view_errs View Pick Uncertainties, either view (0), or don't view (1). Default = 1.
view_tmark View Time Marks, either view (0), or don't view (1). Default = 1.
view_tmarklab View Time Mark Labels, either view (0), or don't view (1). Default = 1.
cfwin Window length (number of samples) for computation of cross power spectrum when calculating Cichowicz characteristic functions. Default = 15.
max_view The maximum number of datasets visible on the viewable part of the screen. If more that max_view data sets are viewed, they can be accessed by the scroll bar. Default = 10.
vpvs_min The minimum value of Vp/Vs used by the S arrival time estimator. Default = 1.72.
vpvs_max The maximum value of Vp/Vs used by the S arrival time estimator. Default = 1.90.
vpvs_pref The preferred value of Vp/Vs used by the S arrival time estimator. This is the Vp/Vs used to estimate Tp for the first selected waveform. Default = 1.78.
mode Control of operation for automatic detection. Possible choices for mode are:
0 Manual (interactive). This is the default for Xphase.
1 Raw P on vertical Raw S on biggest horziontal
2 Raw P on vertical Raw S both horizontals
3 Raw P on vertical Raw S both horizontals
11 Raw P on vertical P Coda Whitened S on biggest horizontal
12 Raw P on vertical P Coda Whitened S both horizontals
21 Whitened P on vertical P Coda Whitened S on biggest horizontal
22 Whitened P on vertical P Coda Whitened S both horizontals
33 3 Components, Whitened

THE BUTTONS ON THE TOP PANEL

When executing Xphase the first window to appear on the screen is the main window titled Xphase with the version number and the name of the directory from which Xphase was executed. The main window is divided up into two sections: a panel along the top containing various buttons, and a canvas onto which the time series are plotted.

The buttons on the panel and their functions are as follows:

READ
Brings up a window for inputing the names of pick files, ASCII time series, and FIR acausal filter files to be read in. The file name and directory are typed in the first two input rows. When the information is correct select "OK", or, if you want to abort the READ, select "CANCEL". Up to 50 data files can be read in. Note that once a time series file is read in it becomes the "Current" data set or model. After a time series file is read in, the extremal values of Y (amplitude) and X (sample number) are shown in the top panel in the Data Xmin:, Data Xmax:, Data Ymin:, and Data Ymax: entries.

WRITE
Writes the current file out as either an ASCII or SEGY file. Useful for saving Detection and Estimation files for later viewing or plotting.

DRAW
Draws selected time series and other marks on the screen. You can contol what is plotted by using the VIEW FILE and/or VIEW PREFS options.

VIEW FILE
Select which datasets to plot on the screen (or to delete when selecting DEL FILE later).

DEL FILE
Delete some set of data sets, with a choice of either only the current data set of all of the selected data sets (the dark ones in the "VIEW FILE" window).

OPTIONS

The View Preferences section allows you to select which variables to plot on the screen as vertical lines. If selected:

Data Window appears as dashed green lines
Noise Window appears as dashed read lines
Estimate Maxima appear as dashed blue lines
Picks appear as solid lines with phase dependent colors, depending on the background color scheme (these can be redefined by the user in the preference file).

For the black on white scheme:
PPink
SRoyal Blue
OtherOlive Green

For the Yellow on Blue scheme:
POrange Red
SWhite
OtherOlive Green

Uncertanties appear as dotted lines in the color corresponding to the pick type.

The Pick Type section allows you to choose which phase to align when working in relative time mode. Default is the P phase.

SEL DAT
Select which datasets to use in processing (only time series files will appear, unless others are read in at the beginning). Note that you cannot select a dataset for processing unless it is viewed (i.e., plotted on the screen). Note that it is possible to select data using the Selection Boxes that appear to the left of each waveform (see discussion below).

DATA++
Makes the next data set in the list the current data set.

DATA--

Makes the previous data set the current data set.

EST ONSET
Calculate the onset likelihood function using all the data in the specified data window from all of the selected data sets. Options that can be set in interactive window (note that the "Option Window" toggle must be set to "Show") are:

AR order Order of the autoregression model

Operation mode (Not Used in this fuction)
Covariance Interval This is basically the sample where the estimation starts. See discusion of arwid above.
Start Point Beginning of data window
End Point End of Data window
Auto Window Size (Not Used in this function)
P threshold (Not Used in this function)
S threshold (Not Used in this function)
Moving Window Fraction (Not Used in this function)

Upon completion of processing, a window is created showing the function and its maximum.

STACK
Add selected (from SEL DAT) datasets together withing the data window. Upon completion of processing, a window is created showing the stacked waveform.

WHITEN STACK
Apply whitening filter to a stack of the selected data. Filter is computed from data in the noise window.

WHITEN EACH
Apply whitening filter to a each file of the selected data. Filter is computed from data in the noise window.

PHASE DETECT
Compute Phase Detection function for selected data within the data window. Whitenning filter is computed from data in the noise window. Options that can be set in the interactive window are:

AR order Order of the autoregression model
Length of Moving Window Length of window over which a moving average is taken for detection. Making this longer makes the detection function smoother.
AR Start Point Beginning of Data Window
AR End Point End of Data Window
Noise Start Point Beginning of Noise Window
Noise End Point End of Noise Window

AUTO EST
Interactive version of one of the automatic processing options. The idea is to fine tune the parameters for this algorithm before doing automatic processing on a lot of data. In this version, we assume that the signals are P followed by S, and so the estimator marches through the signal looking for these thresholds to be successivly exceeded.

AR order Order of the autoregression model
Operation mode A flag that tells the program how to select the data for processing. Options are:
Manual OperationOperator takes control of setting which files are used for onset estimation
Chan1 Raw P / Max Raw SUse the raw data from the first channel for estimating P, and the maximum of the horizontals for estimating S (or use P if only one channel).
Chan1 Raw P / Chan2/3 Raw SUse the raw data from the first channel for estimating P, and both of the horizontals for estimating S.
3 Raw Chans for P and SUse the raw data from the all three channels simultane- ously to estimate all phases.
Chan1 Raw P / Max White SUse the raw data from the first channel for estimating P, and whiten the maximum of the horizontals with the P coda for estimating S (or use P if only one channel).
Chan1 Raw P / Chan2/3 White SUse the raw data from the first channel for estimating P, and whiten the stack of the horizontals with the P coda for estimating S (or use P if only one channel).
Chan1 White P / Max White SUse the data from the first channel whitened by the noise for estimating P, and whiten the maximum of the horizontals with the P coda for estimating S (or use P if only one channel).
Chan1 White P / Chan2/3 White SUse the data from the first channel whitened by the noise for estimating P, and whiten the stack of the horizontals with the P coda for estimating S (or use P if only one channel).

Some conventions used in processing with these modes:

  1. The P wave is always selected from the first channel read in.

  2. Channels 2/3, if present, are presumed to be horizontal.

  3. If only one channel is read in, S is estimated from this channel.

  4. If two channels are read in, they are treated as two horizontals.

  5. P and S detection are based on thesholds calculated from fractions of the detection maximum (in the case of S) or multiples of the noise maximum (in the case of P).

  6. P detection begins at the end of the noise window.

  7. P coda is defined as the window between the P arrival (+1) and the S detection

  8. S detection begins after the P arrival (+1)

Covariance Interval this is basically the sample where the estimation starts.
Start Point Beginning of data window
End Point End of Data window
Auto Window Size This sets the effective size of a Data Window about a detected phase for onset estimation. The window position is set so that the detection is in the mitdle.
P threshold This determines the threshold level of detection of P wave. It multiplies the detection function level in the Noise Window, so should be > 1.0
S threshold This determines the threshold level of detection of S wave. It multiplies the maximum of the detection function level in the Data Window, so should be < 1.0.
Moving Window Fraction This is used to determine significant maxima in the estimation function by using moving averages. The smaller this number, the more maxima will be identified.

DETECT/EST
This is another version of automatic estimation, where now windows are placed around the largest detection regions and single phases are determined. Meaning of variables is same as with AUTO EST above.

UPDATE PICKS
Manual picks and manual edits of picks are automatically updated in the pick file in memory, but those from maximum estimates and automatic estimates are not added until UPDATE PICKS is selected. This is to prevent a lot of garbage inadvertantly loading into RAM. Selecting UPDATE PICKS also causes existing picks in RAM to be appended to a backup file called Xphase_backup.picks so that work can be recovered in the event of a program crash. Note, however, that these picks are not saved in their own pick file on disk unless you explicitly write them using WRITE PICKS.

WRITE PICKS
Write picks out to a pick file on disk. The file will be appended to if it already exists.

CORREL
Calculate waveform correlations to determine optimal pick time adjustments. Procedures are described above in the "Waveform Correlation" section.

C-FUNS
Calculate the Cichowicz characteristic function selected in the K function box for data within the data window. Note that some of these functions require the calculation of eigenvectors beforehand - do this with the Eigenvector Canvas Activity.

S-EST
Estimate the S arrival time for selected waveforms based on a Ts-Tp reported by the first selected waveform. The reference waveform is taken as the first selected, and must have a P and S pick. All subsequent waveforms with P picks will have an S arrival time estimated and displayed. The display will show a horizontal bracket with three vertical tick marks corresponding to arrivals calcualted with three different Vp/Vs ratios (vpvs_min, vpvs_pref, and vpvs_max). The intermedate value (vpvs_pref) is used to calculae the travel time of the reference P arrival. Default Vp/Vs values are (1.72, 1.78 and 1.90); these my be reset in the preferences file.

THRESH
THRESH shows you what the background noise levels and different thresholds look like for a given time series. After running "PHASE DETECT", clicking on "CALC THRESHOLD" will cause three horiontal lines to be drawn on the screen (colors in the Black/White scheme - these may be reset by the user):

Red: The noise level, as calculated by [(sum(i=1,n) y(i)**0.25))/n]**4.0
Green: The P threshold (arg.pfact*noise_level)
Blue: The S threshold (arg.sfact*detect_max)

FILTER
Optionally apply either (1) a low and/or high pass IIR filter or (2) an FIR acausal filter to the selected time series. For IIR filters, the user specifies the band and the number of poles. For FIR acausal, the user selects one of several already know filters or a user supplied filter.

PS-DUMP
Makes a PostScript file that reflects the waveforms and other marks that appear on the screen. Note that this is NOT a screendump.

PS-PREF
Allows user to specify preferences for the output of the PostScript file

QUIT
Stop the program.

CANVAS ACTIVITY

There are a variety of functions that can be performed on the Canvas. These are selected using the switch in the third line of the top panel.

Note that there are "Canvas Activity Help" Windows that can be switched on and off using the button on the top panel. These are to help the user remember how to use the different activities.

Zoom:
This allows the user to zoom in on a time section. Move cursor on screen to one end of the desired zoom area, and then press the left mouse button. If you decide not to use this point and want to start over, press the middle or left mouse button. Otherwise, go to the other end and click the right mouse button. The program will zoom to that area.

Zoom-out:
This will "un-zoom" to the previous zoom level. Just put the cursor on the canvas and press the left mouse button.

Locate points on the screen:
This allows numbers to appear on the screen showing the location of the cursor in the local coordinate frame. Pressing and holding down the left mouse button will cause numbers to appear on the screen below a cursor. The first number is the sample, the second is the y pixel positon. Letting go of the button will leave the number stationary on the screen. Hitting the middle key will erase the number from the screen. Hitting the right button will cause a window to appear showing the current postion. You can change this position and hit "OK" to cause a cross to appear at the desired site.

Set Data Window:
Select a window for data processing. Buttons operate as in Zoom function. After pressing right button two green dashed lines will be drawn (if allowed by "VIEW PREFS") showing location of window selected.

Set Noise Window:
Select a window to define "noise". Buttons operate as in Zoom function. After pressing right button two red dashed lines will be drawn (if allowed by "VIEW PREFS") showing location of window selected.

Get Maximum Value:
Show the maximum value of the click-selected data set within a specified window. Select a window as you would in the Zoom function. After pressing right button aa blue dashed line will be drawn (if allowed by "VIEW PREFS") showing location of the maximum within the window selected.

Manual Pick:
Pick a sample on the screen to add to the PICK array. Move cursor to the desired point and click a button. The button you use will determine the pick type as follows:

LeftP arrival Pink
Middle S arrivalRoyal Blue
Right Other arrivalOlive Green

After clicking, a solid line will be drawn showing location of pick with colors as indicated above.

Edit Pick:
Edit picks in the PICK array. To select a pick, move cursor to the desired point and click a button. NOTE: A pick will be drawn on the screen for all waveforms with the same name. HOWEVER, when selecting the pick to edit, you must do so on the last (or bottom) WAVEFORM in which the pick is shown. The button you use will determine the editing function as follows:

Left Delete Pick
Middle Restore Pick
Right Change Pick type

Notes:

  1. When a pick is deleted, a white line is drawn to erase it from the screen. Note that if there is more than one pick at this location, that second pick will still be there, even though it isn't seen! To check, select the DRAW button to draw existing picks on the screen.

  2. The middle button will restore only the most recent deletion.

  3. The right button will cause the pick to change color, reflecting it's change in status. Again, be careful if there is more than one pick at this location!

Edit Uncertanties:
Edit Uncertanties in the PICK array. To select an uncertainty, move cursor to the desired point and click the left button. (SEE NOTE ABOVE ABOUT PICK EDITING FOR A DISCUSSION ABOUT DISPLAY AND SELECTION). When a pair is selected, they will be redrawn as solid black lines. The next button you push will modify the uncertainties selected, as follows:

Middle Unselect
Left Put uncertainty at selected point. If the cursor is left of the pick, this is presumed to be the left uncertainty and right of is right.
Right Have uncertanties revert to the default values.

Delete All P Picks:
All P picks will be deleted when one P Pick is selected with the left button. This is useful for clearing up a lot of phase estimation picks before making a "real" pick.

Delete All S Picks:
All S picks will be deleted when one S Pick is selected with the left button. This is useful for clearing up a lot of phase estimation picks before making a "real" pick.

Quick Pick:
Select Data Window with Left/Right Button. Onset will be estimated for data within in the window. The raw data of the last selected file is used.

Quick Whiten:
Select Noise Window with Left/Right Button. Data of the last selected file will be whitened by this noise.

Get Min Value:
Select the minium value within a window. Select starting point with left mouse button, select end point with right mouse button, and minimum value will be marked by a blue line. Click the middle or left button to undo a selection. Remember this function operates on the CURRENT DATASET.

Whiten Selected:
Depress the left button and all selected data will be whitened by data in the current noise window.

Pick Selected:
Select Data Window with Left/Right button. The data within the window, for all selected wavforms, will be whitened using the current noise window. Then, the onset will be estimated from the whitened data.

Pick Comment:
Select a Pick with the left button. The current pick comment will be displayed, and a new comment may be entered. Close window when done.

Eigenvectors:
Determine the eigenvectors for particle motion within a window. Select a window in the same way as zoom (left mouse, right mouse). Three channels must be selected in order for this to work. The eigenvectors, eigenvalues, and the angles of orientation of the L component (angle of incidence and azimuth) are written to stdout.

Abs/Rel Time:
Switch between absolute and relative time. Relative time is defined by phase picks. After choosing this option, clicking the left mouse button in the screen will toggle between absolute and relative time frames.

KEYBOARD SHORTCUTS

Several functions are easier to do with keyboarding, and Xphase includes some commands that can be actuated with single key strokes The following are shortcuts to "button" commands:

KEYFuntion
hHelp
Prints out a list of current keyboard functions to the screen.
DDelete Current Dataset
Note that pressing this button will delete the current dataset without asking for confirmation, so be careful! The screen will be redrawn each time a dataset is deleted in this fashion.
fDelete all selected datasets.
qQuit Program
?Help
Same as "h".

The following change the current Canvas Activity. Note that with the exception of "Unzoom" all they do is change the activity and wait on the mouse for further instructions.

KEYFuntion
zZoom
ZUnzoom
This will unzoom with each keystroke until the zooms are exhausted.
pLocate points
dData window
nNoise window
xMax value
mManual pick
eEdit Picks
uEdit Uncertainites
PDelete All P Picks
SDelete All S Picks
qQuick Pick
wQuick Whiten
vGet Minimum value
WQuick Whiten with current Noise
kQuick Pick with selected data
cPick Comment
EEigen Values
CCalculate Current Cichowicz
Characteristic Function
FCalculate All Cichowicz
Characteristic Functions
ASwitch between Absolute and Relative Time Frames

The following are IIR and FIR filtering shortcuts:

KEYFuntion
IFIR Acausal Filter using current filter selected
lLow Pass at 0.2 Hz
LLow Pass at 0.5 Hz
hHigh Pass at 0.2 Hz
HHigh Pass at 1.0 Hz
bBand Pass at 0.05-0.5 Hz
BBand Pass at 0.05-0.2 Hz

The following have no equivalent button or canvas activity selection (i.e., they are unique to keystrokes).

KEYFuntion
UUndo
Undo some functions (zoom, unzoom, set data window, set noise window, cross correlation). You can undo the last invocation, and zoom/unzoom can be toggled.
XDelete created data
When typed, all files generated after the initial set of files was read in are deleted. In other words, all Xphase generated files are deleted.
KQuick Pick in Existing Window
Like "k" above, but uses the currently defined window (i.e., does not wait for you to redefine the data window). Be sure to select the data sets to be processed prior to typing "K".
TQuick Pick for many Single Channels
Treats each selected channel individually, and picks a phase within the data window. This function is commonly used on a set of vertical components when an estimate of P arrivals for a network is desired. Typically you would set the noise and data windows first, select the channels for which you desire estimates, then type "T".
VView All
View all the data sets in the current list.
aRelative/Absolute Time
Toggle between relative and absolute time.
sAll Select/Deselect
Toggles between selecting all (viewed) data and delselecting all data.
gRedraw
Redraw the screen. Equivalent to selecting the DRAW button.
rUpgrade picks and delete extraneous files
This is a shortcut that combines the UPGRADE button function and the "X" function (delete created data - see above).
NQuit
Quits without asking for conformation. Picks are appended to a file called "newpicks" prior to quitting.
1-3Roll the Display to the next "N" waveforms (where "N" is between 1 and 3)
When typed, the last "N" waveforms that are currently displayed will be deselected, and the next "N" waveforms will be selected for viewing. The screen is regenerated after the selection is made. This is a useful shortcut for quickly moving through multichannel data. For example, if your data is in groups of three channels, pressing "3" will automatically move on to the next three channels.
Shift-(1-3)Roll the Display back by "N" waveforms (where "N" is between 1 and 3)
Essentially, this will undo a roll forward.
6Display the first 6 waveforms
When typed, the first 6 waveforms in the current list will be displayed

SELECTION BOXES

To the extreme left of each waveform is a rectangular box known as a selection box. This box will be red when the corresponding waveform is selected for processing, and white when it is not. Selecting and unselecting can be accomplished by left-clicking within the box.

The internal order of datasets can be changed by right-clicking within the selection box. The effect is to move the corresponding dataset to the top of the screen (and shifting the ones on top down a notch). It is necessary only to have the waveform in question plotted on the screen to send it to the top of the heap (i.e, you don't have to view all the data at once).

CANVAS HELP

Turning this on (by selecting "Yes") will cause help windows to appear when a canvas operation is attempted.

SCREEN SCALE

The screen scale selection controls the amplitude scaling on the screen. The options are:

All Trace Scale by Individual trace, use whole trace
Windowed Trace Scale by Individual trace, use trace in window
All Data Scale by all data
Windowed Data Scale by all data in window
All EqualSet max and min values the same for all data
Windowed EqualSet max and min values the same for all data in current window
All AbsoluteSet max and min values the same for all data, but make min = -abs(max)
Windowed AbsoluteAs above but only for windowed data.

OPTION WINDOWS

Xphase allows the user to change values of important parameters every time a processing step is started by displaying an interactive window showing the current settings. The utility of this is evident, but often the user already likes all the current values and isn't interested in seeing them repeatedly displayed. The Option Windows toggle allows the user to switch these windows on and off by selecting "Yes" or "No".

Overlay

When set to "Yes", all selected traces are drawn one on top of the other in different colors. If "No", draw each trace individually.

X Axis

The units of the X axis can be shown either as sample number ("Sample") or real time ("Time"). Changes take effect when the next "DRAW" is performed.

K Functions

There are several choices for Cichowicz characteristic functions; see the discussion in the section "Preferences and Defaults". This window allows the user to choose which function will be calculated when the "CICH FUNS" button is selected. Note that some of these functions (the last three on the list) require the computation of eigenvectors prior to their use - this can be done using the "Eigen Vector" Canvas activity (see above for more details).

Absolute and Relative Time

The usual mode of display for Xphase is absolute time, but for a number of applications (overlay, correlation) it is preferable to redefine time relative to some channel-specific indicator. Relative time in Xphase is defined by setting a phase pick (default is first P, but this can be changed in the OPTIONS window) in each channel equal to time 0. The effect is to align all the waves along these picks. If there is no pick, a default offset is chosen which abuts the channel against the left side of the screen.

The program was written so that all operations would be transparent to choice of time frame, and beta testing has not picked up any bugs (yet). This means you can make picks, etc., in either frame and the real time will be preserved.

NOTES ON DETERMING POLARITIES

Xphase attempts to determine the polarity of P arrivals by calculating the average amplitude of some window after the picked arrival (default is two samples; this is a user-defined preference) and comparing it with the picked amplitude. Polarity is set to 1 if later amplitude is greater (up motion), -1 for down motion, and 0 if it is neither up nor down or if the phase in question is not a P wave.

ADVANCED USAGE NOTES

Reviewing Windowed Data

A very common and useful application of Xphase is to review or generate picks for event data that has been windowed from a number of stations in a network. Here are some procedures that I have found useful in making this common task less onerous:

  1. Make an Xphase.prefs file that has a reasonable definition for a noise window.
  2. Read in all of the windowed data at once using (for example) a wild card, along with a relevant pick file if it exists (these could be detections).
  3. Select a station with good SNR to serve as a reference so you can see when P and S arrivals come in and about what they look like. Move the seismograms to the top of the heap by right clicking on the selection boxes. This will allow this example to remain displayed while you scroll through the other stations.
  4. Bring up the second station. To make a pick, select the appropriate channels by left-clicking the selection boxes. Then type a "k" to go into quick-pick mode, and do a left/right click around the suspected arrival. Whitened data and an estimation function will appear at the bottom of the screen.
  5. Decide if you like the pick, or if you prefer something else in the estimation window. When you are satisfied, click the "UPGRADE PICKS" button up update the pick file.
  6. Get rid of the extra datasets by typing "X".
  7. When you are finished with this station, type a "3" (if you are using 3 component data) to move on to the next station.
  8. Select "Write Picks" when you finish the last station to save your work.

Analysis of Continouous DataScope Data

PASSCAL experiments often wind up with continuous data sets in a format similar to DataScope. A useful procedure for working with this data combines DataScope and Xphase/Xest:

  1. Run the data through a phase detector. You could use dbdetect from DataScope, but I prefer Xest. Here's an example call:

    Xest -d -db gh2000302_2000350 -mode 3 -stn BART -tstr "2000-302 00:00:00.000" -tend "2000-302 00:10:00.000"

    This command operated on 10 minutes of data from station BART. The idea is to execute this command many times until the entire time span is covered.

  2. Run the resulting detections through a culling script. I use dbnetdetect by Geoff Abers. The result is a group of "proto-events" that were detected at a given number of stations within a defined time window.
  3. Review these events and pick out the seismic ones. This I do by hand with dbpick.
  4. Run Xest again, this time in estimation mode in windows around the selected "proto-events".
  5. Review the results of Xest using Xphase. Note that it is best to use the multi-channel procedure described above, and to do that you need to have individual station-channel files to read in.
  6. Refine the picks with Xphase, and review the result with dbpick.
  7. Finally do event locations and associations with dbloc2 or similar algorithm.

ON THE TO DO LIST

  1. The phase detection function might use a cross covariance with a typical earthquake waveform rather than an autocovariance.

SEE ALSO

Xest

AUTHOR

Steve Roecker
roecks@rpi.edu

ACKNOWLEDGMENTS

Xphase is an amalgam of different codes of varied heritage. Thanks to Alex Kushnir and his colleagues for allowing me to use their FORTRAN routines. The routines to read segy files and parse arguments were modified from routines in the program "segy2sac" written by Tim Ahern, Jim Fowler and Richard Boaz of PASSCAL. Geoff Abers wrote the routine to read in DataScope files. Finally, some of the code used to produce the PostScript files was adapted from the XY program written long ago by Paul Wessel.

BUG REPORTS

Send bug reports to: roecks@rpi.edu


Go to Table of Contents