deepextractor.generation.glitch_functions ========================================= .. py:module:: deepextractor.generation.glitch_functions .. autoapi-nested-parse:: Synthetic glitch signal generators. The CDVGAN and gengli generators require optional dependencies: pip install deepextractor[generative] Module Contents --------------- .. py:data:: SRATE :value: 4096 .. py:data:: NYQUIST_FREQ :value: 2048 .. py:function:: generate_chirp(duration, sample_rate=4096, f0_min=1, f0_max=NYQUIST_FREQ, f1_min=1, f1_max=NYQUIST_FREQ) .. py:function:: generate_sine(duration, sample_rate=4096, freq_min=1, freq_max=NYQUIST_FREQ) .. py:function:: generate_sine_gaussian(duration, sample_rate=4096, freq_min=1, freq_max=NYQUIST_FREQ) .. py:function:: 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) Generate a Gaussian pulse with random parameters. :param duration: Duration in seconds. :type duration: float :param sample_rate: Sampling rate in Hz. :type sample_rate: int :param fc_min: Range for the center frequency (Hz). :type fc_min: float :param fc_max: Range for the center frequency (Hz). :type fc_max: float :param bw_min: Range for the fractional bandwidth. :type bw_min: float :param bw_max: Range for the fractional bandwidth. :type bw_max: float :param bwr_min: Range for the bandwidth reference level (dB). :type bwr_min: float :param bwr_max: Range for the bandwidth reference level (dB). :type bwr_max: float :param tpr_min: Range for the taper reference level (dB). :type tpr_min: float :param tpr_max: Range for the taper reference level (dB). :type tpr_max: float .. py:function:: ringdown(duration, sample_rate=4096, n_signals=1) .. py:function:: generate_gengli_glitch(ifo) Generate a glitch sample using the gengli library. Requires the ``[generative]`` optional dependencies: ``pip install deepextractor[generative]`` .. py:function:: generate_cdvgan_glitch(gtype, cdvgan_generator) Generate a glitch sample using a pretrained CDVGAN TensorFlow model. :param gtype: Glitch type: one of ``'blip'``, ``'tomte'``, ``'bbh'``, ``'simplex'``, ``'uniform'``. :type gtype: str :param cdvgan_generator: The loaded CDVGAN generator model. :type cdvgan_generator: tf.keras.Model