Readme

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 11

====================================================================== U. S. Department of the Interior, U. S.

Geological Survey pick_sw: A Program for Interactive Picking of S-Wave Refraction Data Karl J. Ellefsen Open File Report 00-020 URL: http://greenwood.cr.usgs.gov/pub/open-file-reports/ofr-00-0020/ ====================================================================== 1. Overview Program 'pick_sw' is used to interactively pick travel times from s-wave refraction data. In addition, the seismograms, the travel times, and the spread can be plotted on the computer screen or printed, in postscript format, in a file. The program is written in the IDL programming language, and it is executed, in command-line mode, within the IDL program. The IDL program must be run from an X-window terminal that is connected to a computer with the Unix operating system. The data must be in the SU format. This file 'README.TXT' describes (a) The contents and organization of the tape archive file (section 2). (b) Program 'pick_sw', its installation, its execution, and the SU data format (section 3). (c) A crosswell data set and the results of processing it (section 4). (d) The address of Research Systems, Inc., which distributes IDL (section 5). (e) Information about obtaining the SU software package (section 6). If you find any errors or if you have any suggestions for improving the program, please contact: Karl J. Ellefsen U. S. Geological Survey MS 964, Box 25046 Denver, CO 80225 telephone: 303-236-7032 email: ellefsen@usgs.gov ====================================================================== 2. Contents and Organization of the Tape Archive File The name of the tape archive file (tar file) is 'pick_sw.TAR', and its contents can be viewed with the Unix command: 'tar tvf pick_sw.TAR'. In the top level of the tar file is 'README.TXT' --- a copy of this text file. The tar file also contains two directories. In directory 'pick_sw' are 19 files needed to execute the program and to install the software. All 19 files are described in section 3.1. In directory 'test_data' are 18 files that are either input to or output from program 'pick_sw'. All 18 files are described in section 4. ====================================================================== 3. Program 'pick_sw'

3.1 Program files In the directory 'pick_sw' are 19 different files. Of these, 18 files contain the computer code needed to run program 'pick_sw': File Name ---------------pick_sw.pro openfile.pro extract_name.pro Short Description ----------------------------------------------Controls the main menu. Reads the information file; checks the data (seismogram) files; and reads the file with the travel times (if it exists). Extracts the file name from the path plus the file name. For example, if the path plus the file name is '/user/john_doe/data/143.su', the extracted file name is '143.su'. Saves the travel times in a file. Saves the travel times, the source locations, and the receiver locations in files that can be read by program SIP (Rimrock Geophysics Inc., 1995). Controls the menu for picking the travel times. Controls the plotting of the seismograms. Plots the seismograms to the computer screen or prints the seismograms to a file. Controls the selection of a scaling factor that is applied to the seismograms when they are plotted or printed. Controls the plotting of the travel times. Plots the travel times to the computer screen or prints them in a file. Controls the plotting of the spread. Plots the spread to the computer screen or prints the spread in a file. Resizes the graphics (drawing) window. Creates windows with which the user selects the data (seismogram) files to be read; reads those files. Contains information about the various options in program 'pick_sw'. This file is ascii text, and so it can be readily printed. File containing all (c language) functions called by 'openfile.pro', 'savetimes.pro', 'savesipt.pro', and 'read_data.pro'. File with the (c language) structure of the trace header. This file is an 'include file', which is incorporated into fnc_pick_sw.c when it is compiled. This structure is for the SU format.

savetimes.pro savesip.pro

pick_wid.pro seis_wid.pro plot_seis.pro seis_scale.pro tt_wid.pro plot_tt.pro spread_wid.pro plot_spread.pro resize_win.pro read_data.pro Help fnc_pick_sw.c su_head.h

There is one more file that may be helpful during the installation of the program: shell.compile. This is a shell program that compiles 'fnc_pick_sw.c' and then converts it to a shareable object. This program was written for a Sun SPARC operating system; for other operating systems, 'shell.compile' must be modified. ---------------------------------------------------------------------3.2 Installation The installation requires four steps:

1. Copy the tar file to a suitable directory on the Unix computer. Extract the contents of the tar file using the command: 'tar xf pick_sw.TAR'. Make the current directory 'pick_sw'. 2. Load procedure 'pick_sw.pro' into an editor and go to line 151. Line 151 and the next eight lines are: ; ; ; Initialization of variables that are used in all procedures These five variables may require modification for different data sets and different installations of the code.

