pint.utils.dmwavex_setup

pint.utils.dmwavex_setup(model: TimingModel, T_span: float | Quantity, freqs: Iterable[float | Quantity] | None = None, n_freqs: int | None = None, freeze_params: bool = False) List[int][source]

Set-up a DMWaveX model based on either an array of user-provided frequencies or the wave number frequency calculation. Sine and Cosine amplitudes are initially set to zero

User specifies T_span and either freqs or n_freqs. This function assumes that the timing model does not already have any DMWaveX components. See add_dmwavex_component() or add_dmwavex_components() to add components to an existing DMWaveX model.

Parameters:
  • model (pint.models.timing_model.TimingModel) –

  • T_span (float, astropy.quantity.Quantity) – Time span used to calculate nyquist frequency when using freqs Time span used to calculate DMWaveX frequencies when using n_freqs Usually to be set as the length of the timing baseline the model is being used for

  • freqs (iterable of float or astropy.quantity.Quantity, None) – User inputed base frequencies

  • n_freqs (int, None) – Number of wave frequencies to calculate using the equation: freq_n = 2 * pi * n / T_span Where n is the wave number, and T_span is the total time span of the toas in the fitter object

  • freeze_params (bool, optional) – Whether the new parameters should be frozen

Returns:

indices – Indices that have been assigned to new WaveX components

Return type:

list