pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel
- class pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel(t=None, input_params=None)[source]
Bases:
DDmodel
DDK model, a Kopeikin method corrected DD model.
The main difference is that DDK model considers the effects on the pulsar binary parameters from the annual parallax of earth and the proper motion of the pulsar.
From Kopeikin (1995) this includes \(\Delta_{\pi M}\) (Equation 17), the mixed annual-orbital parallax term, which changes \(a_1\) and \(\omega\) (
delta_a1_parallax()
anddelta_omega_parallax()
).It does not include \(\Delta_{\pi P}\), the pure pulsar orbital parallax term (Equation 14).
From Kopeikin (1996) this includes apparent changes in \(\omega\), \(a_1\), and \(i\) due to the proper motion (
delta_omega_proper_motion()
,delta_a1_proper_motion()
,delta_kin_proper_motion()
) (Equations 8, 9, 10).Special parameters are:
- KIN
the inclination angle: \(i\)
- KOM
the longitude of the ascending node, Kopeikin (1995) Eq 9: \(\Omega\)
- K96
flag for Kopeikin binary model proper motion correction
It also removes:
- SINI
use
KIN
instead
Notes
This model defines KOM with reference to east, either equatorial or ecliptic depending on how the model is defined. KOM and KIN are defined in the Damour & Taylor (1992) convention (DT92), where
KIN = 180 deg means the orbital angular momentum vector points toward the Earth, and KIN = 0 means the orbital angular momentum vector points away from the Earth.
KOM is 0 toward the East and increases clockwise on the sky; it is measured “East through North.”
References
Kopeikin (1995), ApJ, 439, L5 [1]
Kopeikin (1996), ApJ, 467, L93 [2]
Damour & Taylor (1992), Phys Rev D, 45, 1840 [3]
Methods
DDdelay
()Full DD model delay
Doppler
()Dre
()Dre defined in T.
Drep
()Derivative of Dre respect to T.
Drepp
()Derivative of Drep respect to T.
E
()Eccentric Anomaly
M
()Orbit phase.
P
()Pobs_designmatrix
(params)TM2
()a1
()a1_k
([proper_motion, parallax])Compute Kopeikin corrected projected semi-major axis.
add_binary_params
(parameter, defaultValue[, ...])Add one parameter to the binary class.
add_inter_vars
(interVars)alpha
()Alpha defined in T.
beta
()Beta defined in T.
Returns total pulsar binary delay.
compute_eccentric_anomaly
(eccentricity, ...)Solve the Kepler Equation, E - e * sin(E) = M
d_DDdelay_d_par
(par)Full DD model delay derivative
d_Dre_d_par
(par)Derivative.
d_Drep_d_par
(par)Derivative.
d_Drepp_d_par
(par)Derivative.
d_E_d_ECC
()d_E_d_EDOT
()d_E_d_T0
()Analytic derivative
d_E_d_par
(par)derivative for E respect to binary parameter.
d_M_d_par
(par)derivative for M respect to binary parameter.
d_Pobs_d_A1
()d_Pobs_d_A1DOT
()d_Pobs_d_ECC
()d_Pobs_d_EDOT
()d_Pobs_d_OM
()d_Pobs_d_OMDOT
()d_Pobs_d_P0
()d_Pobs_d_P1
()d_Pobs_d_PB
()d_Pobs_d_PBDOT
()d_Pobs_d_T0
()d_SINI_d_KIN
()d_SINI_d_KOM
()d_SINI_d_T0
()d_SINI_d_par
(par)d_TM2_d_M2
()d_a1_d_A1
()d_a1_d_A1DOT
()d_a1_d_T0
()d_a1_d_par
(par)d_a1_k_d_par
(par[, proper_motion, parallax])d_alpha_d_par
(par)Damour and N. Deruelle (1986) equation [46]
Derivative.
Derivative.
Derivative.
Derivative.
Derivative.
Derivative.
d_beta_d_par
(par)Derivative.
d_binarydelay_d_par
(par)Get the binary delay derivatives respect to parameters.
d_delayA_d_par
(par)Derivative.
d_delayI_d_par
(par)Derivative on delay inverse.
d_delayS_d_par
(par)Derivative.
d_delta_a1_parallax_d_KIN
()d_delta_a1_parallax_d_KOM
()d_delta_a1_parallax_d_T0
()d_delta_a1_proper_motion_d_KIN
()d_delta_a1_proper_motion_d_KOM
()d_delta_a1_proper_motion_d_T0
()d_delta_omega_parallax_d_KIN
()d_delta_omega_parallax_d_KOM
()d_delta_omega_parallax_d_T0
()d_delta_omega_proper_motion_d_KIN
()d_delta_omega_proper_motion_d_KOM
()d_delta_omega_proper_motion_d_T0
()d_eTheta_d_DTH
()d_eTheta_d_par
(par)d_ecc_d_ECC
()d_ecc_d_EDOT
()d_ecc_d_T0
()d_er_d_DR
()d_er_d_par
(par)d_kin_d_par
(par)d_kin_proper_motion_d_KOM
()d_kin_proper_motion_d_T0
()d_nhat_d_par
(par)Derivative.
d_nu_d_E
()Analytic calculation.
d_nu_d_EDOT
()Analytic calculation.
d_nu_d_ecc
()d_nu_d_par
(par)derivative for nu respect to binary parameter.
dOmega/dOM = 1
Derivative.
dOmega/dPB = dnu/dPB*k+dk/dPB*nu
d_omega_d_par
(par)derivative for omega respect to user input Parameter.
d_omega_k_d_par
(par[, proper_motion, parallax])d_pb_d_par
(par)derivative for pbprime respect to binary parameter.
delayA
()Binary Aberration delay
delayE
()Binary Einstein delay
DD model Inverse timing delay.
delayR
()Roemer delay defined in T.
delayS
()Binary shapiro delay
delay_designmatrix
(params)delta_I0
()\(\Delta_{I0}\)
delta_J0
()\(\Delta_{J0}\)
Reference: (Kopeikin 1995 Eq 18)
The correction on a1 (projected semi-major axis) due to the pulsar proper motion (Kopeikin 1996 Eq 8):
The time dependent inclination angle (Kopeikin 1996 Eq 10):
Reference: (Kopeikin 1995 Eq 19)
The correction on omega (Longitude of periastron) due to the pulsar proper motion (Kopeikin 1996 Eq 9):
Reference (Kopeikin 1995 Eq 18).
eTheta
()ecc
()Calculate eccentricity with EDOT
er
()get_tt0
(barycentricTOA)tt0 = barycentricTOA - T0
kin
()nhat
()nhat defined as T.
nu
()True anomaly (Ae)
omega
()Damour and N. Deruelle (1986) equation [25]
omega_k
([proper_motion, parallax])A function to compute Kopeikin corrected projected omega.
orbits
()pb
()pbdot
()pbprime
()prtl_der
(y, x)Find the partial derivatives in binary model pdy/pdx
search_alias
(parname)set_param_values
([valDict])Set the parameters and assign values,
t0
()update_input
(**updates)Update the toas and parameters.
Attributes
KOM
SINI
T0
cos_KOM
cos_lat
cos_long
k
psr_pos
sin_KOM
sin_lat
sin_long
t
tt0
- delta_kin_proper_motion()[source]
The time dependent inclination angle (Kopeikin 1996 Eq 10):
\[ \begin{align}\begin{aligned}ki = KIN + \delta_{KIN}\\\delta_{KIN} = (-\mu_{long} \sin(KOM) + \mu_{lat} \cos(KOM)) (t-T_0)\end{aligned}\end{align} \]
- delta_a1_proper_motion()[source]
The correction on a1 (projected semi-major axis) due to the pulsar proper motion (Kopeikin 1996 Eq 8):
\[ \begin{align}\begin{aligned}\delta_x = a_1 \cot(kin) (-\mu_{long}\sin(KOM) + \mu_{lat}\cos(KOM)) (t-T_0)\\\delta_{kin} = (-\mu_{long} \sin(KOM) + \mu_{lat} \cos(KOM)) (t-T_0)\\\delta_x = a_1 \delta_{kin} \cot(kin)\end{aligned}\end{align} \]
- delta_omega_proper_motion()[source]
The correction on omega (Longitude of periastron) due to the pulsar proper motion (Kopeikin 1996 Eq 9):
\[\delta_{\Omega} = \csc(i) (\mu_{long}\cos(KOM) + \mu_{lat} \sin(KOM)) (t-T_0)\]
- delta_sini_parallax()[source]
Reference (Kopeikin 1995 Eq 18). Computes:
\[x_{obs} = \frac{a_p \sin(i)_{obs}}{c}\]Since \(a_p\) and \(c\) will not be changed by parallax:
\[ \begin{align}\begin{aligned}x_{obs} = \frac{a_p}{c}(\sin(i)_{\rm intrisic} + \delta_{\sin(i)})\\\delta_{\sin(i)} = \sin(i)_{\rm intrisic} \frac{\cot(i)_{\rm intrisic}}{d} (\Delta_{I0} \sin KOM - \Delta_{J0} \cos KOM)\end{aligned}\end{align} \]
- a1_k(proper_motion=True, parallax=True)[source]
Compute Kopeikin corrected projected semi-major axis.
- Parameters:
proper_motion (boolean, optional, default True) – Flag for proper_motion correction
parallax (boolean, optional, default True) – Flag for parallax correction
- omega_k(proper_motion=True, parallax=True)[source]
A function to compute Kopeikin corrected projected omega.
- Parameters:
proper_motion (boolean, optional, default True) – Flag for proper_motion correction
parallax (boolean, optional, default True) – Flag for parallax correction
- DDdelay()
Full DD model delay
- Dre()
Dre defined in T. Damour and N. Deruelle (1986) equation [48]
Computes:
delayR = alpha*(cos(E)-er) + beta*sin(E) delayE = gamma*sin(E) Dre = delayR + delayE
- Drep()
Derivative of Dre respect to T. Damour and N. Deruelle (1986) equation [49]
Computes:
Drep = -alpha*sin(E)+(beta+gamma)*cos(E)
- Drepp()
Derivative of Drep respect to T. Damour and N. Deruelle (1986) equation [50]
Computes:
Drepp = -alpha*cos(E)-(beta+GAMMA)*sin(E)
- E()
Eccentric Anomaly
- M()
Orbit phase.
- add_binary_params(parameter, defaultValue, unit=False)
Add one parameter to the binary class.
- alpha()
Alpha defined in T. Damour and N. Deruelle (1986) equation [46]
Computes:
alpha = A1/c*sin(omega)
- beta()
Beta defined in T. Damour and N. Deruelle (1986) equation [47]
Computes:
beta = A1/c*(1-eTheta**2)**0.5*cos(omega)
- binary_delay()
Returns total pulsar binary delay.
- Returns:
Pulsar binary delay in the units of second
- Return type:
- compute_eccentric_anomaly(eccentricity, mean_anomaly)
Solve the Kepler Equation, E - e * sin(E) = M
- Parameters:
eccentricity (array_like) – Eccentricity of binary system
mean_anomaly (array_like) – Mean anomaly of the binary system
- Returns:
The eccentric anomaly in radians, given a set of mean_anomalies in radians.
- Return type:
array_like
- d_DDdelay_d_par(par)
Full DD model delay derivative
- d_Dre_d_par(par)
Derivative.
Computes:
Dre = alpha*(cos(E)-er)+(beta+gamma)*sin(E) dDre = alpha*(-der-dE*sin(E)) + (cos[E]-er)*dalpha + (dBeta+dGamma)*sin(E) + (beta+gamma)*cos(E)*dE dDre/dpar = alpha*(-der/dpar-dE/dpar*sin(E)) + (cos[E]-er)*dalpha/dpar + (dBeta/dpar+dGamma/dpar)*sin(E) + (beta+gamma)*cos(E)*dE/dpar er = e + Dr
- d_Drep_d_par(par)
Derivative.
Computes:
Drep = -alpha*sin(E)+(beta+gamma)*cos(E) dDrep = -alpha*cos(E)*dE + cos(E)*(dbeta+dgamma) -(beta+gamma)*dE*sin(E)-dalpha*sin(E) dDrep/dPar = -sin(E)*dalpha/dPar -(alpha*cos(E)+(beta+gamma)*sin(E))*dE/dPar + cos(E)(dbeta/dPar+dgamma/dPar)
- d_Drepp_d_par(par)
Derivative.
Computes:
Drepp = -alpha*cos(E)-(beta+GAMMA)*sin(E) dDrepp = -(beta+gamma)*cos(E)*dE - cos(E)*dalpha +alpha*sin(E)*dE - (dbeta+dgamma)*sin(E) dDrepp/dPar = -cos(E)*dalpha/dPar +(alpha*sin(E)-(beta+gamma)*cos(E))*dE/dPar -(dbeta/dPar+dgamma/dPar)*sin(E)
- d_E_d_T0()
Analytic derivative
d(E-e*sinE)/dT0 = dM/dT0 dE/dT0(1-cosE*e)-de/dT0*sinE = dM/dT0 dE/dT0(1-cosE*e)+eDot*sinE = dM/dT0
- d_E_d_par(par)
derivative for E respect to binary parameter.
- Parameters:
par (string) – parameter name
- Return type:
Derivative of E respect to par
- d_M_d_par(par)
derivative for M respect to binary parameter.
- Parameters:
par (string) – parameter name
- Return type:
Derivative of M respect to par
- d_alpha_d_par(par)
Damour and N. Deruelle (1986) equation [46]
Computes:
alpha = a1/c*sin(omega) dAlpha/dpar = d_a1_d_par /c * sin(omega) + a1/c*cos(omega)*dOmega/dPar
- d_beta_d_A1()
Derivative.
Computes:
dBeta/dA1 = 1.0/c*(1-eTheta**2)**0.5*cos(omega) * d_a1_d_A1
- d_beta_d_A1DOT()
Derivative.
Computes:
dBeta/dA1DOT = * d_a1_d_A1DOT/c*(1-eTheta**2)**0.5*cos(omega)
- d_beta_d_DTH()
Derivative.
Computes:
dBeta/dDth = a1/c*((-(e+dr)/sqrt(1-(e+dr)**2)*cos(omega)
- d_beta_d_ECC()
Derivative.
Computes:
dBeta/dECC = A1/c*((-(e+dtheta)/sqrt(1-(e+dtheta)**2)*cos(omega)*de/dECC- (1-eTheta**2)**0.5*sin(omega)*domega/dECC de/dECC = 1
- d_beta_d_EDOT()
Derivative.
- Computes::
dBeta/dEDOT = A1/c*((-(e+dtheta)/sqrt(1-(e+dtheta)**2)*cos(omega)*de/dEDOT- (1-eTheta**2)**0.5*sin(omega)*domega/dEDOT de/dEDOT = tt0
- d_beta_d_T0()
Derivative.
Computes:
dBeta/dT0 = * d_a1_d_T0/c*(1-eTheta**2)**0.5*cos(omega)
- d_beta_d_par(par)
Derivative.
Computes:
beta = A1/c*(1-eTheta**2)**0.5*cos(omega) eTheta = ecc+Dth ?? dBeta/dA1 = 1.0/c*(1-eTheta**2)**0.5*cos(omega) dBeta/dECC = A1/c*((-(e+dr)/sqrt(1-(e+dr)**2)*cos(omega)*de/dECC- (1-eTheta**2)**0.5*sin(omega)*domega/dECC dBeta/dEDOT = A1/c*((-(e+dr)/sqrt(1-(e+dr)**2)*cos(omega)*de/dEDOT- (1-eTheta**2)**0.5*sin(omega)*domega/dEDOT dBeta/dDth = A1/c*(-(e+dr)/sqrt(1-(e+dr)**2)*cos(omega) Other parameters dBeta/dPar = -A1/c*(1-eTheta**2)**0.5*sin(omega)*dOmega/dPar
- d_binarydelay_d_par(par)
Get the binary delay derivatives respect to parameters.
- Parameters:
par (str) – Parameter name.
- d_delayA_d_par(par)
Derivative.
Computes:
aDelay = A0*(sin(omega+E)+e*sin(omega))+B0*(cos(omega+E)+e*cos(omega)) daDelay/dpar = daDelay/dA0*dA0/dPar+ (1) daDelay/dB0*dB0/dPar+ (2) daDelay/domega*domega/dPar+ (3) daDelay/dnu*dnu/dPar+ (4) daDelay/decc*decc/dPar (5)
- d_delayI_d_par(par)
Derivative on delay inverse.
- d_delayS_d_par(par)
Derivative.
Computes:
dsDelay/dPar = dsDelay/dTM2*dTM2/dPar+ dsDelay/decc*decc/dPar+ dsDelay/dE*dE/dPar+ dsDelay/domega*domega/dPar+ dsDelay/dSINI*dSINI/dPar
- d_nhat_d_par(par)
Derivative.
Computes:
nhat = n/(1-ecc*cos(E)) n = 2*pi/PB # should here be M()? dnhat = -2*pi*dPB/PB^2*(1-ecc*cos(E)) -2*pi*(-cos(E)*decc+ecc*sin(E)*dE)/PB*(1-ecc*cos(E))^2 dnhat/dPar = -2*pi/(PB*(1-ecc*cos(E))*((dPB/dPar)/PB - (-cos(E)*decc/dPar+ecc*sin(E)*dE/dpar)/(1-e*cos(E)))
- d_nu_d_ECC()
Analytic calculation.
dnu(e,E)/dECC = dnu/de*de/dECC+dnu/dE*dE/dECC de/dECC = 1 dnu/dPBDOT = dnu/dE*dE/dECC+dnu/de
- d_nu_d_T0()
Analytic calculation.
dnu/dT0 = dnu/de*de/dT0+dnu/dE*dE/dT0 de/dT0 = -EDOT
- d_nu_d_par(par)
derivative for nu respect to binary parameter.
- Parameters:
par (string) – parameter name
- Return type:
Derivative of nu respect to par
- d_omega_d_OM()
dOmega/dOM = 1
- d_omega_d_OMDOT()
Derivative.
Calculates:
dOmega/dOMDOT = 1/n*nu n = 2*pi/PB dOmega/dOMDOT = PB/2*pi*nu
- d_omega_d_T0()
dOmega/dPB = dnu/dPB*k+dk/dPB*nu
- d_pb_d_par(par)
derivative for pbprime respect to binary parameter.
- Parameters:
par (string) – parameter name
- Return type:
Derivative of M respect to par
- delayA()
Binary Aberration delay
Damour and N. Deruelle (1986) equation [27]
- delayE()
Binary Einstein delay
Damour and N. Deruelle (1986) equation [25]
- delayInverse()
DD model Inverse timing delay.
Damour and N. Deruelle (1986) equation [46-52]
This part is convert the delay argument from proper time to coordinate time. The Roemer delay and Einstein are included in the calculation. It uses there iterations to approximate the Roemer delay and Einstein delay.
T. Damour and N. Deruelle (1986) equation [43]. The equation [52] gives a taylor expansion of equation [43].
Computes:
u - e*sin(u) = n(t-T0) nhat = du/dt nhatp = d^2u/dt^2 Drep = dDre/du Drepp = d^2Dre/du^2 Dre(t-Dre(t-Dre(t))) = Dre(u) - Drep(u)*nhat*Dre(t-Dre(t)) = Dre(u) - Drep(u)*nhat*(Dre(u)-Drep(u)*nhat*Dre(t)) + 1/2 (Drepp(u)*nhat^2 + Drep(u) * nhat * nhatp) * (Dre(t)-...)^2 = Dre(t)*(1 - nhat * Drep(u) + (nhat*Drep)^2 + 1/2*nhat^2* Dre*Drepp - 1/2*e*sin(u)/(1-e*cos(u)*nhat^2*Drep*Drep))
Here u is equivalent to E in the function.
- delayR()
Roemer delay defined in T. Damour and N. Deruelle (1986)
Computes:
delayR = alpha*(cos(E)-er) + beta*sin(E)
- delayS()
Binary shapiro delay
Damour and N. Deruelle (1986) equation [26]
- ecc()
Calculate eccentricity with EDOT
- get_tt0(barycentricTOA)
tt0 = barycentricTOA - T0
- nhat()
nhat defined as T. Damour and N. Deruelle (1986) equation [51]
Computes:
nhat = n/(1-ecc*cos(E)) n = 2*pi/PB # should here be M()
- nu()
True anomaly (Ae)
- omega()[source]
Damour and N. Deruelle (1986) equation [25]
Calculates:
omega = OM+nu*k k = OMDOT/n
(T. Damour and N. Deruelle (1986) equation between Eq 16 Eq 17)
- prtl_der(y, x)
Find the partial derivatives in binary model pdy/pdx
- set_param_values(valDict=None)
Set the parameters and assign values,
If the valDict is not provided, it will set parameter as default value
- update_input(**updates)
Update the toas and parameters.