Parameters

Each TimingModel has a number of model parameters, some of which are free and some frozen. Some of these parameters are single parameters, like the sky coordinates RAJ and DECJ, and are represented by the Parameter type. Some come as families of similar parameters, such as the pulsar frequency F0 and its derivatives F1, F2, etc. These are represented as MultiParameters. These contain information about parameter names, their original units (used by PINT), the scaling factors for converting to and from the Vela.jl units, default values, whether they are free/frozen, etc.

Vela.ParameterType
Parameter

A single model parameter.

Corresponds to floatParameter, AngleParameter, or MJDParameter in PINT.

source
Vela.MultiParameterType
MultiParameter

A set of model parameters that are characterized by a common name and a varying index.

Corresponds to maskParameter or prefixParameter in PINT.

source

The correct_toa methods expect the parameters to be passed in as a NamedTuple containing GQs for single Parameters and NTuples of GQs for MultiParameters. In general, the samplers the parameter values input from a sampler will be some type of ordered collection of Float64s like a list, ndarray, Vector, etc. This is converted into a NamedTuple of appropriate structure by the read_params function. The opposite can be achieved using the read_param_values_to_vector function. The information needed to do these transformations is stored in the ParamHandler type.

Vela.ParamHandlerType
ParamHandler{PT<:NamedTuple}

Handles the creation of a parameter tuple from a collection of free parameter values.

source
Vela.read_paramsFunction
read_params(ph::ParamHandler{PT}, free_values)::PT where {PT<:NamedTuple}

Create a parameter tuple from a collection of free parameter values.

Reverse of read_param_values_to_vector().

source
Vela.read_param_values_to_vectorFunction
read_param_values_to_vector(param_handler::ParamHandler, params::NamedTuple)::Vector{Float64}

Generate a collection of free parameter values from a parameter tuple.

Reverse of read_params()

source

We also provide utility functions for getting ordered lists of parameter names, prefixes, units, etc. (in the PINT convention).

Vela.get_free_param_namesFunction
get_free_param_names(param_handler::ParamHandler)::Vector{String}

Generate an ordered collection of free parameter names.

source
Vela.get_free_param_prefixesFunction
get_free_param_prefixes(param_handler::ParamHandler)::Vector{String}

Generate an ordered collection of free parameter prefixes.

source
Vela.get_free_param_unitsFunction
get_free_param_units(param_handler::ParamHandler)::Vector{String}

Generate an ordered collection of free parameter units (astropy-compatible).

source
Vela.get_free_param_labelsFunction
get_free_param_labels(param_handler::ParamHandler; delim::String = "

")::Vector{String}

Generate an ordered collection of free parameter labels.

source
Vela.get_scale_factorsFunction
get_scale_factors(param_handler::ParamHandler)::Vector{Float64}

Get the scale factors that convert the free parameters from Vela.jl's internal representation to the units used in PINT.

source

A list of parameters and their units can be found here.