data_operations#

Back to API tree index

Purpose#

PSD estimation, whitening, and glitch/line mitigation utilities.

Module summary#

No module-level description available.

Top-level functions#

Function

Summary

asd_func

Returns function that takes frequencies in Hz and gives the interpolated ASD in units of 1/Hz^0.5

band_eraser

Detects bandlimited excess power transients

calculate_excess_power

Returns samples of excess power with and without a rolling average

calculate_sine_gaussian_overlaps

Returns sine gaussian scores

chunkedfft

Returns FFTs of chunks of data for overlap-save. Coordinates assumed dimensionless, as in DFT

data_to_asdfunc

Passes the data to welch and returns a function that maps frequencies to ASD

define_crude_line_mask

Marks lines in the PSD with zeros, errs on the side of marking lines

define_crude_line_mask_v2

Function to flag lines in the PSD, errs on the side of marking lines

fill_hole_consecutive

fill_holes_bruteforce

fill_holes_file

fill_holes_segment

Fill holes in a segment of data

find_excess_power_transients

Detects bandlimited excess power transients

find_sine_gaussian_transients

Finds sine-gaussian transients in data

find_whitened_outliers

Zeros mask in place on either side of outliers in whitened data stream

gen_whitened_notched_strain

Whiten and notch, modify strain_wt_down in place, and perhaps identify varying lines in mask_freqs

loaddata

Load data Warning: 1. Assumes that the quality flags are sampled at 1 Hz 2. Assumes that the sampling rate of data is an integer # TODO: If mask is too intermittent, make it flat since it is unreliable…

makeasdplots

Makes comparison plots of ASDs with the data-derived one

median_bias

Returns the bias of the median of a set of periodograms relative to the mean. See arXiv:gr-qc/0509116 Appendix B for details.

norm_matched_filter_overlap

Computes matched filter overlap for a sliding template. Coordinates assumed dimensionless, as in DFT.

overlap_save

Convolution with the overlap-save method. Look at the modes in chunkedfft to understand what transients are captured at the edges Coordinates assumed dimensionless, as in DFT Note: Overlap-save is only justified when the window is strictly compact and contained within wl

process_data

Preferably send in 2\*\*N samples

robust_power_filter

scipy_12_welch

Cheating to copy Scipy 1.2’s Welch method, to access the average attribute Note: Assumes fs is an integer in converting times to mask indices

specgram_quality

Computes specgram of whitened data, along with list of bad time and frequency channels in the specgram (bad time channels are windows that overlap with zeros in mask, and bad frequency channels are varying lines or those beyond the analysis range)

update_masks

Convenience function to update a mask in a range, record where we nulled, and avoid some regions if needed

No public classes were found.