pycbc.noise package¶
Submodules¶
pycbc.noise.gaussian module¶
This module contains functions to generate gaussian noise colored with a noise spectrum.
-
pycbc.noise.gaussian.
frequency_noise_from_psd
(psd, seed=None)[source]¶ Create noise with a given psd.
Return noise coloured with the given psd. The returned noise FrequencySeries has the same length and frequency step as the given psd. Note that if unique noise is desired a unique seed should be provided.
Parameters: - psd (FrequencySeries) – The noise weighting to color the noise.
- seed ({0, int} or None) – The seed to generate the noise. If None specified, the seed will not be reset.
Returns: noise – A FrequencySeries containing gaussian noise colored by the given psd.
Return type: FrequencySeriesSeries
-
pycbc.noise.gaussian.
noise_from_psd
(length, delta_t, psd, seed=None)[source]¶ Create noise with a given psd.
Return noise with a given psd. Note that if unique noise is desired a unique seed should be provided.
Parameters: - length (int) – The length of noise to generate in samples.
- delta_t (float) – The time step of the noise.
- psd (FrequencySeries) – The noise weighting to color the noise.
- seed ({0, int}) – The seed to generate the noise.
Returns: noise – A TimeSeries containing gaussian noise colored by the given psd.
Return type:
-
pycbc.noise.gaussian.
noise_from_string
(psd_name, length, delta_t, seed=None, low_frequency_cutoff=10.0)[source]¶ Create noise from an analytic PSD
Return noise from the chosen PSD. Note that if unique noise is desired a unique seed should be provided.
Parameters: - psd_name (str) – Name of the analytic PSD to use.
- low_fr –
- length (int) – The length of noise to generate in samples.
- delta_t (float) – The time step of the noise.
- seed ({None, int}) – The seed to generate the noise.
- low_frequency_cutof ({10.0, float}) – The low frequency cutoff to pass to the PSD generation.
Returns: noise – A TimeSeries containing gaussian noise colored by the given psd.
Return type:
pycbc.noise.reproduceable module¶
-
pycbc.noise.reproduceable.
block
(seed)[source]¶ Return block of normal random numbers
Parameters: seed ({None, int}) – The seed to generate the noise.sd Returns: noise – Array of random numbers Return type: numpy.ndarray
-
pycbc.noise.reproduceable.
colored_noise
(psd, start_time, end_time, seed=0, low_frequency_cutoff=1.0)[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: - psd (pycbc.types.FrequencySeries) – PSD 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 nosie
- seed ({None, int}) – The seed to generate the noise.
- low_frequency_cutof ({1.0, float}) – The low frequency cutoff to pass to the PSD generation.
Returns: noise – A TimeSeries containing gaussian noise colored by the given psd.
Return type:
-
pycbc.noise.reproduceable.
noise_from_string
(psd_name, start_time, end_time, seed=0, low_frequency_cutoff=1.0)[source]¶ Create noise from an analytic PSD
Return noise from the chosen PSD. Note that if unique noise is desired a unique seed should be provided.
Parameters: - psd_name (str) – Name of the analytic PSD to use.
- start_time (int) – Start time in GPS seconds to generate noise
- end_time (int) – End time in GPS seconds to generate nosie
- seed ({None, int}) – The seed to generate the noise.
- low_frequency_cutof ({10.0, float}) – The low frequency cutoff to pass to the PSD generation.
Returns: noise – A TimeSeries containing gaussian noise colored by the given psd.
Return type: