sage.data.noise.mlmdc_noise
Filename = Foobar.py Description = Lorem ipsum dolor sit amet
Created on Fri Mar 25 13:06:22 2022
__author__ = nnarenraju __copyright__ = Copyright 2021, ProjectName __credits__ = nnarenraju __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = nnarenraju __email__ = nnarenraju@gmail.com __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]
Github Repository: NULL
Documentation: NULL
Attributes
Classes
Legacy MLGWSC-1 noise generator using PyCBC-coloured Gaussian noise. |
Module Contents
- class NoiseGenerator(dataset, seed=42, delta_f=0.04, sample_rate=2048.0, low_frequency_cutoff=15, detectors=['H1', 'L1'], asds=None)[source]
Bases:
objectLegacy MLGWSC-1 noise generator using PyCBC-coloured Gaussian noise.
Generates noise coloured by amplitude spectral densities (ASDs) for a given dataset type (D1–D4 of MLGWSC-1), reproducing the exact noise model used in the challenge. Noise is generated per-detector with seeded reproducibility via NumPy’s
RandomState.- Parameters:
dataset (str) – Dataset identifier (e.g.
"D1","D2","D3","D4").seed (int) – Master random seed (default
42).delta_f (float) – PSD frequency resolution in Hz (default
0.04).sample_rate (float) – Sample rate in Hz (default
2048.0).low_frequency_cutoff (float) – High-pass cutoff; PSD bins below this are zeroed (default
15).detectors (list[str]) – Detector names (default
['H1', 'L1']).asds (dict or None) – Pre-loaded ASD objects; if
Nonethey are computed from the dataset type.
- get(start, end, generate_duration=None)[source]
Generate coloured noise for all detectors for the requested GPS interval.
- Parameters:
- Returns:
Per-detector coloured-noise time-series.
- Return type:
- colored_noise(asd, start_time, end_time, seed=42, sample_rate=2048.0, filter_duration=128)[source]
Create noise from a PSD
Return noise from the chosen PSD. Note that if unique noise is desired a unique seed should be provided.
- Parameters:
asd (pycbc.types.FrequencySeries) – ASD to color the noise
start_time (int) – Start time in GPS seconds to generate noise
end_time (int) – End time in GPS seconds to generate noise
seed ({None, int}) – The seed to generate the noise.
sample_rate ({16384, float}) – The sample rate of the output data. Keep constant if you want to ensure continuity between disjoint time spans.
filter_duration ({128, float}) – The duration in seconds of the coloring filter
- Returns:
noise – A TimeSeries containing gaussian noise colored by the given psd.
- Return type:
TimeSeries
- normal(start, end, sample_rate=2048.0, seed=0)[source]
Generate data with a white Gaussian (normal) distribution
- Parameters:
start_time (int) – Start time in GPS seconds to generate noise
end_time (int) – End time in GPS seconds to generate noise
sample-rate (float) – Sample rate to generate the data at. Keep constant if you want to ensure continuity between disjoint time spans.
seed ({None, int}) – The seed to generate the noise.
- Returns:
noise – A TimeSeries containing gaussian noise
- Return type:
TimeSeries