FILENAME_MAX = 80L N_TRACE_MAX = 48L N_SHOT_MAX = 16L N_SAMP_MAX = 4096L pgm_dir = '/musette/u/ellefsen/seismic/process/pick_sw/' Variable 'FILENAME_MAX' is the maximum length of a file name; variable 'N_TRACES_MAX' is the maximum number of traces (seismograms) in a data file; variable 'N_SHOT_MAX' is the maximum number of shots; and variable 'N_SAMP_MAX' is the maximum number of samples in a seismogram. (The number of seismograms must equal the number of receivers.) The values shown above are large enough for most data sets encountered in practice. In some rare cases, however, even larger values might needed. If the values are changed, be sure to append an 'L' to the number. (The 'L' indicates that the number is a long integer.) Variable 'pgm_dir' is the directory with the files needed to run program 'pick_sw'. This variable is used, during execution, to set the path and to locate the shareable object. When changing this variable, be sure to include the slashes '/' at the beginning and the end. 3. If any of the variables 'FILENAME_MAX', 'N_TRACE_MAX', 'N_SHOT_MAX' or 'N_SAMP_MAX' were changed, then load function 'fnc_pick_sw.c' into an editor and go to line 32. Line 32 and the next three lines are: #define #define #define #define N_TRACE_MAX N_SHOT_MAX FILENAME_MAX N_SAMP_MAX 48 16 80 4096

These c macros correspond to the IDL variables described above. If the IDL variables were changed, then change these macros accordingly. 4. Compile function fnc_pick_sw.c and load it as a shareable object. If the operating system is a Sun SPARC with an ANSI C compiler, then this step can be done using the shell program 'shell.compile'. For other operating systems, consult p. 106-112 of 'The External Development Guide', version 5.1, (1998). ---------------------------------------------------------------------3.3 Input Data 3.3.1 Information File

This file contains information about the receiver locations, the shot locations, the pairing of the shots with opposite polarities, etc. The format of this file is described using 'btr028.info' as an example. (This file is from directory 'test_data'.) This is the file: Spread name: btr028 Number of receivers = 24 Rec. No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Location (m) x y 1. 0. 2. 0. 3. 0. 4. 0. 5. 0. 6. 0. 7. 0. 8. 0. 9. 0. 10. 0. 11. 0. 12. 0. 13. 0. 14. 0. 15. 0. 16. 0. 17. 0. 18. 0. 19. 0. 20. 0. 21. 0. 22. 0. 23. 0. 24. 0. z 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.

Number of shots = 8 Shot No. 1 2 3 4 5 6 7 8 Location (m) x y 25. 0. 25. 0. 0. 0. 0. 0. -12. 0. -12. 0. 37. 0. 37. 0. z 0. 0. 0. 0. 0. 0. 0. 0. Seismogram File 11510.su 12510.su 13510.su 14510.su 15510.su 16510.su 17510.su 18510.su

File name for travel times: btr028.pick Because all entries in this file are labeled, only a few remarks are necessary. The spread name and the filename for the travel times must consist of fewer characters than the value of variable 'FILENAME_MAX', which is described in section 3.2. The number of receivers and the number of shots must be less than the values of variables 'N_TRACE_MAX' and 'N_SHOT_MAX', both of which are described in section 3.2.

