gwsnr.numba

Submodules

Package Contents

Functions

findchirp_chirptime(m1, m2, fmin)

Time taken from f_min to f_lso (last stable orbit). 3.5PN in fourier phase considered.

antenna_response_plus(ra, dec, time, psi, detector_tensor)

Function to calculate the antenna response

antenna_response_cross(ra, dec, time, psi, detector_tensor)

Function to calculate the antenna response

antenna_response_array(ra, dec, time, psi, detector_tensor)

Function to calculate the antenna response in array form.

noise_weighted_inner_product(signal1, signal2, psd, ...)

Noise weighted inner product of two time series data sets.

effective_distance(luminosity_distance, theta_jn, ra, ...)

Function to calculate the effective distance of the source.

effective_distance_array(luminosity_distance, ...)

Function to calculate the effective distance of the source in array form.

linear_interpolator(xnew_array, y_array, x_array[, ...])

Linear interpolator for 1D data.

get_interpolated_snr_aligned_spins_numba(mass_1, ...)

get_interpolated_snr_no_spins_numba(mass_1, mass_2, ...)

gwsnr.numba.findchirp_chirptime(m1, m2, fmin)[source]

Time taken from f_min to f_lso (last stable orbit). 3.5PN in fourier phase considered.

Parameters:
m1float

Mass of the first body in solar masses.

m2float

Mass of the second body in solar masses.

fminfloat

Lower frequency cutoff.

Returns:
chirp_timefloat

Time taken from f_min to f_lso (last stable orbit frequency).

gwsnr.numba.antenna_response_plus(ra, dec, time, psi, detector_tensor)[source]

Function to calculate the antenna response

Parameters:
rafloat

Right ascension of the source in radians.

decfloat

Declination of the source in radians.

timefloat

GPS time of the source.

psifloat

Polarization angle of the source.

detector_tensorarray-like

Detector tensor for the detector (3x3 matrix)

modestr

Mode of the polarization. Default is ‘plus’.

Returns:
antenna_response: float

Antenna response of the detector.

gwsnr.numba.antenna_response_cross(ra, dec, time, psi, detector_tensor)[source]

Function to calculate the antenna response

Parameters:
rafloat

Right ascension of the source in radians.

decfloat

Declination of the source in radians.

timefloat

GPS time of the source.

psifloat

Polarization angle of the source.

detector_tensorarray-like

Detector tensor for the detector (3x3 matrix)

modestr

Mode of the polarization. Default is ‘plus’.

Returns:
antenna_response: float

Antenna response of the detector.

gwsnr.numba.antenna_response_array(ra, dec, time, psi, detector_tensor)[source]

Function to calculate the antenna response in array form.

Parameters:
ranumpy.ndarray

Right ascension of the source in radians.

decnumpy.ndarray

Declination of the source in radians.

timenumpy.ndarray

GPS time of the source.

psinumpy.ndarray

Polarization angle of the source.

detector_tensorarray-like

Detector tensor for the multiple detectors (nx3x3 matrix), where n is the number of detectors.

Returns:
antenna_response: numpy.ndarray

Antenna response of the detector. Shape is (n, len(ra)).

gwsnr.numba.noise_weighted_inner_product(signal1, signal2, psd, duration)[source]

Noise weighted inner product of two time series data sets.

Parameters:
signal1: `numpy.ndarray` or `float`

First series data set.

signal2: `numpy.ndarray` or `float`

Second series data set.

psd: `numpy.ndarray` or `float`

Power spectral density of the detector.

duration: `float`

Duration of the data.

gwsnr.numba.effective_distance(luminosity_distance, theta_jn, ra, dec, geocent_time, psi, detector_tensor)[source]

Function to calculate the effective distance of the source.

Parameters:
luminosity_distancefloat

Luminosity distance of the source in Mpc.

theta_jnfloat

Angle between the line of sight and the orbital angular momentum vector.

rafloat

Right ascension of the source in radians.

decfloat

Declination of the source in radians.

timefloat

GPS time of the source.

psifloat

Polarization angle of the source.

detector_tensorarray-like

Detector tensor for the detector (3x3 matrix).

Returns:
effective_distance: float

Effective distance of the source in Mpc.

gwsnr.numba.effective_distance_array(luminosity_distance, theta_jn, ra, dec, geocent_time, psi, detector_tensor)[source]

Function to calculate the effective distance of the source in array form.

Parameters:
luminosity_distancenumpy.ndarray

Luminosity distance of the source in Mpc.

theta_jnnumpy.ndarray

Angle between the line of sight and the orbital angular momentum vector.

ranumpy.ndarray

Right ascension of the source in radians.

decnumpy.ndarray

Declination of the source in radians.

timenumpy.ndarray

GPS time of the source.

psinumpy.ndarray

Polarization angle of the source.

detector_tensorarray-like

Detector tensor for the multiple detectors (nx3x3 matrix), where n is the number of detectors.

Returns:
effective_distance: numpy.ndarray

Effective distance of the source in Mpc. Shape is (n, len(ra)).

gwsnr.numba.linear_interpolator(xnew_array, y_array, x_array, fill_value=np.inf)[source]

Linear interpolator for 1D data.

Parameters:
xnew_arraynumpy.ndarray

New x values to interpolate.

y_arraynumpy.ndarray

y values corresponding to the x_array.

x_arraynumpy.ndarray

Original x values.

Returns:
resultnumpy.ndarray

Interpolated y values at xnew_array.

gwsnr.numba.get_interpolated_snr_aligned_spins_numba(mass_1, mass_2, luminosity_distance, theta_jn, psi, geocent_time, ra, dec, a_1, a_2, detector_tensor, snr_partialscaled, ratio_arr, mtot_arr, a1_arr, a_2_arr, batch_size=100000)[source]
gwsnr.numba.get_interpolated_snr_no_spins_numba(mass_1, mass_2, luminosity_distance, theta_jn, psi, geocent_time, ra, dec, a_1, a_2, detector_tensor, snr_partialscaled, ratio_arr, mtot_arr, a1_arr, a_2_arr, batch_size=100000)[source]