pint.models.noise_model.get_rednoise_freqs

pint.models.noise_model.get_rednoise_freqs(t, nmodes: int, Tspan: Quantity | None = None, logmode: int | None = None, f_min: float | None = None, nlog: int | None = None) ndarray[source]

Compute an array of red-noise frequencies, optionally mixing log- and linearly spaced frequencies.

If log-spaced parameters (logmode, f_min, nlog) are provided and valid, this function will prepend nlog log-spaced frequencies and then append nmodes linearly spaced frequencies. Otherwise, it uses purely linear spacing for nmodes frequencies.

Parameters:
  • nmodes – int Number of linear frequency modes (if using purely linear spacing). If log-spacing is used, these will be the number of linear modes appended after the log-spaced part.

  • Tspan – float, optional Span of the data in seconds. If None, but t is provided, it is taken as max(t) - min(t).

  • t – array-like, optional Vector of time series (TOAs) in seconds. Only required if Tspan is None, so we can calculate Tspan internally.

  • logmode – int, optional The linear mode index at which to switch to log spacing. If < 0 or None, the function reverts to purely linear spacing. Must be >= 0 for log modes.

  • f_min – float, optional Minimum frequency for log spacing, expressed as a fraction of 1/Tspan. Only used if logmode >= 0.

  • nlog – int, optional Number of log-spaced frequencies. Only used if logmode >= 0.

Returns:

freqsndarray

Frequencies array of length either nmodes (linear-only) or (nlog + nmodes) (log + linear).