deepextractor.generation.glitch_functions¶
Synthetic glitch signal generators.
- The CDVGAN and gengli generators require optional dependencies:
pip install deepextractor[generative]
Module Contents¶
- deepextractor.generation.glitch_functions.generate_chirp(duration, sample_rate=4096, f0_min=1, f0_max=NYQUIST_FREQ, f1_min=1, f1_max=NYQUIST_FREQ)[source]¶
- deepextractor.generation.glitch_functions.generate_sine(duration, sample_rate=4096, freq_min=1, freq_max=NYQUIST_FREQ)[source]¶
- deepextractor.generation.glitch_functions.generate_sine_gaussian(duration, sample_rate=4096, freq_min=1, freq_max=NYQUIST_FREQ)[source]¶
- deepextractor.generation.glitch_functions.generate_gaussian_pulse(duration, sample_rate=4096, fc_min=1, fc_max=NYQUIST_FREQ, bw_min=0.1, bw_max=1.0, bwr_min=-10, bwr_max=0, tpr_min=0.5, tpr_max=2.0)[source]¶
Generate a Gaussian pulse with random parameters.
- Parameters:
duration (float) – Duration in seconds.
sample_rate (int) – Sampling rate in Hz.
fc_min (float) – Range for the center frequency (Hz).
fc_max (float) – Range for the center frequency (Hz).
bw_min (float) – Range for the fractional bandwidth.
bw_max (float) – Range for the fractional bandwidth.
bwr_min (float) – Range for the bandwidth reference level (dB).
bwr_max (float) – Range for the bandwidth reference level (dB).
tpr_min (float) – Range for the taper reference level (dB).
tpr_max (float) – Range for the taper reference level (dB).
- deepextractor.generation.glitch_functions.ringdown(duration, sample_rate=4096, n_signals=1)[source]¶
- deepextractor.generation.glitch_functions.generate_gengli_glitch(ifo)[source]¶
Generate a glitch sample using the gengli library.
Requires the
[generative]optional dependencies:pip install deepextractor[generative]
- deepextractor.generation.glitch_functions.generate_cdvgan_glitch(gtype, cdvgan_generator)[source]¶
Generate a glitch sample using a pretrained CDVGAN TensorFlow model.
- Parameters:
gtype (str) – Glitch type: one of
'blip','tomte','bbh','simplex','uniform'.cdvgan_generator (tf.keras.Model) – The loaded CDVGAN generator model.