pint.models.solar_system_shapiro.SolarSystemShapiro
- class pint.models.solar_system_shapiro.SolarSystemShapiro[source]
Bases:
DelayComponent
Shapiro delay due to light bending near Solar System objects.
Parameters supported:
Name / Aliases
Description
Kind
PLANET_SHAPIRO
Include planetary Shapiro delays
boolean
Methods
add_param
(param[, deriv_func, setup])Add a parameter to the Component.
get_params_of_type
(param_type)Get all the parameters in timing model for one specific type.
get_prefix_mapping_component
(prefix)Get the index mapping for the prefix parameters.
is_in_parfile
(para_dict)Check if this subclass included in parfile.
match_param_aliases
(alias)Return the parameter corresponding to this alias.
Print help lines for all available parameters in model.
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.
solar_system_shapiro_delay
(toas[, acc_delay])Returns total shapiro delay to due solar system objects.
ss_obj_shapiro_delay
(obj_pos, psr_dir, T_obj)returns Shapiro delay in seconds for a solar system object.
validate
()Validate loaded values.
validate_toas
(toas)Check that this model component has TOAs where needed.
Attributes
Return all the aliases and map to the PINT parameter name.
category
component_types
Return the free parameters in the component.
param_prefixs
register
- static ss_obj_shapiro_delay(obj_pos, psr_dir, T_obj)[source]
returns Shapiro delay in seconds for a solar system object.
- Inputs:
obj_pos : position vector from Earth to SS object, with Units psr_dir : unit vector in direction of pulsar T_obj : mass of object in seconds (GM/c^3)
- solar_system_shapiro_delay(toas, acc_delay=None)[source]
Returns total shapiro delay to due solar system objects. If the PLANET_SHAPIRO model param is set to True then planets are included, otherwise only the value for the Sun is calculated.
Requires Astrometry or similar model that provides the ssb_to_psb_xyz method for direction to pulsar.
If planets are to be included, TOAs.compute_posvels() must have been called with the planets=True argument.
- add_param(param, deriv_func=None, setup=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
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
Return the free parameters in the component.
This function collects the non-frozen parameters.
- Return type:
A list of free parameters.
- get_params_of_type(param_type)
Get all the parameters in timing model for one specific type.
- get_prefix_mapping_component(prefix)
Get the index mapping for the prefix parameters.
- is_in_parfile(para_dict)
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:
- match_param_aliases(alias)
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()
Print help lines for all available parameters in model.
- print_par(format='pint')
- 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, param)
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)
Remove a parameter from the Component.
- Parameters:
param (str or pint.models.Parameter) – The parameter to remove.
- setup()
Finalize construction loaded values.
- validate()
Validate loaded values.
- validate_toas(toas)
Check that this model component has TOAs where needed.