This Jupyter notebook can be downloaded from understanding_timing_models.ipynb, or viewed as a python script at understanding_timing_models.py.

Understanding Timing Models

Build a timing model starting from a par file

[1]:
from pint.models import get_model
from pint.models.timing_model import Component
import pint.config
import pint.logging

# setup logging
pint.logging.setup(level="INFO")
[1]:
1

One can build a timing model via get_model() method. This will read the par file and instantiate all the delay and phase components, using the default ordering.

[2]:
par = "B1855+09_NANOGrav_dfg+12_TAI.par"
m = get_model(pint.config.examplefile(par))
[ ]:

Each of the parameters in the model can be accessed as an attribute of the TimingModel object. Behind the scenes PINT figures out which component the parameter is stored in.

Each parameter has attributes like the quantity (which includes units), and a description (see the Understanding Parameters notebook for more detail)

[3]:
print(m.F0.quantity)
print(m.F0.description)
186.49408156698235 Hz
Spin-frequency

We can now explore the structure of the model

[4]:
# This gives a list of all of the component types (so far there are only delay and phase components)
m.component_types
[4]:
['DelayComponent', 'PhaseComponent']
[5]:
dir(m)
[5]:
['BINARY',
 'CHI2',
 'CHI2R',
 'CLOCK',
 'DILATEFREQ',
 'DMDATA',
 'DMRES',
 'DelayComponent_list',
 'EPHEM',
 'FINISH',
 'INFO',
 'NTOA',
 'NoiseComponent_list',
 'PSR',
 'PhaseComponent_list',
 'RM',
 'START',
 'T2CMETHOD',
 'TIMEEPH',
 'TRACK',
 'TRES',
 'UNITS',
 '__class__',
 '__contains__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__getattr__',
 '__getattribute__',
 '__getitem__',
 '__getstate__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__iter__',
 '__le__',
 '__len__',
 '__lt__',
 '__module__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__setitem__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__weakref__',
 '_locate_param_host',
 'add_component',
 'add_param_from_top',
 'add_tzr_toa',
 'as_ECL',
 'as_ICRS',
 'as_parfile',
 'basis_funcs',
 'companion_radial_velocity',
 'compare',
 'component_types',
 'components',
 'conjunction',
 'covariance_matrix_funcs',
 'd_delay_d_param',
 'd_delay_d_param_num',
 'd_dm_d_param',
 'd_phase_d_delay_funcs',
 'd_phase_d_param',
 'd_phase_d_param_num',
 'd_phase_d_toa',
 'd_phase_d_tpulsar',
 'd_toasigma_d_param',
 'delay',
 'delay_deriv_funcs',
 'delay_funcs',
 'delete_jump_and_flags',
 'designmatrix',
 'dm_covariance_matrix',
 'dm_covariance_matrix_funcs',
 'dm_derivs',
 'dm_funcs',
 'find_empty_masks',
 'fittable_params',
 'free_params',
 'get_barycentric_toas',
 'get_component_type',
 'get_components_by_category',
 'get_deriv_funcs',
 'get_derived_params',
 'get_params_dict',
 'get_params_mapping',
 'get_params_of_component_type',
 'get_params_of_type_top',
 'get_prefix_list',
 'get_prefix_mapping',
 'has_correlated_errors',
 'has_time_correlated_errors',
 'is_binary',
 'items',
 'jump_flags_to_params',
 'keys',
 'map_component',
 'match_param_aliases',
 'name',
 'noise_model_basis_weight',
 'noise_model_designmatrix',
 'noise_model_dimensions',
 'orbital_phase',
 'param_help',
 'params',
 'params_ordered',
 'phase',
 'phase_deriv_funcs',
 'phase_funcs',
 'pulsar_radial_velocity',
 'remove_component',
 'remove_param',
 'scaled_dm_uncertainty',
 'scaled_dm_uncertainty_funcs',
 'scaled_toa_uncertainty',
 'scaled_toa_uncertainty_funcs',
 'search_cmp_attr',
 'set_param_uncertainties',
 'set_param_values',
 'setup',
 'toa_covariance_matrix',
 'toasigma_derivs',
 'top_level_params',
 'total_dispersion_slope',
 'total_dm',
 'use_aliases',
 'validate',
 'validate_component_types',
 'validate_toas',
 'write_parfile']

The TimingModel class stores lists of the delay model components and phase components that make up the model

