MB-System Unix Manual Page

mbsegypsd

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

SYNOPSIS

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

OPTIONS

shotscale
This option causes the x-axis to be rescaled from shot number to distance in meters.
The shotscale value represents the shot spacing in meters.

-D

decimatex
Sets the decimation of traces (decimatex) used in generating the output grid.

-H

This "help" flag cause the program to print out a description
of its operation and then exit immediately.

-I

segyfile
Sets the filename of the input segy seismic data file to be gridded.

-L

Sets the PSD grid output to be in dB/Hz.

-O

root
Sets the filename root for the output GMT netCDF format grid.

-S

mode[/start/end[/schan/echan]]
This option sets the range of traces that are gridded, and thus determines
the x-dimension of the output grid (also impacted by any decimation
specified with -D). If mode = 0, then start and end
refer to shot numbers. This typically is useful for subbottom data or seismic
data in shot gather form. If mode = 1, then start and end
refer to CMP (or RP or CDP) numbers. This typically is useful for seismic
reflection data in stacked or CMP gather forms. If the data are multichannel
seismic reflection or seismic refraction in either shot or CMP gathers, the
start and end of the channels selected for gridding is set using the optional schan
and echan, respectively. The x-dimension of the output grid is determined by
(end - start + 1) * (echan - schan + 1) / decimatex.

-T

sweep[/delay]
The sweep value sets the time range of seismic data to be processed in seconds.
The optional delay value sets the sweep start time, again in seconds.

-V

Normally, mbsegypsd prints out information regarding its
controlling parameters during execution; the
-V option causes the program to also print out statements
indicating its progress.

-W

mode/start/end
This option can be used to limit the data being processed to a particular time
window in various ways. This option does not impact the definition of the overall
grid bounds, but does restrict the data processed to samples within particular times
of interest. If mode = 1, then start and end are simply start and end
times of good data in seconds. If mode = 2, then start and end are relative to
the time of the bottom return. In this case start is often negative so that the
grid shows data above the seafloor, and then down into the subsurface. Finally, if mode = 3,
then start and end are relative to the time corresponding to the sonar
depth.

EXAMPLES

Suppose that one has a segy file of hydrophone data sampled at a
37 microsecond interval, corresponding to a 27027 Hz sampling rate.
Each of 1610 traces consists of 64865 samples. In order to create a
sonogram displaying the power spectral density as a function of
time, execute mbsegypsd as follows:

Here the -N option sets the FFT dimension used to be 1024 samples, which
means that the PSD estimate for each trace is the average of 64865 / 1024 = 63
calculations. The shell output of the program is:

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