sage.utils.get_testdata_snr
Filename = Foobar.py Description = Lorem ipsum dolor sit amet
Created on Tue Jan 17 14:59:18 2023
__author__ = nnarenraju __copyright__ = Copyright 2022, 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
Functions
|
Iteratively lower the starting frequency until the waveform reaches |
|
Compute the optimal (matched-filter) network SNR for a single injection. |
|
injparams = {} |
Module Contents
- optimise_fmin(h_pol, signal_length, signal_low_freq_cutoff, sample_rate, waveform_kwargs)[source]
Iteratively lower the starting frequency until the waveform reaches
signal_length.- Parameters:
h_pol (pycbc.TimeSeries) – Current polarisation (h_plus or h_cross) used to estimate the required frequency adjustment.
signal_length (float) – Required waveform duration in seconds.
signal_low_freq_cutoff (float) – Original low-frequency cutoff (Hz); used as the starting estimate.
sample_rate (float) – Sample rate (Hz).
waveform_kwargs (dict) – Keyword arguments passed to
pycbc.waveform.get_td_waveform(). Updated in-place with the adjustedf_lower.
- Returns:
h_plus, h_cross – Re-generated waveform meeting the duration requirement.
- Return type:
pycbc.TimeSeries
- get_injection_snr(args)[source]
Compute the optimal (matched-filter) network SNR for a single injection.
- get_snrs(injection_file, data_cfg, dataset_dir=None)[source]
injparams = {} with h5py.File(injection_file, ‘r’) as fp:
params = list(fp.keys()) for param in params:
injparams[param] = fp[param][()]
injlen = len(injparams[‘tc’]) # Add injection times into injparams injparams[‘injection_time’] = injparams[‘tc’] injparams[‘tc’] = np.random.uniform(11.0, 11.2, injlen)