Correct DelayRecordingTime (delrt)#
Utility script to fix incorrect DelayRecordingTime (delrt) in SEG-Y file(s).
Description#
Utility script to fix incorrect DelayRecordingTimes (delrt) header value in SEG-Y file(s) by comparing maximum amplitudes of neighboring traces in user-defined moving windows (default: 120 samples x 5 traces).
- Extract (multiple) DelayRecordingTimes from SEG-Y trace header
- Find maximum amplitude of reference (center) trace and select data subset based on win_ntracesandwin_nsamples
- Create boolean mask of detected delrt values using difference amplitudes relative to reference amplitude- e.g. [625, 625, 625, 700, 700] (in ms) → [1, 1, 1, 0, 0]
 
- Create boolean mask of delrt values from trace header- e.g. [625, 625, 700, 700, 700] (in ms) → [1, 1, 0, 0, 0]
 
- Compare both masks and update incorrect trace headers- [625, 625, 700, 700, 700] (in ms) → [625, 625, 625, 700, 700] (in ms)
 

Usage#
This script is designed to be used from the terminal (i.e. command line).
Command line interface#
The script can handle three different inputs:
- single SEG-Y file (e.g., filename.sgy)
- datalist of files to process (e.g., datalist.txt)
- directory with input files (e.g., /input_dir)
There are two options to run the script. We recommend using the CLI entry point like:
Alternatively, the script can be executed using the (more verbose) command:
>>> python -m pseudo_3D_interpolation.delrt_correction_segy {filename.sgy | datalist.txt | </directory>} [optional parameters]
Optionally, the following parameters can be specified:
- --help,- -h: Show help.
- --output_dir {DIR}: Output directory (either- --inplaceor- --output_dirare required!).
- --inplace: Replace input data without creating copy (either- --inplaceor- --output_dirare required!).
- --suffix {sgy}: File suffix (default:- sgy). Only used if directory is specified.
- --filename_suffix {SUFFIX}: Filename suffix (e.g.- pad,- static) to filter input files. Only used if directory is specified.
- --txt_suffix {despk}: Suffix to append to output filename (default:- despk).
- --byte_delay {109}: Byte position of input delay times in SEG-Y file(s) (default:- 109).
- --win_nsamples {SAMPLES}: Moving window length in time domain (samples [#]).
- --win_ntraces {TRACES}: Moving window length in offset domain (traces [#]).
- --verbose {LEVEL}: Level of output verbosity (default:- 0).
  
    
      Last update:
      Monday, 03 July 2023 at 09:46:51