Tutorials
These are step-by-step guides you can follow to show you what PINT can do. Quick common tasks are explained on the PINT Wiki. If you want some explanations of why things work this way, see the Explanation section. If you want details on a particular function that comes up, see the Reference section. More complicated tasks are discussed in the How-tos.
Data Files
The data files (par
and tim
) associated with the tutorials and
other examples can be located via pint.config.examplefile()
(available via the pint.config
module):
import pint.config
fullfilename = pint.config.examplefile(filename)
For example, the file NGC6440E.par
from the
Time a Pulsar notebook can be found via:
import pint
fullfilename = pint.config.examplefile("NGC6440E.par")
Examples
These tutorials examples are
in the form of Jupyter notebooks, downloadable from a link at the top
of each page. (Also available in the same place is a plain-python
script version, in case this is more convenient.) You should be able
to download these files and run them from anywhere convenient
(provided PINT
is installed). Finally, there are additional
notebooks you can download from the PINT Wiki or the
GitHub examples directory: these
are not included in the default build because they take too long, but you can download and run them yourself.
- Basic installation
- Time a pulsar
- PINT Example Session
- Demonstrate the use of PINT in a script
- Accessing correlation matrices and model derivatives
- Check the state of PINT’s clock corrections
- Understand Observatory Clock Corrections
- Understanding Timing Models
- Understanding Parameters
- Building a timing model from scratch
- First let us see all the possible components we can use
- Choose your components
- Construct timing model (i.e.,
TimingModel
instance) - View the components in the timing model instance
- Useful methods of
TimingModel
- Component order
- Add parameter values
- Set up and Validating the model
- Add a component to the timing model
- Delete a component
- Add prefix-style parameters
- Display the existing DMX parameters
- Add DMX parameters
- Check if the parameter and component setup correctly.
- Remove a parameter
- Add higher order derivatives of spin frequency to timing model
- How to compose a timing model component
- Building the timing model component from scratch
- Import the necessary modules
- Define the timing model class
- Apply the new component to the
TimingModel
- Understanding Fitters
- PINT Noise Fitting Examples
- Red noise, DM noise, and chromatic noise fitting examples
- Working With TOA Flags
- Wideband TOA fitting
- Generate fake data on a relativistic DNS, make a mass-mass diagram
- Check for phase connection
- PINT Observatories
- Solar Wind Models
- MCMC Walkthrough
- PINT Bayesian Interface Examples
- PINT Bayesian Interface Example (Wideband)
- Demonstrate TOA simulation using PINT
- Validation Example for PINT paper
- Print the PINT and TEMPO/TEMPO2 version
- Redefine the Tempo2_util function for larger number of observations
- Set up date file path for PSR J1600-3053.
- Load TOAs to PINT
- Load timing model from .par file
- Make the General Least Square fitter
- Fit TOAs for 9 iterations.
- The weighted RMS value for pre-fit and post-fit residuals
- Plot the pre-fit and post-fit residuals
- Use tempo_utils to analysis the same data set.
- Write the TEMPO postfit model to a new .par file, for comparison later
- Get the TEMPO residuals
- Plot the PINT - TEMPO residual difference.
- Compare the parameter between TEMPO and PINT
- Print the parameter difference in a table.
- If one wants the Latex output please use the cell below.
- Check out the maximum DMX difference
- Output the table in the paper
- PINT refit using the modified tempo2-style parfile
- Tempo2 fit
- Get TEMPO2 residuals, toa value, observing frequencies, and data error
- Plot the TEMPO2 - PINT residual difference
- Write out the TEMPO2 postfit parameter to a new file
- Compare the parameter between TEMPO2 and PINT
- Print the parameter difference in a table.
- If one wants to get the latex version, please use the line below.
- Check out the maximum DMX difference
- Output the table in the paper
- The residual difference between PINT and TEMPO2 is at the level of ~1ns