The number of shots must be even because s-wave refraction data are collected with both polarities of the source. The polarities are indicated by the order of the shots in the information file: Shots 1 and 2 have the same location but different polarities; likewise, shots 3 and 4 have the same location but different polarities; etc. The program checks that shots 1 and 2 have the same location, that shots 3 and 4 have the same location, etc. The coordinate system used to specify the locations of the receivers and the shots does not affect the picking of the travel times. It does, however, affect the plots of the spread and the traveltimes (sections 4.4 and 4.5, respectively). In addition, the locations are are used in program 'SIP'. For 'pick_sw' and 'SIP', the coordinate system should be oriented such that the x axis is parallel to the spread, the y axis is perpendicular to the spread, and the z axis is vertical. (The coordinate system is right-handed.) The origin of the coordinate system is arbitrary. Thus, for a given receiver or shot, x refers its distance along the spread, y to its offset from the spread, and z to its elevation. When editing the information file, be sure to retain all labels such as 'Spread name:', 'Number of receivers =', etc. Be sure that the number of receivers equals the number in the list of receivers. Likewise, be sure that the number of shots equals the number in the list of shots. The suffix in the file name for the travel times should not be '.pik' because this is used for the input to program SIP. 3.3.2 Seismic Data The seismic data must be in the SU format. With this format, the data are stored in a binary file; this file consists of records, one record for each trace (seismogram). Each record has two parts: the header and the trace itself. Details about this format can be gleaned from studying functions 'read_su_header' and 'read_su_traces', both of which are in 'fnc_pick_sw.c'. Also study the trace header itself, whose structure is in file 'su_header.h'. (To read data in another format, modify functions 'idl_read_su_header', 'read_su_header', 'idl_read_su_traces', and 'read_su_traces', all of which are all in 'fnc_pick_sw.c'.) Program 'pick_sw' executes properly if two conditions on the data are met. First, the file name for the data must have the suffix '.su'. For example, a suitable file name is '11510.su'. Second, two items must be set in each trace header: Item ---ns dt Description ----------Number of samples in trace Sample rate in micro-seconds

3.3.3 File with travel time picks Frequently, re-examining the picks of travel times is necessary. For this reason, program 'pick_sw' always looks for the file with the travel times, whose name is specified in the information file (section 3.3.1). If the file exists, then it is read. Otherwise, the travel times are set to zero. The format of this file is described using 'btr028.pick' as an example. (This file is from directory 'test_data'.) This is the file:

Spread name: btr028 Rec. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Shot 1 & 2 9.600e-02 9.450e-02 9.260e-02 9.110e-02 8.950e-02 8.780e-02 8.610e-02 8.420e-02 8.280e-02 8.120e-02 7.930e-02 7.750e-02 7.560e-02 7.010e-02 6.390e-02 5.610e-02 4.960e-02 4.370e-02 3.830e-02 3.250e-02 2.650e-02 2.060e-02 1.390e-02 8.800e-03 3 & 4 8.600e-03 1.540e-02 2.130e-02 2.780e-02 3.440e-02 4.080e-02 4.760e-02 5.400e-02 6.030e-02 6.630e-02 6.990e-02 7.190e-02 7.430e-02 7.600e-02 7.800e-02 8.010e-02 8.210e-02 8.390e-02 8.600e-02 8.780e-02 8.970e-02 9.160e-02 9.370e-02 9.540e-02 5 & 6 6.850e-02 7.090e-02 7.320e-02 7.500e-02 7.670e-02 7.910e-02 8.140e-02 8.320e-02 8.550e-02 8.790e-02 8.960e-02 9.300e-02 9.500e-02 9.680e-02 9.900e-02 1.010e-01 1.029e-01 1.051e-01 1.071e-01 1.077e-01 1.086e-01 1.094e-01 1.100e-01 1.109e-01 7 & 8 1.138e-01 1.125e-01 1.116e-01 1.104e-01 1.100e-01 1.091e-01 1.081e-01 1.078e-01 1.065e-01 1.049e-01 1.039e-01 1.019e-01 1.001e-01 9.800e-02 9.620e-02 9.340e-02 9.140e-02 8.920e-02 8.700e-02 8.480e-02 8.300e-02 8.050e-02 7.850e-02 7.640e-02