[6]:
# When this list gets printed, it shows the parameters that are associated with each component as well.
m.DelayComponent_list
[6]:
[AstrometryEquatorial(
     MJDParameter(   POSEPOCH            49453.0000000000000000 (d) frozen=True),
     floatParameter( PX                  1.2288569063263406 (mas) +/- 0.21243361289239687 mas frozen=False),
     AngleParameter( RAJ                 18:57:36.39328840 (hourangle) +/- 0h00m00.00002603s frozen=False),
     AngleParameter( DECJ                9:43:17.29196000  (deg) +/- 0d00m00.00078789s frozen=False),
     floatParameter( PMRA                -2.5054345161030382 (mas / yr) +/- 0.031049582610533172 mas / yr frozen=False),
     floatParameter( PMDEC               -5.497455863199382 (mas / yr) +/- 0.06348008663748286 mas / yr frozen=False)),
 TroposphereDelay(
     boolParameter(  CORRECT_TROPOSPHERE N                 frozen=True)),
 SolarSystemShapiro(
     boolParameter(  PLANET_SHAPIRO      N                 frozen=True)),
 SolarWindDispersion(
     floatParameter( NE_SW               0.0               (1 / cm3) frozen=True),
     floatParameter( SWP                 2.0               () frozen=True),
     intParameter(   SWM                 0                 frozen=True)),
 DispersionDM(
     floatParameter( DM                  13.29709          (pc / cm3) frozen=True),
     floatParameter( DM1                 UNSET,
     MJDParameter(   DMEPOCH             49453.0000000000000000 (d) frozen=True)),
 DispersionDMX(
     floatParameter( DMX                 0.0               (pc / cm3) frozen=True),
     floatParameter( DMX_0001            0.0               (pc / cm3) frozen=False),
     MJDParameter(   DMXR1_0001          53358.7273000000000002 (d) frozen=True),
     MJDParameter(   DMXR2_0001          53358.7733000000000000 (d) frozen=True),
     floatParameter( DMX_0002            0.00011110286020705287 (pc / cm3) +/- 4.673570459450457e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0003            -4.4655555822498926e-05 (pc / cm3) +/- 4.202379265494554e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0004            -3.172366242454921e-05 (pc / cm3) +/- 4.222071152827488e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0005            -2.6615937544541525e-05 (pc / cm3) +/- 3.676165288001985e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0006            7.145445617437231e-05 (pc / cm3) +/- 4.374167394142721e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0007            7.743670274839663e-06 (pc / cm3) +/- 5.13199543963211e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0008            6.628314576141847e-05 (pc / cm3) +/- 3.755691800563188e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0009            9.960800222441839e-05 (pc / cm3) +/- 3.619457239625261e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0010            0.00021384397943417332 (pc / cm3) +/- 3.970891234128656e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0011            0.0001654914916498753 (pc / cm3) +/- 4.615618107309406e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0012            0.00025014821251322404 (pc / cm3) +/- 3.617384078038137e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0013            0.00032544283445758236 (pc / cm3) +/- 3.525448646108801e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0014            0.0007020949387551039 (pc / cm3) +/- 3.567637835272617e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0015            0.0008302906182772181 (pc / cm3) +/- 3.306863035583663e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0016            0.0009456692079715063 (pc / cm3) +/- 4.382957805166126e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0017            0.001018831160816332 (pc / cm3) +/- 3.607409255560491e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0018            0.0010891165860712315 (pc / cm3) +/- 4.813789826343072e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0019            0.0010386415586231196 (pc / cm3) +/- 4.612675176906664e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0020            0.0013195672245089195 (pc / cm3) +/- 4.616167182274142e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0021            0.0012154222610258824 (pc / cm3) +/- 4.294821352263614e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0022            0.0013377609996199928 (pc / cm3) +/- 4.221028001939009e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0023            0.0016163009324016205 (pc / cm3) +/- 5.156225843276498e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0024            0.0016669838878444674 (pc / cm3) +/- 6.395311039024736e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0025            0.0004568363556910632 (pc / cm3) +/- 4.912260448808334e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0026            0.0005277178068362735 (pc / cm3) +/- 4.15270457934297e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0027            0.0007289486445487147 (pc / cm3) +/- 4.234732022848593e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0028            0.001142078552606484 (pc / cm3) +/- 5.990586419386911e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0029            0.001105019478847692 (pc / cm3) +/- 4.148068669700297e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0030            0.0016917871040745575 (pc / cm3) +/- 6.46466473284041e-05 pc / cm3 frozen=False),
     MJDParameter(   DMXR1_0002          53420.5539999999999999 (d) frozen=True),
     MJDParameter(   DMXR1_0003          53448.4787000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0004          53477.4013000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0005          53532.2326000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0006          53603.0361000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0007          53628.9651000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0008          53686.7974000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0009          53715.7357000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0010          53750.6225000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0011          53798.5061000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0012          53851.3716000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0013          53891.2523000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0014          54043.8419000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0015          54092.7177000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0016          54135.5826000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0017          54519.5292000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0018          54569.4146000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0019          54678.1000000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0020          54819.7198000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0021          54862.5883999999999999 (d) frozen=True),
     MJDParameter(   DMXR1_0022          54925.4324000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0023          54981.2806000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0024          54998.2092000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0025          53926.1631000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0026          53968.0623000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0027          54008.9535000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0028          54177.4780000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0029          54472.6626000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0030          55108.9038000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0002          53420.5810999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0003          53448.5144999999999998 (d) frozen=True),
     MJDParameter(   DMXR2_0004          53477.4295000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0005          53532.2715000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0006          53603.0846000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0007          53628.9835000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0008          53686.8370000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0009          53715.7616999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0010          53750.6622000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0011          53798.5341000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0012          53851.3992000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0013          53891.2801000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0014          54043.8674000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0015          54092.7426000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0016          54135.6066000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0017          54519.5561999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0018          54569.4669000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0019          54678.1283000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0020          54819.7462000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0021          54862.6144999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0022          54925.4613000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0023          54981.3252000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0024          54998.2268000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0025          53926.1924000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0026          53968.0901000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0027          54008.9866000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0028          54177.5085999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0029          54472.6889000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0030          55108.9221000000000000 (d) frozen=True)),
 BinaryDD(
     floatParameter( PB                  12.327171194774200418 (d) +/- 7.9493185824e-10 d frozen=False),
     floatParameter( PBDOT               0.0               () frozen=True),
     floatParameter( A1                  9.2307804312998   (ls) +/- 3.6890718667634e-07 ls frozen=False),
     floatParameter( A1DOT               0.0               (ls / s) frozen=True),
     floatParameter( ECC                 2.174526566823692e-05 () +/- 4.027191312623e-08 frozen=False),
     floatParameter( EDOT                0.0               (1 / s) frozen=True),
     MJDParameter(   T0                  49452.9406950773356469 (d) +/- 0.0016903183053283725 d frozen=False),
     floatParameter( OM                  276.55142180589701234 (deg) +/- 0.04936551005019606 deg frozen=False),
     floatParameter( OMDOT               0.0               (deg / yr) frozen=True),
     floatParameter( M2                  0.2611131248072343 (solMass) +/- 0.02616161008932908 solMass frozen=False),
     floatParameter( SINI                0.9974171733520092 () +/- 0.0018202351513085199 frozen=False),
     floatParameter( FB0                 UNSET,
     floatParameter( A0                  0.0               (s) frozen=True),
     floatParameter( B0                  0.0               (s) frozen=True),
     floatParameter( GAMMA               0.0               (s) frozen=True),
     floatParameter( DR                  0.0               () frozen=True),
     floatParameter( DTH                 0.0               () frozen=True))]
[7]:
# Now let's look at the phase components. These include the absolute phase, the spindown model, and phase jumps
m.PhaseComponent_list
[7]:
[AbsPhase(
     MJDParameter(   TZRMJD              54177.5083593432625578 (d) frozen=True),
     strParameter(   TZRSITE             ao                frozen=True),
     floatParameter( TZRFRQ              424.0             (MHz) frozen=True)),
 Spindown(
     floatParameter( F0                  186.49408156698235146 (Hz) +/- 6.98911818e-12 Hz frozen=False),
     MJDParameter(   PEPOCH              49453.0000000000000000 (d) frozen=True),
     floatParameter( F1                  -6.2049547277487420583e-16 (Hz / s) +/- 1.73809343735734e-20 Hz / s frozen=False)),
 PhaseJump(
     maskParameter(JUMP1 -chanid asp_424 7.6456527699426e-07 +/- 0.0 s (s)),
     maskParameter(JUMP2 -chanid asp_428 1.6049580247793e-06 +/- 0.0 s (s)),
     maskParameter(JUMP3 -chanid asp_432 2.677273589972e-06 +/- 0.0 s (s)),
     maskParameter(JUMP4 -chanid asp_436 3.0814628244857e-06 +/- 0.0 s (s)),
     maskParameter(JUMP5 -chanid asp_440 4.136918843609e-06 +/- 0.0 s (s)),
     maskParameter(JUMP6 -chanid asp_1382 -5.9069311360427e-05 +/- 0.0 s (s)),
     maskParameter(JUMP7 -chanid asp_1386 -5.9582397512386e-05 +/- 0.0 s (s)),
     maskParameter(JUMP8 -chanid asp_1390 -5.9756103518774e-05 +/- 0.0 s (s)),
     maskParameter(JUMP9 -chanid asp_1394 -5.9347801609886e-05 +/- 0.0 s (s)),
     maskParameter(JUMP10 -chanid asp_1398 -5.9009509604032e-05 +/- 0.0 s (s)),
     maskParameter(JUMP11 -chanid asp_1402 -5.886527352183e-05 +/- 0.0 s (s)),
     maskParameter(JUMP12 -chanid asp_1406 -5.9015609469307e-05 +/- 0.0 s (s)),
     maskParameter(JUMP13 -chanid asp_1410 -5.8771703168481e-05 +/- 0.0 s (s)),
     maskParameter(JUMP14 -chanid asp_1414 -5.8756443357489e-05 +/- 0.0 s (s)),
     maskParameter(JUMP15 -chanid asp_1418 -5.8960922044628e-05 +/- 0.0 s (s)),
     maskParameter(JUMP16 -chanid asp_1422 -5.8883992500888e-05 +/- 0.0 s (s)),
     maskParameter(JUMP17 -chanid asp_1426 -5.8918166650158e-05 +/- 0.0 s (s)),
     maskParameter(JUMP18 -chanid asp_1430 -5.8867635126778e-05 +/- 0.0 s (s)),
     maskParameter(JUMP19 -chanid asp_1434 -5.9028297376503e-05 +/- 0.0 s (s)),
     maskParameter(JUMP20 -chanid asp_1438 -5.9000827072833e-05 +/- 0.0 s (s)),
     maskParameter(JUMP21 -chanid asp_1442 -5.8537946239722e-05 +/- 0.0 s (s)))]

We can add a component to an existing model

[8]:
from pint.models.astrometry import AstrometryEcliptic
[9]:
a = AstrometryEcliptic()  # init the AstrometryEcliptic instance
[10]:
# Add the component to the model
# It will be put in the default order
# We set validate=False since we have not set the parameter values yet, which would cause validate to fail
m.add_component(a, validate=False)
[11]:
m.DelayComponent_list  # The new instance is added to delay component list
[11]:
[AstrometryEquatorial(
     MJDParameter(   POSEPOCH            49453.0000000000000000 (d) frozen=True),
     floatParameter( PX                  1.2288569063263406 (mas) +/- 0.21243361289239687 mas frozen=False),
     AngleParameter( RAJ                 18:57:36.39328840 (hourangle) +/- 0h00m00.00002603s frozen=False),
     AngleParameter( DECJ                9:43:17.29196000  (deg) +/- 0d00m00.00078789s frozen=False),
     floatParameter( PMRA                -2.5054345161030382 (mas / yr) +/- 0.031049582610533172 mas / yr frozen=False),
     floatParameter( PMDEC               -5.497455863199382 (mas / yr) +/- 0.06348008663748286 mas / yr frozen=False)),
 AstrometryEcliptic(
     MJDParameter(   POSEPOCH            UNSET,
     floatParameter( PX                  0.0               (mas) frozen=True),
     AngleParameter( ELONG               UNSET,
     AngleParameter( ELAT                UNSET,
     floatParameter( PMELONG             0.0               (mas / yr) frozen=True),
     floatParameter( PMELAT              0.0               (mas / yr) frozen=True),
     strParameter(   ECL                 IERS2010          frozen=True)),
 TroposphereDelay(
     boolParameter(  CORRECT_TROPOSPHERE N                 frozen=True)),
 SolarSystemShapiro(
     boolParameter(  PLANET_SHAPIRO      N                 frozen=True)),
 SolarWindDispersion(
     floatParameter( NE_SW               0.0               (1 / cm3) frozen=True),
     floatParameter( SWP                 2.0               () frozen=True),
     intParameter(   SWM                 0                 frozen=True)),
 DispersionDM(
     floatParameter( DM                  13.29709          (pc / cm3) frozen=True),
     floatParameter( DM1                 UNSET,
     MJDParameter(   DMEPOCH             49453.0000000000000000 (d) frozen=True)),
 DispersionDMX(
     floatParameter( DMX                 0.0               (pc / cm3) frozen=True),
     floatParameter( DMX_0001            0.0               (pc / cm3) frozen=False),
     MJDParameter(   DMXR1_0001          53358.7273000000000002 (d) frozen=True),
     MJDParameter(   DMXR2_0001          53358.7733000000000000 (d) frozen=True),
     floatParameter( DMX_0002            0.00011110286020705287 (pc / cm3) +/- 4.673570459450457e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0003            -4.4655555822498926e-05 (pc / cm3) +/- 4.202379265494554e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0004            -3.172366242454921e-05 (pc / cm3) +/- 4.222071152827488e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0005            -2.6615937544541525e-05 (pc / cm3) +/- 3.676165288001985e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0006            7.145445617437231e-05 (pc / cm3) +/- 4.374167394142721e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0007            7.743670274839663e-06 (pc / cm3) +/- 5.13199543963211e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0008            6.628314576141847e-05 (pc / cm3) +/- 3.755691800563188e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0009            9.960800222441839e-05 (pc / cm3) +/- 3.619457239625261e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0010            0.00021384397943417332 (pc / cm3) +/- 3.970891234128656e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0011            0.0001654914916498753 (pc / cm3) +/- 4.615618107309406e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0012            0.00025014821251322404 (pc / cm3) +/- 3.617384078038137e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0013            0.00032544283445758236 (pc / cm3) +/- 3.525448646108801e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0014            0.0007020949387551039 (pc / cm3) +/- 3.567637835272617e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0015            0.0008302906182772181 (pc / cm3) +/- 3.306863035583663e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0016            0.0009456692079715063 (pc / cm3) +/- 4.382957805166126e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0017            0.001018831160816332 (pc / cm3) +/- 3.607409255560491e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0018            0.0010891165860712315 (pc / cm3) +/- 4.813789826343072e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0019            0.0010386415586231196 (pc / cm3) +/- 4.612675176906664e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0020            0.0013195672245089195 (pc / cm3) +/- 4.616167182274142e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0021            0.0012154222610258824 (pc / cm3) +/- 4.294821352263614e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0022            0.0013377609996199928 (pc / cm3) +/- 4.221028001939009e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0023            0.0016163009324016205 (pc / cm3) +/- 5.156225843276498e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0024            0.0016669838878444674 (pc / cm3) +/- 6.395311039024736e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0025            0.0004568363556910632 (pc / cm3) +/- 4.912260448808334e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0026            0.0005277178068362735 (pc / cm3) +/- 4.15270457934297e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0027            0.0007289486445487147 (pc / cm3) +/- 4.234732022848593e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0028            0.001142078552606484 (pc / cm3) +/- 5.990586419386911e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0029            0.001105019478847692 (pc / cm3) +/- 4.148068669700297e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0030            0.0016917871040745575 (pc / cm3) +/- 6.46466473284041e-05 pc / cm3 frozen=False),
     MJDParameter(   DMXR1_0002          53420.5539999999999999 (d) frozen=True),
     MJDParameter(   DMXR1_0003          53448.4787000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0004          53477.4013000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0005          53532.2326000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0006          53603.0361000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0007          53628.9651000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0008          53686.7974000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0009          53715.7357000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0010          53750.6225000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0011          53798.5061000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0012          53851.3716000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0013          53891.2523000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0014          54043.8419000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0015          54092.7177000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0016          54135.5826000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0017          54519.5292000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0018          54569.4146000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0019          54678.1000000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0020          54819.7198000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0021          54862.5883999999999999 (d) frozen=True),
     MJDParameter(   DMXR1_0022          54925.4324000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0023          54981.2806000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0024          54998.2092000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0025          53926.1631000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0026          53968.0623000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0027          54008.9535000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0028          54177.4780000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0029          54472.6626000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0030          55108.9038000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0002          53420.5810999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0003          53448.5144999999999998 (d) frozen=True),
     MJDParameter(   DMXR2_0004          53477.4295000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0005          53532.2715000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0006          53603.0846000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0007          53628.9835000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0008          53686.8370000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0009          53715.7616999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0010          53750.6622000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0011          53798.5341000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0012          53851.3992000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0013          53891.2801000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0014          54043.8674000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0015          54092.7426000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0016          54135.6066000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0017          54519.5561999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0018          54569.4669000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0019          54678.1283000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0020          54819.7462000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0021          54862.6144999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0022          54925.4613000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0023          54981.3252000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0024          54998.2268000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0025          53926.1924000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0026          53968.0901000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0027          54008.9866000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0028          54177.5085999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0029          54472.6889000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0030          55108.9221000000000000 (d) frozen=True)),
 BinaryDD(
     floatParameter( PB                  12.327171194774200418 (d) +/- 7.9493185824e-10 d frozen=False),
     floatParameter( PBDOT               0.0               () frozen=True),
     floatParameter( A1                  9.2307804312998   (ls) +/- 3.6890718667634e-07 ls frozen=False),
     floatParameter( A1DOT               0.0               (ls / s) frozen=True),
     floatParameter( ECC                 2.174526566823692e-05 () +/- 4.027191312623e-08 frozen=False),
     floatParameter( EDOT                0.0               (1 / s) frozen=True),
     MJDParameter(   T0                  49452.9406950773356469 (d) +/- 0.0016903183053283725 d frozen=False),
     floatParameter( OM                  276.55142180589701234 (deg) +/- 0.04936551005019606 deg frozen=False),
     floatParameter( OMDOT               0.0               (deg / yr) frozen=True),
     floatParameter( M2                  0.2611131248072343 (solMass) +/- 0.02616161008932908 solMass frozen=False),
     floatParameter( SINI                0.9974171733520092 () +/- 0.0018202351513085199 frozen=False),
     floatParameter( FB0                 UNSET,
     floatParameter( A0                  0.0               (s) frozen=True),
     floatParameter( B0                  0.0               (s) frozen=True),
     floatParameter( GAMMA               0.0               (s) frozen=True),
     floatParameter( DR                  0.0               () frozen=True),
     floatParameter( DTH                 0.0               () frozen=True))]

There are two ways to remove a component from a model. This simplest is to use the remove_component method to remove it by name.

[12]:
# We will not do this here, since we'll demonstrate a different method below.
# m.remove_component("AstrometryEcliptic")

Alternatively, you can have more control using the map_component() method, which takes either a string with component name, or a Component instance and returns a tuple containing the Component instance, its order in the relevant component list, the list of components of this type in the model, and the component type (as a string)

[13]:
component, order, from_list, comp_type = m.map_component("AstrometryEcliptic")
print("Component : ", component)
print("Type      : ", comp_type)
print("Order     : ", order)
print("List      : ")
_ = [print(c) for c in from_list]
Component :  AstrometryEcliptic(
    MJDParameter(   POSEPOCH            UNSET,
    floatParameter( PX                  0.0               (mas) frozen=True),
    AngleParameter( ELONG               UNSET,
    AngleParameter( ELAT                UNSET,
    floatParameter( PMELONG             0.0               (mas / yr) frozen=True),
    floatParameter( PMELAT              0.0               (mas / yr) frozen=True),
    strParameter(   ECL                 IERS2010          frozen=True))
Type      :  DelayComponent
Order     :  1
List      :
AstrometryEquatorial(
    MJDParameter(   POSEPOCH            49453.0000000000000000 (d) frozen=True),
    floatParameter( PX                  1.2288569063263406 (mas) +/- 0.21243361289239687 mas frozen=False),
    AngleParameter( RAJ                 18:57:36.39328840 (hourangle) +/- 0h00m00.00002603s frozen=False),
    AngleParameter( DECJ                9:43:17.29196000  (deg) +/- 0d00m00.00078789s frozen=False),
    floatParameter( PMRA                -2.5054345161030382 (mas / yr) +/- 0.031049582610533172 mas / yr frozen=False),
    floatParameter( PMDEC               -5.497455863199382 (mas / yr) +/- 0.06348008663748286 mas / yr frozen=False))
AstrometryEcliptic(
    MJDParameter(   POSEPOCH            UNSET,
    floatParameter( PX                  0.0               (mas) frozen=True),
    AngleParameter( ELONG               UNSET,
    AngleParameter( ELAT                UNSET,
    floatParameter( PMELONG             0.0               (mas / yr) frozen=True),
    floatParameter( PMELAT              0.0               (mas / yr) frozen=True),
    strParameter(   ECL                 IERS2010          frozen=True))
TroposphereDelay(
    boolParameter(  CORRECT_TROPOSPHERE N                 frozen=True))
SolarSystemShapiro(
    boolParameter(  PLANET_SHAPIRO      N                 frozen=True))
SolarWindDispersion(
    floatParameter( NE_SW               0.0               (1 / cm3) frozen=True),
    floatParameter( SWP                 2.0               () frozen=True),
    intParameter(   SWM                 0                 frozen=True))
DispersionDM(
    floatParameter( DM                  13.29709          (pc / cm3) frozen=True),
    floatParameter( DM1                 UNSET,
    MJDParameter(   DMEPOCH             49453.0000000000000000 (d) frozen=True))
DispersionDMX(
    floatParameter( DMX                 0.0               (pc / cm3) frozen=True),
    floatParameter( DMX_0001            0.0               (pc / cm3) frozen=False),
    MJDParameter(   DMXR1_0001          53358.7273000000000002 (d) frozen=True),
    MJDParameter(   DMXR2_0001          53358.7733000000000000 (d) frozen=True),
    floatParameter( DMX_0002            0.00011110286020705287 (pc / cm3) +/- 4.673570459450457e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0003            -4.4655555822498926e-05 (pc / cm3) +/- 4.202379265494554e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0004            -3.172366242454921e-05 (pc / cm3) +/- 4.222071152827488e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0005            -2.6615937544541525e-05 (pc / cm3) +/- 3.676165288001985e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0006            7.145445617437231e-05 (pc / cm3) +/- 4.374167394142721e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0007            7.743670274839663e-06 (pc / cm3) +/- 5.13199543963211e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0008            6.628314576141847e-05 (pc / cm3) +/- 3.755691800563188e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0009            9.960800222441839e-05 (pc / cm3) +/- 3.619457239625261e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0010            0.00021384397943417332 (pc / cm3) +/- 3.970891234128656e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0011            0.0001654914916498753 (pc / cm3) +/- 4.615618107309406e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0012            0.00025014821251322404 (pc / cm3) +/- 3.617384078038137e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0013            0.00032544283445758236 (pc / cm3) +/- 3.525448646108801e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0014            0.0007020949387551039 (pc / cm3) +/- 3.567637835272617e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0015            0.0008302906182772181 (pc / cm3) +/- 3.306863035583663e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0016            0.0009456692079715063 (pc / cm3) +/- 4.382957805166126e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0017            0.001018831160816332 (pc / cm3) +/- 3.607409255560491e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0018            0.0010891165860712315 (pc / cm3) +/- 4.813789826343072e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0019            0.0010386415586231196 (pc / cm3) +/- 4.612675176906664e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0020            0.0013195672245089195 (pc / cm3) +/- 4.616167182274142e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0021            0.0012154222610258824 (pc / cm3) +/- 4.294821352263614e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0022            0.0013377609996199928 (pc / cm3) +/- 4.221028001939009e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0023            0.0016163009324016205 (pc / cm3) +/- 5.156225843276498e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0024            0.0016669838878444674 (pc / cm3) +/- 6.395311039024736e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0025            0.0004568363556910632 (pc / cm3) +/- 4.912260448808334e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0026            0.0005277178068362735 (pc / cm3) +/- 4.15270457934297e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0027            0.0007289486445487147 (pc / cm3) +/- 4.234732022848593e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0028            0.001142078552606484 (pc / cm3) +/- 5.990586419386911e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0029            0.001105019478847692 (pc / cm3) +/- 4.148068669700297e-05 pc / cm3 frozen=False),
    floatParameter( DMX_0030            0.0016917871040745575 (pc / cm3) +/- 6.46466473284041e-05 pc / cm3 frozen=False),
    MJDParameter(   DMXR1_0002          53420.5539999999999999 (d) frozen=True),
    MJDParameter(   DMXR1_0003          53448.4787000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0004          53477.4013000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0005          53532.2326000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0006          53603.0361000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0007          53628.9651000000000001 (d) frozen=True),
    MJDParameter(   DMXR1_0008          53686.7974000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0009          53715.7357000000000001 (d) frozen=True),
    MJDParameter(   DMXR1_0010          53750.6225000000000001 (d) frozen=True),
    MJDParameter(   DMXR1_0011          53798.5061000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0012          53851.3716000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0013          53891.2523000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0014          54043.8419000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0015          54092.7177000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0016          54135.5826000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0017          54519.5292000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0018          54569.4146000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0019          54678.1000000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0020          54819.7198000000000001 (d) frozen=True),
    MJDParameter(   DMXR1_0021          54862.5883999999999999 (d) frozen=True),
    MJDParameter(   DMXR1_0022          54925.4324000000000001 (d) frozen=True),
    MJDParameter(   DMXR1_0023          54981.2806000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0024          54998.2092000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0025          53926.1631000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0026          53968.0623000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0027          54008.9535000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0028          54177.4780000000000000 (d) frozen=True),
    MJDParameter(   DMXR1_0029          54472.6626000000000001 (d) frozen=True),
    MJDParameter(   DMXR1_0030          55108.9038000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0002          53420.5810999999999999 (d) frozen=True),
    MJDParameter(   DMXR2_0003          53448.5144999999999998 (d) frozen=True),
    MJDParameter(   DMXR2_0004          53477.4295000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0005          53532.2715000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0006          53603.0846000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0007          53628.9835000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0008          53686.8370000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0009          53715.7616999999999999 (d) frozen=True),
    MJDParameter(   DMXR2_0010          53750.6622000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0011          53798.5341000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0012          53851.3992000000000001 (d) frozen=True),
    MJDParameter(   DMXR2_0013          53891.2801000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0014          54043.8674000000000001 (d) frozen=True),
    MJDParameter(   DMXR2_0015          54092.7426000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0016          54135.6066000000000001 (d) frozen=True),
    MJDParameter(   DMXR2_0017          54519.5561999999999999 (d) frozen=True),
    MJDParameter(   DMXR2_0018          54569.4669000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0019          54678.1283000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0020          54819.7462000000000001 (d) frozen=True),
    MJDParameter(   DMXR2_0021          54862.6144999999999999 (d) frozen=True),
    MJDParameter(   DMXR2_0022          54925.4613000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0023          54981.3252000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0024          54998.2268000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0025          53926.1924000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0026          53968.0901000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0027          54008.9866000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0028          54177.5085999999999999 (d) frozen=True),
    MJDParameter(   DMXR2_0029          54472.6889000000000000 (d) frozen=True),
    MJDParameter(   DMXR2_0030          55108.9221000000000000 (d) frozen=True))
BinaryDD(
    floatParameter( PB                  12.327171194774200418 (d) +/- 7.9493185824e-10 d frozen=False),
    floatParameter( PBDOT               0.0               () frozen=True),
    floatParameter( A1                  9.2307804312998   (ls) +/- 3.6890718667634e-07 ls frozen=False),
    floatParameter( A1DOT               0.0               (ls / s) frozen=True),
    floatParameter( ECC                 2.174526566823692e-05 () +/- 4.027191312623e-08 frozen=False),
    floatParameter( EDOT                0.0               (1 / s) frozen=True),
    MJDParameter(   T0                  49452.9406950773356469 (d) +/- 0.0016903183053283725 d frozen=False),
    floatParameter( OM                  276.55142180589701234 (deg) +/- 0.04936551005019606 deg frozen=False),
    floatParameter( OMDOT               0.0               (deg / yr) frozen=True),
    floatParameter( M2                  0.2611131248072343 (solMass) +/- 0.02616161008932908 solMass frozen=False),
    floatParameter( SINI                0.9974171733520092 () +/- 0.0018202351513085199 frozen=False),
    floatParameter( FB0                 UNSET,
    floatParameter( A0                  0.0               (s) frozen=True),
    floatParameter( B0                  0.0               (s) frozen=True),
    floatParameter( GAMMA               0.0               (s) frozen=True),
    floatParameter( DR                  0.0               () frozen=True),
    floatParameter( DTH                 0.0               () frozen=True))
[14]:
# Now we can remove the component by directly manipulating the list
from_list.remove(component)
[15]:
m.DelayComponent_list  # AstrometryEcliptic has been removed from delay list.
[15]:
[AstrometryEquatorial(
     MJDParameter(   POSEPOCH            49453.0000000000000000 (d) frozen=True),
     floatParameter( PX                  1.2288569063263406 (mas) +/- 0.21243361289239687 mas frozen=False),
     AngleParameter( RAJ                 18:57:36.39328840 (hourangle) +/- 0h00m00.00002603s frozen=False),
     AngleParameter( DECJ                9:43:17.29196000  (deg) +/- 0d00m00.00078789s frozen=False),
     floatParameter( PMRA                -2.5054345161030382 (mas / yr) +/- 0.031049582610533172 mas / yr frozen=False),
     floatParameter( PMDEC               -5.497455863199382 (mas / yr) +/- 0.06348008663748286 mas / yr frozen=False)),
 TroposphereDelay(
     boolParameter(  CORRECT_TROPOSPHERE N                 frozen=True)),
 SolarSystemShapiro(
     boolParameter(  PLANET_SHAPIRO      N                 frozen=True)),
 SolarWindDispersion(
     floatParameter( NE_SW               0.0               (1 / cm3) frozen=True),
     floatParameter( SWP                 2.0               () frozen=True),
     intParameter(   SWM                 0                 frozen=True)),
 DispersionDM(
     floatParameter( DM                  13.29709          (pc / cm3) frozen=True),
     floatParameter( DM1                 UNSET,
     MJDParameter(   DMEPOCH             49453.0000000000000000 (d) frozen=True)),
 DispersionDMX(
     floatParameter( DMX                 0.0               (pc / cm3) frozen=True),
     floatParameter( DMX_0001            0.0               (pc / cm3) frozen=False),
     MJDParameter(   DMXR1_0001          53358.7273000000000002 (d) frozen=True),
     MJDParameter(   DMXR2_0001          53358.7733000000000000 (d) frozen=True),
     floatParameter( DMX_0002            0.00011110286020705287 (pc / cm3) +/- 4.673570459450457e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0003            -4.4655555822498926e-05 (pc / cm3) +/- 4.202379265494554e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0004            -3.172366242454921e-05 (pc / cm3) +/- 4.222071152827488e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0005            -2.6615937544541525e-05 (pc / cm3) +/- 3.676165288001985e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0006            7.145445617437231e-05 (pc / cm3) +/- 4.374167394142721e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0007            7.743670274839663e-06 (pc / cm3) +/- 5.13199543963211e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0008            6.628314576141847e-05 (pc / cm3) +/- 3.755691800563188e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0009            9.960800222441839e-05 (pc / cm3) +/- 3.619457239625261e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0010            0.00021384397943417332 (pc / cm3) +/- 3.970891234128656e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0011            0.0001654914916498753 (pc / cm3) +/- 4.615618107309406e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0012            0.00025014821251322404 (pc / cm3) +/- 3.617384078038137e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0013            0.00032544283445758236 (pc / cm3) +/- 3.525448646108801e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0014            0.0007020949387551039 (pc / cm3) +/- 3.567637835272617e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0015            0.0008302906182772181 (pc / cm3) +/- 3.306863035583663e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0016            0.0009456692079715063 (pc / cm3) +/- 4.382957805166126e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0017            0.001018831160816332 (pc / cm3) +/- 3.607409255560491e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0018            0.0010891165860712315 (pc / cm3) +/- 4.813789826343072e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0019            0.0010386415586231196 (pc / cm3) +/- 4.612675176906664e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0020            0.0013195672245089195 (pc / cm3) +/- 4.616167182274142e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0021            0.0012154222610258824 (pc / cm3) +/- 4.294821352263614e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0022            0.0013377609996199928 (pc / cm3) +/- 4.221028001939009e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0023            0.0016163009324016205 (pc / cm3) +/- 5.156225843276498e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0024            0.0016669838878444674 (pc / cm3) +/- 6.395311039024736e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0025            0.0004568363556910632 (pc / cm3) +/- 4.912260448808334e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0026            0.0005277178068362735 (pc / cm3) +/- 4.15270457934297e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0027            0.0007289486445487147 (pc / cm3) +/- 4.234732022848593e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0028            0.001142078552606484 (pc / cm3) +/- 5.990586419386911e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0029            0.001105019478847692 (pc / cm3) +/- 4.148068669700297e-05 pc / cm3 frozen=False),
     floatParameter( DMX_0030            0.0016917871040745575 (pc / cm3) +/- 6.46466473284041e-05 pc / cm3 frozen=False),
     MJDParameter(   DMXR1_0002          53420.5539999999999999 (d) frozen=True),
     MJDParameter(   DMXR1_0003          53448.4787000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0004          53477.4013000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0005          53532.2326000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0006          53603.0361000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0007          53628.9651000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0008          53686.7974000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0009          53715.7357000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0010          53750.6225000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0011          53798.5061000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0012          53851.3716000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0013          53891.2523000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0014          54043.8419000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0015          54092.7177000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0016          54135.5826000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0017          54519.5292000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0018          54569.4146000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0019          54678.1000000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0020          54819.7198000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0021          54862.5883999999999999 (d) frozen=True),
     MJDParameter(   DMXR1_0022          54925.4324000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0023          54981.2806000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0024          54998.2092000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0025          53926.1631000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0026          53968.0623000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0027          54008.9535000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0028          54177.4780000000000000 (d) frozen=True),
     MJDParameter(   DMXR1_0029          54472.6626000000000001 (d) frozen=True),
     MJDParameter(   DMXR1_0030          55108.9038000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0002          53420.5810999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0003          53448.5144999999999998 (d) frozen=True),
     MJDParameter(   DMXR2_0004          53477.4295000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0005          53532.2715000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0006          53603.0846000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0007          53628.9835000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0008          53686.8370000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0009          53715.7616999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0010          53750.6622000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0011          53798.5341000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0012          53851.3992000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0013          53891.2801000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0014          54043.8674000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0015          54092.7426000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0016          54135.6066000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0017          54519.5561999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0018          54569.4669000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0019          54678.1283000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0020          54819.7462000000000001 (d) frozen=True),
     MJDParameter(   DMXR2_0021          54862.6144999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0022          54925.4613000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0023          54981.3252000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0024          54998.2268000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0025          53926.1924000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0026          53968.0901000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0027          54008.9866000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0028          54177.5085999999999999 (d) frozen=True),
     MJDParameter(   DMXR2_0029          54472.6889000000000000 (d) frozen=True),
     MJDParameter(   DMXR2_0030          55108.9221000000000000 (d) frozen=True)),
 BinaryDD(
     floatParameter( PB                  12.327171194774200418 (d) +/- 7.9493185824e-10 d frozen=False),
     floatParameter( PBDOT               0.0               () frozen=True),
     floatParameter( A1                  9.2307804312998   (ls) +/- 3.6890718667634e-07 ls frozen=False),
     floatParameter( A1DOT               0.0               (ls / s) frozen=True),
     floatParameter( ECC                 2.174526566823692e-05 () +/- 4.027191312623e-08 frozen=False),
     floatParameter( EDOT                0.0               (1 / s) frozen=True),
     MJDParameter(   T0                  49452.9406950773356469 (d) +/- 0.0016903183053283725 d frozen=False),
     floatParameter( OM                  276.55142180589701234 (deg) +/- 0.04936551005019606 deg frozen=False),
     floatParameter( OMDOT               0.0               (deg / yr) frozen=True),
     floatParameter( M2                  0.2611131248072343 (solMass) +/- 0.02616161008932908 solMass frozen=False),
     floatParameter( SINI                0.9974171733520092 () +/- 0.0018202351513085199 frozen=False),
     floatParameter( FB0                 UNSET,
     floatParameter( A0                  0.0               (s) frozen=True),
     floatParameter( B0                  0.0               (s) frozen=True),
     floatParameter( GAMMA               0.0               (s) frozen=True),
     floatParameter( DR                  0.0               () frozen=True),
     floatParameter( DTH                 0.0               () frozen=True))]

To switch the order of a component, just change the order of the component list

NB: that this should almost never be done! In most cases the default order of the delay components is correct. Experts only!

[16]:
# Let's look at the order of the components in the delay list first
_ = [print(dc.__class__) for dc in m.DelayComponent_list]
<class 'pint.models.astrometry.AstrometryEquatorial'>
<class 'pint.models.troposphere_delay.TroposphereDelay'>
<class 'pint.models.solar_system_shapiro.SolarSystemShapiro'>
<class 'pint.models.solar_wind_dispersion.SolarWindDispersion'>
<class 'pint.models.dispersion_model.DispersionDM'>
<class 'pint.models.dispersion_model.DispersionDMX'>
<class 'pint.models.binary_dd.BinaryDD'>
[17]:
# Now let's swap the order of DispersionDMX and Dispersion
component, order, from_list, comp_type = m.map_component("DispersionDMX")
new_order = 3
from_list[order], from_list[new_order] = from_list[new_order], from_list[order]
[18]:
# Print the classes to see the order switch
_ = [print(dc.__class__) for dc in m.DelayComponent_list]
<class 'pint.models.astrometry.AstrometryEquatorial'>
<class 'pint.models.troposphere_delay.TroposphereDelay'>
<class 'pint.models.solar_system_shapiro.SolarSystemShapiro'>
<class 'pint.models.dispersion_model.DispersionDMX'>
<class 'pint.models.dispersion_model.DispersionDM'>
<class 'pint.models.solar_wind_dispersion.SolarWindDispersion'>
<class 'pint.models.binary_dd.BinaryDD'>

Delays are always computed in the order of the DelayComponent_list

[19]:
# First get the toas
from pint.toa import get_TOAs

t = get_TOAs(pint.config.examplefile("B1855+09_NANOGrav_dfg+12.tim"), model=m)
[20]:
# compute the total delay
total_delay = m.delay(t)
total_delay
[20]:
$[386.46308,~292.74495,~123.64676,~\dots,~-325.92845,~-401.67721,~-41.33315] \; \mathrm{s}$

One can get the delay up to some component. For example, if you want the delay computation stop after the Solar System Shapiro delay.

By default the delay of the specified component is included. This can be changed by the keyword parameter include_last=False.

[21]:
to_jump_delay = m.delay(t, cutoff_component="SolarSystemShapiro")
to_jump_delay
[21]:
$[392.26834,~299.04792,~129.09853,~\dots,~-335.16783,~-395.83023,~-36.454998] \; \mathrm{s}$

Here is a list of all the Component types that PINT knows about

[22]:
Component.component_types
[22]:
{'AbsPhase': pint.models.absolute_phase.AbsPhase,
 'AstrometryEquatorial': pint.models.astrometry.AstrometryEquatorial,
 'AstrometryEcliptic': pint.models.astrometry.AstrometryEcliptic,
 'BinaryBT': pint.models.binary_bt.BinaryBT,
 'BinaryBTPiecewise': pint.models.binary_bt.BinaryBTPiecewise,
 'BinaryDD': pint.models.binary_dd.BinaryDD,
 'BinaryDDS': pint.models.binary_dd.BinaryDDS,
 'BinaryDDGR': pint.models.binary_dd.BinaryDDGR,
 'BinaryDDH': pint.models.binary_dd.BinaryDDH,
 'BinaryDDK': pint.models.binary_ddk.BinaryDDK,
 'BinaryELL1': pint.models.binary_ell1.BinaryELL1,
 'BinaryELL1H': pint.models.binary_ell1.BinaryELL1H,
 'BinaryELL1k': pint.models.binary_ell1.BinaryELL1k,
 'ChromaticCM': pint.models.chromatic_model.ChromaticCM,
 'DispersionDM': pint.models.dispersion_model.DispersionDM,
 'DispersionDMX': pint.models.dispersion_model.DispersionDMX,
 'DispersionJump': pint.models.dispersion_model.DispersionJump,
 'FDJumpDM': pint.models.dispersion_model.FDJumpDM,
 'DMWaveX': pint.models.dmwavex.DMWaveX,
 'FD': pint.models.frequency_dependent.FD,
 'Glitch': pint.models.glitch.Glitch,
 'PhaseOffset': pint.models.phase_offset.PhaseOffset,
 'PiecewiseSpindown': pint.models.piecewise.PiecewiseSpindown,
 'IFunc': pint.models.ifunc.IFunc,
 'PhaseJump': pint.models.jump.PhaseJump,
 'ScaleToaError': pint.models.noise_model.ScaleToaError,
 'ScaleDmError': pint.models.noise_model.ScaleDmError,
 'EcorrNoise': pint.models.noise_model.EcorrNoise,
 'PLDMNoise': pint.models.noise_model.PLDMNoise,
 'PLRedNoise': pint.models.noise_model.PLRedNoise,
 'SolarSystemShapiro': pint.models.solar_system_shapiro.SolarSystemShapiro,
 'SolarWindDispersion': pint.models.solar_wind_dispersion.SolarWindDispersion,
 'SolarWindDispersionX': pint.models.solar_wind_dispersion.SolarWindDispersionX,
 'Spindown': pint.models.spindown.Spindown,
 'FDJump': pint.models.fdjump.FDJump,
 'TroposphereDelay': pint.models.troposphere_delay.TroposphereDelay,
 'Wave': pint.models.wave.Wave,
 'WaveX': pint.models.wavex.WaveX}

When PINT builds a model from a par file, it has to infer what components to include in the model. This is done by the component_special_params of each Component. A component will be instantiated when one of its special parameters is present in the par file.

[23]:
from collections import defaultdict

special = defaultdict(list)
for comp, tp in Component.component_types.items():
    for p in tp().component_special_params:
        special[p].append(comp)


special
[23]:
defaultdict(list,
            {'RAJ': ['AstrometryEquatorial'],
             'DECJ': ['AstrometryEquatorial'],
             'PMRA': ['AstrometryEquatorial'],
             'PMDEC': ['AstrometryEquatorial'],
             'RA': ['AstrometryEquatorial'],
             'DEC': ['AstrometryEquatorial'],
             'ELONG': ['AstrometryEcliptic'],
             'ELAT': ['AstrometryEcliptic'],
             'PMELONG': ['AstrometryEcliptic'],
             'PMELAT': ['AstrometryEcliptic'],
             'LAMBDA': ['AstrometryEcliptic'],
             'BETA': ['AstrometryEcliptic'],
             'PMLAMBDA': ['AstrometryEcliptic'],
             'PMBETA': ['AstrometryEcliptic'],
             'DMX_0001': ['DispersionDMX'],
             'DMXR1_0001': ['DispersionDMX'],
             'DMXR2_0001': ['DispersionDMX'],
             'DMWXFREQ_0001': ['DMWaveX'],
             'DMWXSIN_0001': ['DMWaveX'],
             'DMWXCOS_0001': ['DMWaveX'],
             'NE_SW': ['SolarWindDispersion'],
             'SWM': ['SolarWindDispersion'],
             'SWP': ['SolarWindDispersion'],
             'NE1AU': ['SolarWindDispersion'],
             'SOLARN0': ['SolarWindDispersion'],
             'SWXDM_0001': ['SolarWindDispersionX'],
             'SWXP_0001': ['SolarWindDispersionX'],
             'SWXR1_0001': ['SolarWindDispersionX'],
             'SWXR2_0001': ['SolarWindDispersionX'],
             'WXFREQ_0001': ['WaveX'],
             'WXSIN_0001': ['WaveX'],
             'WXCOS_0001': ['WaveX']})