Command Dictionary - Schlumberger/distpy GitHub Wiki
This is an alphabetical list of the commands in pub_command_set.py, the example JSON is used only for generating the documentation and is not a viable processing flow.
load_data
This command cannot be used with GPU.
abs
Take the absolute value of the input
This command can be used with GPU.
angle
Take the angle of the complex input
This command can be used with GPU.
add
Elementwise sum, the output data-type will be the same as that of the data entering in the in_uid.
This command can be used with GPU.
analytic_signal
Estimate the analytic signal using a locally filtered maximum likelihood method
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
freq
: A frequency in Hz or a wavenumber in 1/m
default : 200.0
window_length
: The length of a filter window in samples
default : 5
This command can be used with GPU.
argmax
Index of the maximum value in each row or column.
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
This command can be used with GPU.
approx_vlf
A weighted average focussed on the central trace, equivalent to a very low pass filter. The results approximate the very low frequency response in a robust way.
This command cannot be used with GPU.
bounded_select
Return a masks within a pair of bounds on the data (e.g. selecting a cluster from k-means results).
min_val
: A lower bound
default : 0.0
max_val
: An upper bound
default : 1.0
This command cannot be used with GPU.
broaden
Broadening of the local maxima, by extending them in time.
window_length
: The length of a filter window in samples
default : 5
This command can be used with GPU.
butter
Setup a Butterworth filter using scipy.signal.butter() and apply it using scipy.signal.filtfilt()
order
: The order for a filter calculation such as the Butterworth filter
default : 5
type
: The type of a filter which can be lowpass, highpass, bandpass, or bandstop
default : lowpass
padtype
: The type of end-effect control on a filter, see scipy.signal.filtfilt
default : even
prf
: The pulse repetition frequency in Hz (one over the time sample rate)
default : 10000
freq
: A frequency in Hz or a wavenumber in 1/m
default : 200.0
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
This command cannot be used with GPU.
clip
Clip the data so that all subsequent operations operate on a small window. If directory_out is specified the new axes will also be created in the storage directory
xaxis
: A numpy vector of distances along the fibre
default : None
taxis
: A numpy vector of times associated with columns of data
default : None
xmin
: A minimum value on the x-axis
default : None
xmax
: A maximum value on the x-axis
default : None
tmin
: A minimum value on the time-axis
default : None
tmax
: A maximum value on the time-axis
default : None
directory_out
: The subdirectory where results will be written
default : NONE
double_ended
: For handling double-ended fibre [-1=single-ended, 0=start-of-fibre half, 1=end-of-fibre half
default : -1
This command can be used with GPU.
conj
Take the complex conjugate value of the input
This command can be used with GPU.
convolve
Convolves the supplied filter with the data.
coeffs
: Filter coefficients
default : [1, 0, -1], [2, 0, -2], 1, 0, -1
mode
: Filter edge handling, see the scipy.ndimage documentation.
default : constant
This command cannot be used with GPU.
copy
Copy the current data block.To minimize memory footprint we inplace overwrite by default as often as possible. Having an explicity copy step allows data to be duplicated when inplace overwrite doesn't make sense.
This command cannot be used with GPU.
correlate
Correlates the supplied filter with the data.
coeffs
: Filter coefficients
default : [0, 0, 1], [0, 1, 0], [1, 0, 0], [0, 1, 0], 0, 0, 1
mode
: Filter edge handling, see the scipy.ndimage documentation.
default : constant
This command cannot be used with GPU.
count_peaks
Couting peaks in a signal using scipy.signal.find_peaks_cwt().
sta
: The short-term average window-length in samples
default : 50
lta
: The long-term average window-length in samples
default : 200
This command cannot be used with GPU.
data_load
Load a npy format file.
directory_out
: The subdirectory where results will be written
default : NONE
filename
: A filename for read or write operations
default : NONE
This command can be used with GPU.
deconvolve
deconvolves the data from gather_uids from the data in the in_uid. Assumes we are in the Fourier domain
This command can be used with GPU.
destripe
Remove vertical stripes from the data using extra_numpy.destripe().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
This command can be used with GPU.
diff
Simple differencing using the window_length as the offset.
window_length
: The length of a filter window in samples
default : 5
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
This command can be used with GPU.
downsample
Downsampling to reduce the data size.
xsample
: The level of downsampling in the x-directioin
default : 1
tsample
: The level of downsampling in the time-direction
default : 1
This command can be used with GPU.
dip_filter
time-space domain dip filter.
velocity
: Phase velocity
default : 100
bandwidth
: Width of the Gaussian ray in pixels
default : 0.1
shape
: Shape of the filter in pixels e.g. [9,9], both values must be even
default : [9, 9]
This command cannot be used with GPU.
down_wave
Calculate the down-going waves using extra_numpy.down_wave(). Note that the data should be 2D FFTd before this command and are returned as complex values.
This command can be used with GPU.
extract
Extracts a single row (axis=0) or column (axis=1) at the specified index, as a separate dataset
index
: The index of a row or column in sanmples
default : 0
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
This command can be used with GPU.
fft
Compute the Fast Fourier Transform (FFT) of the data along the requested axis.
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
This command can be used with GPU.
from_gpu
Put the current result on the CPU and perform subsequent steps there. If no GPU is available, this has no effect.
This command can be used with GPU.
gather
Gathers the data with all the data provided in the gather_uids to make one big matrix
This command can be used with GPU.
gaussian
Applies a 2D Gaussian blurring filter using signal.ndarray.gaussian_filter().
xsigma
: A standard deviation in the x-direction
default : 1.0
tsigma
: A standard deviation in the time direction
default : 1.0
xorder
: In a 2D filter this is the order in the x-direction
default : 5
torder
: In a 2D filter, this is the order in the t-direction
default : 5
This command cannot be used with GPU.
geometric_mean
Take the geometric mean of the input using scipy.stats.gmean().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
This command cannot be used with GPU.
gradient
Numercal gradient of the data via central differencing.
edge_order
: Gradient is calculatd using N-th order accurate differences at the boundaries
default : 1
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
This command cannot be used with GPU.
harmonic_mean
Take the harmonic mean of the input using scipy.stats.hmean().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
This command cannot be used with GPU.
hard_threshold
Applies a hard threshold, all values beyond the threshold are replaced with the supplied value.
direction
: The direction for applying the threshold, > or <
default : >
threshold
: An upper or lower limit
default : 0
value
: A single floating point number
default : 0
This command can be used with GPU.
ifft
Compute the Inverse Fast Fourier Transform (IFFT) of the data along the requested axis.
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
This command can be used with GPU.
keras
Load an existing keras model, and either use it for prediction or train-then-predict.
filename
: A filename for read or write operations
default : NONE
train
: A dictionary containing training parameters for keras, e.g. { 'epochs' : 150, 'batch_size' : 10 }
This command cannot be used with GPU.
kmeans
Perform a KMeans clustering into a fixed number of clusters. Return the cluster number versus depth.
n_clusters
: The number of clusters to use when classifying the data
default : 10
This command cannot be used with GPU.
kurtosis
Take the kurtosis of the input using scipy.stats.kurtosis(). Use k statistics to eliminate bias and omit any NaNs.
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
This command cannot be used with GPU.
lin_transform
Provide two scalars m and c, linearly transform the data y = m*data + c
m
: The slope of a linear transform (y = m*x + c)
default : 1.0
c
: The intercept of a linear transform (y = m*x + c)
default : 0.0
This command can be used with GPU.
macro
Create a macro containing sub-commands
command_list
: A list of sub-commands collected in a single macro
This command cannot be used with GPU.
median_filter
Applies a 2D square median filter using ndimage.median_filter().
distance
: The number of samples in a median filter
default : 3
This command cannot be used with GPU.
mean
Take the mean of the input using numpy.mean().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
This command can be used with GPU.
multiply
Elementwise multiply, the output data-type will be the same as that of the data entering in the in_uid. This data is multiplied by data provided in the gather_uids
This command can be used with GPU.
multiple_calcs
Perform multiple calculations using the extra_numpy.reduced_mem() system.
low_freq
: A list of low frequency values for band-pass windows in Hz
default : None
high_freq
: A list of high frequency values for band-pass windows in Hz
default : None
func
: Either rms_from_fft or te_from_fft
This command can be used with GPU.
peak_to_peak
The maximum peak-to-peak difference with the maximum and minimum separated by less than the defined window_length. This reduces the data from 2D (x,t) to a trace (x).
window_length
: The length of a filter window in samples
default : 5
This command cannot be used with GPU.
rms_from_fft
Calculate the RMS energy between two frequencies.
low_freq
: A list of low frequency values for band-pass windows in Hz
default : None
high_freq
: A list of high frequency values for band-pass windows in Hz
default : None
This command can be used with GPU.
real
Take the real value of the input
This command can be used with GPU.
rescale
Rescale the data from 0 to 1. If an additional data set it suppied, the rescale uses that data for min() and max()
This command can be used with GPU.
roll
Rolls the data along the specified axis, using numpy.roll(). An array can be passed in through gather_uid
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
window_length
: The length of a filter window in samples
default : 1
This command can be used with GPU.
running_mean
A 1D running mean averaging filter, using the extra_numpy.running_mean().
window_length
: The length of a filter window in samples
default : 1
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
This command cannot be used with GPU.
sobel
Applies a Sobel edge detection filter using signal.ndarray.sobel().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 0
mode
: Filter edge handling, see the scipy.ndimage documentation.
default : constant
This command cannot be used with GPU.
soft_threshold
Applies a soft threshold, clipping the values at the given threshold.
direction
: The direction for applying the threshold, > or <
default : >
threshold
: An upper or lower limit
default : 0
This command can be used with GPU.
sum
Sums the data along the specified axis, reducing from 2D to 1D using numpy.sum().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
This command can be used with GPU.
skewness
Take the skewness of the input using scipy.stats.skewn(). Eliminate bias and omit any NaNs.
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
This command cannot be used with GPU.
sta_lta
Short-term average (STA) divided by long-term average (LTA). This transform highlights onset and so often forms part of an automated pick or edge-detection.
sta
: The short-term average window-length in samples
default : 50
lta
: The long-term average window-length in samples
default : 200
This command cannot be used with GPU.
std_dev
Take the standard deviation of the input using numpy.std().
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : 1
This command can be used with GPU.
to_gpu
Put the current result on the GPU and perform subsequent steps there. If no GPU is available, this has no effect.
This command can be used with GPU.
unwrap
Unwrap angles in the selected axis direction using numpy.unwrap
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
This command can be used with GPU.
up_wave
Calculate the up-going waves using extra_numpy.up_wave(). Note that the data should be 2D FFTd before this command and are returned as complex values.
This command can be used with GPU.
velocity_map
Calculate the phase velocity at each pixel in a 2D FFT space.
This command cannot be used with GPU.
velocity_mask
Construct a phase-velocity filter in 2D space. The input should be from the velocity_map command.
min_velocity
: The minimum phase velocity
default : 1400
max_velocity
: The maximum phase velocity
default : 1600
This command cannot be used with GPU.
virtual_cmp
Returns a common midpoint gather based on virtual sources.
axis
: The axis to apply an operation to, typically in distpy axis=0 for depth and axis=1 for time
default : -1
This command cannot be used with GPU.
wiener
2D Wiener filter. See scipy.signal.wiener.
xdir
: Wiener filter length in the x-direction
default : 5
tdir
: Wiener filter length in the t-direction
default : 5
noisePower
: The noise power in the Wiener filter
default : None
This command cannot be used with GPU.
write_npy
Write the current state of the processed data to the npy format.
directory_out
: The subdirectory where results will be written
default : NONE
This command can be used with GPU.
write_witsml
Write out to the WITSML/FBE format, suitable for loading into viewers such as Techlog or Petrel.
directory_out
: The subdirectory where results will be written
default : NONE
xaxis
: A numpy vector of distances along the fibre
default : None
data_style
: A string identifier for the data inside the WITSML file
default : NONE
low_freq
: A list of low frequency values for band-pass windows in Hz
default : None
high_freq
: A list of high frequency values for band-pass windows in Hz
default : None
labels
: A list of column headers
This command cannot be used with GPU.