sigpyproc.params

sigpyproc.params#

Dispersion related parameters and functions.

This module contains dispersion related parameters and functions.

Functions

compute_dmdelays

Compute ISM dispersion delays for given DM value(s).

compute_dmsmearing

Compute ISM smearing due to finite bandwidth for given DM value(s).

sigpyproc.params.compute_dmdelays(freqs, dm, tsamp, ref_freq, *, in_samples=True)[source]#

Compute ISM dispersion delays for given DM value(s).

Parameters:
freqsArrayLike

Frequencies of each channel.

dmfloat | ArrayLike

Dispersion measure(s) to calculate delays for.

tsampfloat

Sampling time of the data.

ref_freqfloat

Reference frequency to calculate delays from.

in_samplesbool, optional

Flag to return delays as numbers of samples, by default True.

Returns:
NDArray[int32 | float32]

Dispersion delays at middle of each channel with respect to reference frequency.

If dm is a scalar, returns a 1D array of delays. If dm is an array, returns a 2D array with shape (len(dm), len(freqs)).

sigpyproc.params.compute_dmsmearing(freqs, dm, tsamp, *, in_samples=True)[source]#

Compute ISM smearing due to finite bandwidth for given DM value(s).

Parameters:
freqsArrayLike

Frequencies of each channel.

dmfloat | ArrayLike

Dispersion measure(s) to calculate smearing for.

tsampfloat

Sampling time of the data.

in_samplesbool, optional

Flag to return smearing as numbers of samples, by default True.

Returns:
NDArray[int32 | float32]

DM smearing in the frequency channels due to finite bandwidth.

If dm is a scalar, returns a 1D array of smearing. If dm is an array, returns a 2D array with shape (len(dm), len(freqs)).