Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Improvements to designmatrix and fast random models #1334

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
10 changes: 7 additions & 3 deletions docs/examples/How_to_build_a_timing_model_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(self):
# Add reference epoch time.
self.add_param(
p.MJDParameter(
name="PEPOCH_P0",
name="PEPOCH",
description="Reference epoch for spin-down",
time_scale="tdb",
)
Expand Down Expand Up @@ -188,7 +188,11 @@ def d_F1_d_P1(self):
def get_dt(self, toas, delay):
"""dt from the toas to the reference time."""
# toas.table['tdbld'] stores the tdb time in longdouble.
return (toas.table["tdbld"] - self.PEPOCH_P0.value) * u.day - delay
return (toas.table["tdbld"] - self.PEPOCH.value) * u.day - delay

def get_spin_terms(self):
"""Return a list of the spin term values in the model: [F0, F1, ..., FN]."""
return [self.F0.quantity, self.F1.quantity]

# Defining the phase function, which is added to the self.phase_funcs_component
def spindown_phase_period(self, toas, delay):
Expand Down Expand Up @@ -222,7 +226,7 @@ def d_phase_d_P1(self, toas, param, delay):
DECJ -20:21:29.0 1 0.4
P0 0.016264003404474613 1 0
P1 3.123955D-19 1 0
PEPOCH_P0 53750.000000
PEPOCH 53750.000000
POSEPOCH 53750.000000
DM 223.9 1 0.3
SOLARN0 0.00
Expand Down
Loading