pygwtf.generator#

Attributes#

Classes#

AnalyticTimeFrequencyWaveform

Analytic time-frequency waveform generator.

Module Contents#

pygwtf.generator.THREADS_PER_BLOCK = 128#
class pygwtf.generator.AnalyticTimeFrequencyWaveform(model_class: Type[pygwtf.models.base.AnalyticModel], config: dict, prescription: str = 'fresnel', backend: str | pygwtf.backend.Backend = 'cpu', tdi_type: int | None = None, channels: numpy.ndarray | None = None, psds: numpy.ndarray | None = None, spacecraft_orbits: numpy.ndarray | None = None, spacecraft_ltts: numpy.ndarray | None = None)#

Analytic time-frequency waveform generator.

Constructs generative kernels of the chosen prescription (only Fresnel currently supported) for both waveform generation and inner-product evaluation in the time-frequency domain, driven by a physical model. CPU or GPU operation is specified by the chosen backend.

Parameters#

model_class:

The model class to instantiate (e.g. TaylorT2Ecc). Initialised inside this constructor with the chosen backend.

configdict

Kernel configuration, with kwargs specific to the prescription used.

prescriptionstr, optional

The prescription to use for the kernel construction. Only 'fresnel' is currently supported.

backendstr or Backend, optional

Compute backend — 'cpu' (default) or 'gpu'.

tdi_type{None, 2}, optional

TDI generation order. None produces TT polarisations. 2 produces second-generation TDI.

channelsarray_like, optional

Pre-computed data array of shape ``(nT, nF, n_channels) ``. Required for statistic evaluation if not supplied at call time.

psdsarray_like, optional

Pre-computed PSD array of shape ``(nT, nF, n_channels) ``. Required for statistic evaluation if not supplied at call time.

spacecraft_orbitsarray_like, optional

Pre-computed spacecraft orbits array of shape (nT, 3, 3). Required for TDI generation if not supplied at initialisation, in which case analytic orbits will be used.

spacecraft_ltts: array_like, optional

Pre-computed spacecraft light travel times array of shape (nT, 3). Required for TDI generation if not supplied at initialisation, in which case will be calculated analytically from positions (Need in metre units not seconds)

backend#
model#
config#
t_tranche#
f_tranche#
tdi_type = None#
spacecraft_orbits = None#
spacecraft_ltts = None#
channels = None#
psds = None#
waveform_kernel(n_sources, *args)#

Call waveform kernel for the selected backend.

NOTE: There are no explicit returns from this function as the kernels are filling in the pre-allocated output arrays.

Parameters#

n_sourcesint

Number of sources to process, used to determine GPU grid size if applicable.

*argstuple

Arguments to pass to the kernel, excluding n_sources which is passed separately for GPU grid sizing. See the kernel construction functions for details on the expected arguments.

statistic_kernel(n_sources, *args)#
Active statistic kernel for the selected backend.

Only returns the per-segment d_h and h_h values.

NOTE: There are no explicit returns from this function as the kernels are filling in the pre-allocated output arrays.

Parameters#

n_sourcesint

Number of sources to process, used to determine GPU grid size if applicable.

*argstuple

Arguments to pass to the kernel, excluding n_sources which is passed separately for GPU grid sizing. See the kernel construction functions for details on the expected arguments.

semi_coherent_statistic_kernel(n_sources, *args)#
Active direct semi-coherent statistic kernel for the selected backend.

Returns the final semi-coherent statistic value per source, after summing over segments internally in the kernel. NOTE: Only really used for the SoBBH search

Parameters#

n_sourcesint

Number of sources to process, used to determine GPU grid size if applicable.

*argstuple

Arguments to pass to the kernel, excluding n_sources which is passed separately for GPU grid sizing See the kernel construction functions for details on the expected arguments.