pint.models.noise_model.PLChromNoise

class pint.models.noise_model.PLChromNoise[source]

Bases: CorrelatedNoiseComponent

Model of a radio frequency-dependent noise with a power-law spectrum and arbitrary chromatic index.

Such variations are usually attributed to time-variable scattering in the ISM. Scattering smears/broadens the shape of the pulse profile by convolving it with a transfer function that is determined by the geometry and electron distribution in the scattering screen(s). The scattering timescale is typically a decreasing function of the observing frequency.

Scatter broadening causes systematic offsets in the TOA measurements due to the pulse shape mismatch. While this offset need not be a simple function of frequency, it has been often modeled using a delay that is proportional to f^-alpha where alpha is known as the chromatic index.

This model should be used in combination with the ChromaticCM model.

Parameters supported:

Name / Aliases

Description

Kind

TNCHROMAMP

Amplitude of powerlaw chromatic noise in tempo2 format

number

TNCHROMGAM

Spectral index of powerlaw chromatic noise in tempo2 format

number

TNCHROMC

Number of chromatic noise frequencies.

integer

TNCHROMFLOG

Number of logarithmically spaced chromatic noise frequencies in the basis.

integer

TNCHROMFLOG_FACTOR

Scaling factor for the log-spaced chromatic frequencies (2 -> [1/8,1/4,1/2,…])

number

TNCHROMTSPAN

Time span corresponding to the fundamental frequency of the chromatic noise Fourier series (data span is used by default).

yr

References

  • Lentati et al. 2014, MNRAS 437(3), 3004-3023 [1]

  • van Haasteren & Vallisneri, 2014, MNRAS 446(2), 1170-1174 [2]

Methods

add_param(param[, deriv_func, setup])

Add a parameter to the Component.

get_dm_noise_basis(toas)

The DM part of the basis matrix for wideband datasets.

get_noise_basis(toas)

Return a Fourier design matrix for chromatic noise.

get_noise_weights(toas)

Return power law chromatic noise weights.

get_params_of_type(param_type)

Get all the parameters in timing model for one specific Parameter subtype.

get_plc_vals()

Retrieve power-law parameters and frequency-basis parameters from the model, substituting defaults if unspecified.

get_prefix_mapping_component(prefix)

Get the index mapping for the prefix parameters.

get_time_frequencies(toas)

Return the frequencies of the noise model

get_wideband_noise_basis(toas)

The wideband noise basis including both TOA and DM parts.

is_in_parfile(para_dict)

Check if this subclass included in parfile.

match_param_aliases(alias)

Return the parameter corresponding to this alias.

param_help()

Print help lines for all available parameters in model.

pl_chrom_basis_weight_pair(toas)

Return a Fourier design matrix and power law chromatic noise weights.

pl_chrom_cov_matrix(toas)

print_par([format])

param format:

Parfile output format. PINT outputs the 'tempo', 'tempo2' and 'pint'

register_deriv_funcs(func, param)

Register the derivative function in to the deriv_func dictionaries.

remove_param(param)

Remove a parameter from the Component.

set_special_params(spcl_params)

setup()

Finalize construction loaded values.

validate()

Validate loaded values.

validate_toas(toas)

Check that this model component has TOAs where needed.

Attributes

aliases_map

Return all the aliases and map to the PINT parameter name.

category

component_types

free_params_component

Return the free parameters in the component.

introduces_correlated_errors

introduces_dm_errors

is_time_correlated

param_prefixs

register

get_plc_vals() Tuple[float, float, int, int, float][source]

Retrieve power-law parameters and frequency-basis parameters from the model, substituting defaults if unspecified.

get_time_frequencies(toas: TOAs) ndarray[source]

Return the frequencies of the noise model

get_noise_basis(toas: TOAs) ndarray[source]

Return a Fourier design matrix for chromatic noise.

See the documentation for pl_chrom_basis_weight_pair function for details.

get_noise_weights(toas: TOAs) ndarray[source]

Return power law chromatic noise weights.

See the documentation for pl_chrom_basis_weight_pair for details.

pl_chrom_basis_weight_pair(toas: TOAs) ndarray[source]

Return a Fourier design matrix and power law chromatic noise weights.

A Fourier design matrix contains the sine and cosine basis_functions in a Fourier series expansion. Here we scale the design matrix by (fref/f)**2, where fref = 1400 MHz to match the convention used in enterprise.

The weights used are the power-law PSD values at frequencies n/T, where n is in [1, TNCHROMC] and T is the total observing duration of the dataset.

add_param(param: Parameter, deriv_func: Callable | None = None, setup: bool = False)

Add a parameter to the Component.

The parameter is stored in an attribute on the Component object. Its name is also recorded in a list, self.params.

Parameters:
  • param (pint.models.Parameter) – The parameter to be added.

  • deriv_func (function) – Derivative function for parameter.

property aliases_map: Dict[str, str]

Return all the aliases and map to the PINT parameter name.

This property returns a dictionary from the current in timing model parameters’ aliase to the pint defined parameter names. For the aliases of a prefixed parameter, the aliase with an existing prefix index maps to the PINT defined parameter name with the same index. Behind the scenes, the indexed parameter adds the indexed aliase to its aliase list.

property free_params_component: List[str]

Return the free parameters in the component.

This function collects the non-frozen parameters.

Return type:

A list of free parameters.

get_dm_noise_basis(toas)

The DM part of the basis matrix for wideband datasets. This is non-zero only for DM noise. The output is a numpy array but it has units of dmu/s by convention since the noise amplitudes are defined to have dimensions of time.

get_params_of_type(param_type: str) List[str]

Get all the parameters in timing model for one specific Parameter subtype.

get_prefix_mapping_component(prefix: str) Dict[int, str]

Get the index mapping for the prefix parameters.

Parameters:

prefix (str) – Name of prefix.

Returns:

A dictionary with prefix parameter real index as key and parameter name as value.

Return type:

dict

get_wideband_noise_basis(toas)

The wideband noise basis including both TOA and DM parts. The TOA part of the matrix is dimensionless but the DM part of the basis has units of dmu/s.

is_in_parfile(para_dict: Dict) bool

Check if this subclass included in parfile.

Parameters:

para_dict (dictionary) – A dictionary contain all the parameters with values in string from one parfile

Returns:

Whether the subclass is included in the parfile.

Return type:

bool

match_param_aliases(alias: str) str

Return the parameter corresponding to this alias.

Parameters:

alias (str) – Alias name.

Note

This function only searches the parameter aliases within the current component. If one wants to search the aliases in the scope of TimingModel, please use TimingModel.match_param_aliase().

param_help() str

Print help lines for all available parameters in model.

print_par(format: Literal['tempo', 'tempo2', 'pint'] = 'pint') str
Parameters:

format (str, optional) – Parfile output format. PINT outputs the ‘tempo’, ‘tempo2’ and ‘pint’ format. The defaul format is pint. Actual formatting done elsewhere.

Returns:

str

Return type:

formatted line for par file

register_deriv_funcs(func: Callable, param: str) None

Register the derivative function in to the deriv_func dictionaries.

Parameters:
  • func (callable) – Calculates the derivative

  • param (str) – Name of parameter the derivative is with respect to

remove_param(param: str | Parameter) None

Remove a parameter from the Component.

Parameters:

param (str or pint.models.Parameter) – The parameter to remove.

setup() None

Finalize construction loaded values.

validate() None

Validate loaded values.

validate_toas(toas) None

Check that this model component has TOAs where needed.