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.Parameter — Type
ParameterA single model parameter.
Corresponds to floatParameter, AngleParameter, or MJDParameter in PINT.
Vela.MultiParameter — Type
MultiParameterA set of model parameters that are characterized by a common name and a varying index.
Corresponds to maskParameter or prefixParameter in PINT.
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.ParamHandler — Type
ParamHandler{PT<:NamedTuple}Handles the creation of a parameter tuple from a collection of free parameter values.
Vela.read_params — Function
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().
Vela.read_param_values_to_vector — Function
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()
We also provide utility functions for getting ordered lists of parameter names, prefixes, units, etc. (in the PINT convention).
Vela.get_free_param_names — Function
get_free_param_names(param_handler::ParamHandler)::Vector{String}Generate an ordered collection of free parameter names.
Vela.get_free_param_prefixes — Function
get_free_param_prefixes(param_handler::ParamHandler)::Vector{String}Generate an ordered collection of free parameter prefixes.
Vela.get_free_param_units — Function
get_free_param_units(param_handler::ParamHandler)::Vector{String}Generate an ordered collection of free parameter units (astropy-compatible).
Vela.get_free_param_labels — Function
get_free_param_labels(param_handler::ParamHandler; delim::String = "")::Vector{String}
Generate an ordered collection of free parameter labels.
Vela.get_scale_factors — Function
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.
A list of parameters and their units can be found here.