In the table, the first column is the receiver number. Each of the remaining columns contains the travel times (in seconds) for two shots having the same location but different polarity. For example, the second column is for shots 1 and 2, both of which are at x = 25., y = 0., and z = 0. (The locations are from the information file, which is described in section 3.3.1.) ---------------------------------------------------------------------3.4 Execution To begin execution of the program, there are four steps: 1. Make the current directory that files) and the information file described in sections 3.3.1 and environment to be sure that the current X-window terminal. in which the data (seismogram are stored. (These files are 3.3.2.) Check the shell display argument is set to the

2. Type 'idl', to load the IDL program. 3. At the prompt 'IDL>', type '.compile XXX/pick_sw' where XXX is the directory in which 'pick_sw.pro' is located. 4. If the X-window terminal is actually a PC running an X-window emulation program and if the color system is 'true color', then, at the prompt, type the command 'device, decompose=0'. This command causes IDL to send the proper color index values to the PC. For more information see Reference Guide, vol. 1, IDL Version 5.1, (1998, p. 98).

5. At the prompt 'IDL>', type 'pick_sw' to begin execution. The look and feel of the program is similar to that of most windows programs, and so most users will readily figure-out how the progam works. If a question arises, users can get an answer in the 'Help' documentation, which is loaded when the 'Help' button is pressed. Each option within program 'pick_sw' causes one or more windows to appear on the X-windows terminal. The locations at which these windows appear is determined by the software controlling the terminal. Thus, these locations vary. When two or more windows appear, one window may be partially obscured by another. This problem can be easily fixed by moving the windows. 6. To exit from program 'pick_sw', select, on the main menu, the button 'File' and then select on the submenu the button 'Exit'. At the prompt 'IDL>', type 'exit'. ====================================================================== 4. Test Data In directory 'test_data' are 18 files, which may be used to test whether program 'pick_sw' is properly installed. The 18 files are described in sections 4.1 through 4.8. ---------------------------------------------------------------------4.1 File 'btr028.info': Information File This information file is setup for some s-wave refraction data collected by A. Barnett and K. J. Ellefsen from the U. S. Geological Survey. These data were collected in the Big Tompson river valley, which is near Loveland, Colorado. The alluvial sediments, which consist mostly of sands and gravels, are about 11 meters thick, and the bedrock is shale. The seismic spread consisted of 24 geophones and 8 shots. The 8 shots were at 4 different locations at which both polarities of the source were used. Details about the format of this file are in section 3.3.1. ---------------------------------------------------------------------4.2 Files '11510.su', '12510.su', '13510.su', '14510.su', '15510.su', '16510.su', '17510.su', '18510.su': S-Wave Refraction Data These eight files contain the seismic data stored in the SU format (section 3.3.2). For files '11510.su' and '12510.su', the shots were in the same location, but the polarity differed. Files '13510.su' and '14510.su', '15510.su' and '16510.su', '17510.su' and '18510.su' are similarly related. Each file contains 24 seismograms (traces), each of which consists of 4096 samples. The sample rate is 0.1 milli-seconds. ---------------------------------------------------------------------4.3 File 'btr028.pick': Travel Times Using program 'pick_sw', travel times were picked for the s-wave refraction data (section 4.2) and were written in file 'btr028.pick'. Details about the format of this file are in section 3.3.3.

---------------------------------------------------------------------4.4 File 'btr028_spd.ps': Plot of the Spread In the plot, the abscissa and the ordinate are the distances in the x and y directions, respectively. (These distances are obtained from the information file (section 3.3.1).) Each rectangle represents two shots, having the same location but opposite polarity. The rectangle is plotted at the location of the two shots. Each label adjacent to a rectangle indicates the shot number and the name of the file with the seismograms. Each circle represents a receiver (geophone); the circle is plotted at the location of the receiver. Only the odd receiver numbers are shown. The file is in postscript format. ---------------------------------------------------------------------4.5 File 'btr028_tt.ps': Plot of the Travel Times In the plot, the ordinate is the travel time, and the abscissa is the distance in the x direction. The circles represent travel times, the rectangles along the abscissa represent shot locations. The file is in postscript format. ---------------------------------------------------------------------4.6 File 'btr028_12sg.ps': Plot of the Seismograms for Shots 1 and 2 The seismograms are plotted horizontally --- the horizonal axis corresponds to time. The first seismogram is at the bottom, and the last seismogram is at the top. ('First' and 'last' refer to the first and the last seismograms from the data file.) The small vertical line for each pair of seismograms indicates the travel time. The file is in postscript format. ---------------------------------------------------------------------4.7 Files 'btr02801.pik', 'btr02803.pik', 'btr02805.pik', and 'btr02807.pik',: Travel Times for SIP Using program 'pick_sw', travel times were picked for the s-wave refraction data (section 4.2) and were written into these 4 files that can be read by program SIP. There are 4 files because there were 4 different shot locations. The shot information is coded into the last two digits of the main part of the file name: For file 'btr02801.pik', these two digits are '01', indicating that this file is for shots 1 and 2; for file 'btr02803.pik', these two digits are '03', indicating that this file is for shots 3 and 4; etc. The format of all 4 files is similar, and so the format of only one file, 'btr02801.pik', is described. This is the file: SP 1 2 3 4 5 6 7 8 9 10 11 12 25.0 m 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 Line btr028 96.0 ms 94.5 92.6 91.1 89.5 87.8 86.1 84.2 82.8 81.2 79.3 77.5

13 14 15 16 17 18 19 20 21 22 23 24 ^Z

13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0

75.6 70.1 63.9 56.1 49.6 43.7 38.3 32.5 26.5 20.6 13.9 8.8

The first line in the file indicates that these times are for the two shots at 25.0 m (x distance) in line (spread) 'btr028'. The first column in the table is an index for the receiver; the second column is the location (x distance) of the receiver; and the third column is the time in milli-seconds. The last character '^Z' indicates, to the SIP program, that the end of the file has been reached. ---------------------------------------------------------------------4.8 File 'btr028.prn': Source and Receiver Locations for SIP Using program 'pick_sw', travel times were picked for the s-wave refraction data (section 4.2) and were written into files that can be read by program SIP (section 4.7). When these were written, the source and the receiver locations were also written. This is the file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 SP-1 SP-3 SP-5 SP-7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 0.0 -12.0 37.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

In the first column are the receiver numbers and the shot numbers. (The shot numbers are indicated by the prefix 'SP-'. Recall that

shots 1 and 2, for example, have the same location. Thus, only the location for shot 1 is listed. For the same reason, only the locations for shots 3, 5, and 7 are listed.) In the second, third, and fourth columns are the elevations, the x distances along the spread, and the y offsets from the spread, respectively. ====================================================================== 5. IDL IDL (Interactive Data Language) is designed especially for interactive visualization of scientific and technical data. To execute program 'pick_sw', IDL (version 5.0 or higher for Unix operating systems) must be installed. IDL is not supplied in this tar file; it may be purchased from Research Systems, Inc. 4990 East Pearl Circle Boulder, Colorado 80301 Telephone: 303.786.9900 Email: info@rsinc.com Internet: http://www.rsinc.com ====================================================================== 7. SU 'SU' means Seismic Unix --- it is a software package for processing and displaying seismic data, and it runs on computers with the Unix operating system and X-windows. The package is free and can be obtained from the anonymous ftp site at the Colorado School of Mines: ftp.cwp.mines.edu (138.67.12.4). Questions about the software package should be addressed to John Stockwell Center for Wave Phenomena Colorado School of Mines Golden, CO 80401 Telephone: 303-273-3049 Email: john@dix.mines.edu ====================================================================== 7. Disclaimer This open-file report was prepared by an agency of the United States Government. Neither the United States Government nor any agency thereof nor any of their employees makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed in this report or represents that its use would not infringe privately owned rights. Reference therein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof. Although all data and software in this open-file report have been used by the USGS, no warranty, expressed or implied, is made by the USGS as to the accuracy of the data and related materials and (or) the

functioning of the software. The act of distribution shall not constitute any such warranty, and no responsibility is assumed by the USGS in the use of these data, software, or related materials. ====================================================================== 8. Acknowledgements This work was supported by the project 'Minerals Information and Technology for Infrastructure Resource Assessment' within the U. S. Geological Survey. ====================================================================== 9. References Cohen, J. K., and Stockwell, Jr., J. W., 1999, CWP/SU: Seismic Unix release 33: A free package for seismic reseach and processing, Center for Wave Phenomenon, Colorado School of Mines. External Development Guide, IDL Version 5.1, 1998, Boulder, Colorado: Research Systems, Inc., 324 p. Reference Guide, vol. 1, IDL Version 5.1, 1998, Boulder, Colorado: Research Systems, Inc., 739 p. Rimrock Geophysics Inc., 1995, Seismic Refraction Interpretation Programs: available from Rimrock Geophysics Inc., 12372 W. Louisiana Ave., Lakewood, CO 80228 (telephone/fax: 303-985-2522) ======================================================================

You might also like