proc

module of dascore source

Module containing patch processing routines.

Functions

Name Description
abs Take the absolute value of the patch data.
adaptive_spectral_filter Suppress energy which is not coherent within a window: the AFK filter.
add_distance_to Calculate the distance to “origin” and create new coordinate.
align_to_coord Align (shift) patch dim(s) based on values in a non-dimension coordinate.
angle Return a new patch with the phase angles from the data array.
append_dims Insert dimensions at the end of the patch.
bool_patch Get the boolean value of a patch.
conj Apply the complex conjugate of the patch data.
convert_units Convert the patch data or coordinate units.
coords_from_df Update non-dimensional coordinate of a patch using a dataframe.
correlate Correlate source row/columns in a 2D patch with all other row/columns.
correlate_shift Apply a shift to the patch data to undo correlation in frequency domain.
decimate Decimate a patch along a dimension.
demean Remove the mean along a given dimension of a DASCore patch.
demedian Remove the median along a given dimension of a DASCore patch.
detrend Perform detrending along a given dimension (distance or time) of a patch.
drop_coords Update the coordinates of a patch.
drop_private_coords Drop all private coords in the patch.
dropna Return a patch with nullish values dropped along dimension.
enrich Copy inventory metadata onto a patch.
equals Determine if the current patch equals another.
fillna Return a patch with nullish values replaced by a value.
flip Flip patch data and (optionally coords) along specified dimensions.
full Return an identical patch with the data replaced by fill_value.
gaussian_filter Applies a Gaussian filter along specified dimensions.
get_array Get an array associated with patch data or a coordinate.
get_axis Get the axis corresponding to a Patch dimension. Raise error if not found.
get_coord Get a managed coordinate from the patch.
hampel_filter A Hampel filter implementation useful for removing spikes in data.
imag Return a new patch with the imaginary part of the data array.
interpolate Set coordinates of patch along a dimension using interpolation.
line_mute Mute (zero out) data in a region specified by one or more lines.
make_broadcastable_to Update the coordinates of a patch.
median_filter Apply 2-D median filter.
normalize Normalize a patch along a specified dimension.
notch_filter Apply a second-order IIR notch digital filter on patch’s data.
order Re-order the patch contents based on coordinate values or indices.
pad Pad the patch data along specified dimensions.
pass_filter Apply a Butterworth pass filter (bandpass, highpass, or lowpass).
pipe Pipe the patch to a function.
pow_coord Scale the data by coordinate values raised to a power.
real Return a new patch with the real part of the data array.
reassemble Blend a stack of tiles back into the patch they were cut from.
rename_coords Rename coordinate of Patch.
resample Resample along a single dimension using Fourier Method and interpolation.
roll Roll patch array elements along a given dimension.
rolling Apply a rolling function along a specified dimension.
savgol_filter Applies Savgol filter along specified dimensions.
select Return a subset of the patch.
set_dims Set dimension to non-dimensional coordinate.
set_units Set the units of a patch’s data or coordinates.
simplify_units Simplify the units contained by the patch to base metric units.
slope_filter Filter the patch over certain slopes in the 2D Fourier domain.
slope_mute Apply a mute between specified slopes (eg velocities).
snap_coords Snap coordinates to evenly spaced samples.
sobel_filter Apply a Sobel filter.
sort_coords Sort one or more coordinates.
split_gaps Split the patch into contiguous patches at coordinate gaps.
squeeze Return a new object with len one dimensions flattened.
standardize Standardize data by removing the mean and scaling to unit variance.
taper Taper the ends of the signal.
taper_range Taper a range inside the patch.
tile_apply Apply a function to overlapping windows of the patch.
transpose Transpose the data array to any dimension order desired.
unselect Return the patch outside a selection.
update Return a copy of the Patch with updated data, coords, dims, or attrs.
update_attrs Update patch attrs and return a new Patch.
update_coords Update the coordinates of a patch.
where Return elements from patch where condition is True, else fill with other.
whiten Spectral whitening of a signal.
wiener_filter Apply a Wiener filter to reduce noise in the patch data.

Classes

Name Description
Abs Take the absolute value of the data.
Conj Flip the sign of the imaginary part.
Demean Remove the mean along a dimension.
Imag Keep only the imaginary part of the data.
Normalize Scale each slice along a dimension by a norm of that slice.
Real Keep only the real part of the data.
RenameCoords Give coordinates other names.
Standardize Remove the mean and scale to unit variance along a dimension.
Transpose Put the dimensions of a patch into another order.

Modules

Name Description
aggregate Module for applying aggregations (reductions) along a specified axis.
align Functions to align patches based on some criterion.
basic Basic operations for patches.
coords Processing operations that have much to do with coordinates.
filter dascore Filtering module.
hampel Functionality for Hampel despiking.
inventory Copy metadata from a DASDAE inventory onto a patch.
mute Processing for muting (zeroing) patch data in specified regions.
units Processing functions dealing with units and unit conversions.
wiener Wiener filtering functionality for noise reduction.
resample Module for re-sampling patches.
whiten Spectral whitening.
tile_apply Apply a function to overlapping windows of a patch, and blend them back.
rolling Processing for applying roller operations.
_adaptive_spectral_filter_numba Optional Numba/rocket-fft engine for the two-dimensional adaptive spectral filter.
taper Processing for applying a taper.
correlate Module for calculating cross-correlation over time or distance.
detrend Module for detrending.
adaptive_spectral_filter The adaptive spectral (AFK) filter: every window’s spectrum weighted by a