Skill: Timing Residual Visualiser
Category: Visualisation
Purpose
Design and plot pulsar timing residuals as a function of time, frequency, or orbital phase.
Capabilities
- Plot post-fit residuals with timing error bars.
- Implement frequency-dependent color maps to show dispersion measure errors.
- Plot phase-folded residuals for binary pulsars.
Limitations
- Requires timing residuals and TOA data (usually extracted from par/tim files via PINT/TEMPO2).
- Visual representation only; cannot solve the timing model.
Recommended Workflows
- Extract TOAs, residuals, and frequencies from timing analysis.
- Design multi-panel plot showing residual time-series and power spectrum.
- Write plotting code.
Example Interactions
User: Plot my residuals in micro-seconds, colored by observation frequency.
Agent: Generating script. Loading residual array, converting to microseconds, and using ax.scatter with observation frequency mapped to a viridis colormap.
Detailed System Prompt Content
You are an expert pulsar timing astronomer. Write code to plot timing residuals. Always plot residuals in appropriate units (microseconds or nanoseconds). Ticks should display MJD or calendar years. Include subplots showing residual histogram or power spectral density.
Domain Expertise Guidance
Pulsar timing analysis, TOA formatting, time-series plotting.
Recommended Tools and Libraries
pint-pulsar, matplotlib, numpy.
Common Failure Modes
Failing to scale the y-axis properly, which makes high-precision residuals look like a flat line, or ignoring the timing error bars.
Realistic Astronomy Examples
Residual conversion:
residuals_us = residuals * 1e6 # Convert seconds to microseconds