mbsegypsd
Section: MB-System 5.0 (1)
Updated: 3 June 2013
Index
NAME
mbsegypsd - Calculates the power spectral densisty function (PSD) of each trace in a segy file, outputting the PSD estimates as a GMT grid file with trace number along the x axis and frequency along the y axis.VERSION
Version 5.0SYNOPSIS
mbsegypsd -Ifile -Oroot [-Ashotscale -Ddecimatex -R -Smode[/start/end[/schan/echan]] -Tsweep[/delay] -Wmode/start/end -H -V]";DESCRIPTION
mbsegypsd calculates the power spectral densisty function (PSD) of each trace in a segy file, outputting the PSD estimates as a grid with trace number along the x axis and frequency along the y axis. The output files are GMT netCDF format grid files.The x-dimension of the grid is determined by the number of traces specified by the -S option and any decimation specified with option -D. If the -S option is not specified, then all of the traces in the segy file will be processed. If the time sweep and delay (if any) are not specified using the -T option, then the sweep and delay will be set so that all trace samples are incorporated into the grid.
The y-dimension of the grid is determined by the sample interval in the time series data. The frequency range runs from zero Hz to a maximum frequency given in Hz by 1/(2*sampleinterval), where the sampleinterval is in seconds. So, for instance, hydrophone data sampled at 26 kHz (26000 samples/second) will have a sample interval of (1/26000 = 0.00003846 seconds). In this case, the PSD will be calculated for frequencies ranging from 0 Hz to 13000 Hz (13 kHz).
For each trace, the PSD will be calculated by ensemble averaging, which means that the trace will be broken up into a number of segments of length nfft (specified with the -N option, default = 1024), a fast-Fourier-transform (FFT) will be calculated for each segment, and the PSD estimate will be the average of the FFT magnitudes over all segments. Before the FFT is calculated, each segment is multiplied by a Hanning (cosine) taper; the PSD estimates are normalized to account for the loss of signal due to the taper application.
The output grid can be either in linear units (Intensity/Hz) or in log-scaled dB/Hz calculated as 20 * log10 (raw-PSD-value). The default is the former, and the -L option causes output in the dB/Hz form.
A shellscript invoking GMT programs to plot the PSD grid is automatically generated.
AUTHORSHIP
David W. Caress (caress@mbari.org)
Monterey Bay Aquarium Research Institute
Dale N. Chayes (dale@ldeo.columbia.edu)
Lamont-Doherty Earth ObservatoryOPTIONS
MBsegypsd Parameters:
Input segy file: 20090922_1833_V3422_S7_CH025ms.segy
Output fileroot: testpsd
Input Parameters:
trace mode: 0
trace start: 0
trace end: 1609
channel start: 1
channel end: 1
trace decimation: 1
time sweep: 2.399968 seconds
time delay: 0.000000 seconds
sample interval: 0.000037 seconds
window mode: 0
window start: 0.000000 seconds
window end: 0.000000 seconds
Output Parameters:
grid filename: testpsd.grd
psd filename: testpsd_psd.txt
x grid dimension: 1610
y grid dimension: 513
grid xmin: -0.500000
grid xmax: 1609.500000
grid ymin: -13.171066
grid ymax: 13500.342448
NaN values used to flag regions with no data
shotscale: 1.000000
frequencyscale: 1.000000
PROCESS read:0 position:0 shot:0 channel:1 2009/265 18:32:59.000 samples:64864 interval:37 usec minmax: -102498.789062 -187.008667
PROCESS read:25 position:25 shot:25 channel:1 2009/265 18:34:14.000 samples:64864 interval:37 usec minmax: -201902.890625 9166.462891
PROCESS read:50 position:50 shot:50 channel:1 2009/265 18:35:29.000 samples:64864 interval:37 usec minmax: -203695.765625 28316.906250
PROCESS read:75 position:75 shot:75 channel:1 2009/265 18:36:44.000 samples:64864 interval:37 usec minmax: -201434.375000 24819.115234
PROCESS read:100 position:100 shot:100 channel:1 2009/265 18:37:59.000 samples:64864 interval:37 usec minmax: -16544.123047 37.462040
............................
PROCESS read:1500 position:1500 shot:1500 channel:1 2009/265 19:47:59.000 samples:64864 interval:37 usec minmax: -8367.179688 -876.420044
PROCESS read:1525 position:1525 shot:1525 channel:1 2009/265 19:49:14.000 samples:64864 interval:37 usec minmax: -9163.580078 201.037201
PROCESS read:1550 position:1550 shot:1550 channel:1 2009/265 19:50:29.000 samples:64864 interval:37 usec minmax: -12128.291016 -993.766357
PROCESS read:1575 position:1575 shot:1575 channel:1 2009/265 19:51:44.000 samples:64864 interval:37 usec minmax: -67764.585938 2457.883789
PROCESS read:1600 position:1600 shot:1600 channel:1 2009/265 19:52:59.000 samples:64864 interval:37 usec minmax: -190216.031250 -14304.720703
.br
.br
The output PSD grid file is named testpsd.grd. A shellscript named
testpsd.grd.cmd is also created that, when executed, will generate a plot of the
sonogram. MBsegypsd also outputs an ascii file containing the average PSD for the
entire segy file in the form of frequency PSD pairs. In this case, the average PSD file
is named testpsd_psd.txt, and has contents like:
0.000000 193.762464
26.342132 99.114274
52.684263 93.781880
79.026395 86.775795
105.368526 80.297280
131.710658 74.908340
158.052790 71.366137
184.394921 70.319082
210.737053 69.840534
237.079184 70.794517
263.421316 72.002905
289.763448 71.979001
316.105579 70.637717
342.447711 69.652364
..............
13329.118592 -13.659568
13355.460724 -13.722928
13381.802855 -12.981740
13408.144987 -12.626286
13434.487119 -12.533222
13460.829250 -13.659002
13487.171382 -24.474310
A shellscript named testpsd_psd.txt.cmd is created that will, when executed, generate
a plot of the average PSD.
Last Updated: 3 June 2013