pint.models.stand_alone_psr_binaries.BT_model.BTmodel

class pint.models.stand_alone_psr_binaries.BT_model.BTmodel(t=None, input_params=None)[source]

Bases: PSR_BINARY

This is a class independent from PINT platform for pulsar BT binary model. It is a subclass of PSR_BINARY class defined in file binary_generic.py in the same dierectory. This class is desined for PINT platform but can be used as an independent module for binary delay calculation. To interact with PINT platform, a pulsar_binary wrapper is needed. See the source file pint/models/binary_bt.py Refence ——— The ‘BT’ binary model for the pulse period. Model as in: W.M. Smart, (1962), “Spherical Astronomy”, p35 Blandford & Teukolsky (1976), ApJ, 205, 580-591

Return type:

A bt binary model class with paramters, delay calculations and derivatives.

Example

>>> import numpy
>>> t = numpy.linspace(54200.0,55000.0,800)
>>> binary_model = BTmodel()
>>> paramters_dict = {'A0':0.5,'ECC':0.01}
>>> binary_model.update_input(t, paramters_dict)
Here the binary has time input and parameters input, the delay can be
calculated.

@param PB: Binary period [days] @param ECC: Eccentricity @param A1: Projected semi-major axis (lt-sec) @param A1DOT: Time-derivative of A1 (lt-sec/sec) @param T0: Time of periastron passage (barycentric MJD) @param OM: Omega (longitude of periastron) [deg] @param EDOT: Time-derivative of ECC [0.0] @param PBDOT: Time-derivative of PB [0.0] @param OMDOT: Time-derivative of OMEGA [0.0]

Methods

BTdelay()

Full BT model delay

Doppler()

E()

Eccentric Anomaly

M()

Orbit phase.

P()

Pobs_designmatrix(params)

TM2()

a1()

add_binary_params(parameter, defaultValue[, ...])

Add one parameter to the binary class.

add_inter_vars(interVars)

binary_delay()

Returns total pulsar binary delay.

compute_eccentric_anomaly(eccentricity, ...)

Solve the Kepler Equation, E - e * sin(E) = M

d_BTdelay_d_par(par)

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_TM2_d_M2()

d_a1_d_A1()

d_a1_d_A1DOT()

d_a1_d_T0()

d_a1_d_par(par)

d_binarydelay_d_par(par)

Get the binary delay derivatives respect to parameters.

d_delayL1_d_A1()

d_delayL1_d_A1DOT()

d_delayL1_d_E()

d_delayL1_d_ECC()

d_delayL1_d_EDOT()

d_delayL1_d_GAMMA()

d_delayL1_d_OM()

d_delayL1_d_OMDOT()

d_delayL1_d_T0()

d_delayL1_d_par(par)

d_delayL2_d_A1()

d_delayL2_d_A1DOT()

d_delayL2_d_E()

d_delayL2_d_ECC()

d_delayL2_d_EDOT()

d_delayL2_d_GAMMA()

d_delayL2_d_OM()

d_delayL2_d_OMDOT()

d_delayL2_d_T0()

d_delayL2_d_par(par)

d_ecc_d_ECC()

d_ecc_d_EDOT()

d_ecc_d_T0()

d_nu_d_E()

d_nu_d_ECC()

Analytic calculation.

d_nu_d_EDOT()

d_nu_d_T0()

Analytic calculation.

d_nu_d_ecc()

d_nu_d_par(par)

derivative for nu respect to binary parameter.

d_omega_d_OM()

dOmega/dOM = 1

d_omega_d_OMDOT()

dOmega/dOMDOT = tt0

d_omega_d_T0()

dOmega/dPB = dnu/dPB*k+dk/dPB*nu

d_omega_d_par(par)

derivative for omega respect to user input Parameter.

d_pb_d_par(par)

derivative for pbprime respect to binary parameter.

delayL1()

First term of Blandford & Teukolsky (1976), ApJ, 205, 580-591, eq 2.33/ First left-hand term of W.M.

delayL2()

Second term of Blandford & Teukolsky (1976), ApJ, 205, 580-591, eq 2.33/ / Second left-hand term of W.M.

delayR()

Third term of Blandford & Teukolsky (1976), ApJ, 205, 580-591, eq 2.33 / Right-hand term of W.M.

delay_designmatrix(params)

ecc()

Calculate eccentricity with EDOT

get_tt0(barycentricTOA)

tt0 = barycentricTOA - T0

nu()

True anomaly (Ae)

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

T0

t

tt0

delayL1()[source]

First term of Blandford & Teukolsky (1976), ApJ, 205, 580-591, eq 2.33/ First left-hand term of W.M. Smart, (1962), “Spherical Astronomy”, p35 delay equation.

alpha * (cosE-e) alpha = a1*sin(omega) Here a1 is in the unit of light second as distance

delayL2()[source]

Second term of Blandford & Teukolsky (1976), ApJ, 205, 580-591, eq 2.33/ / Second left-hand term of W.M. Smart, (1962), “Spherical Astronomy”, p35 delay equation.

(beta + gamma) * sinE beta = (1-e^2)*a1*cos(omega) Here a1 is in the unit of light second as distance

delayR()[source]

Third term of Blandford & Teukolsky (1976), ApJ, 205, 580-591, eq 2.33 / Right-hand term of W.M. Smart, (1962), “Spherical Astronomy”, p35 delay equation.

(alpha*(cosE-e)+(beta+gamma)*sinE)*(1-alpha*sinE - beta*sinE)/ (pb*(1-e*coeE)) (alpha*(cosE-e)+(beta+gamma)*sinE) is define in delayL1 and delayL2

BTdelay()[source]

Full BT model delay

E()

Eccentric Anomaly

M()

Orbit phase.

add_binary_params(parameter, defaultValue, unit=False)

Add one parameter to the binary class.

binary_delay()

Returns total pulsar binary delay.

Returns:

Pulsar binary delay in the units of second

Return type:

float

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_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_binarydelay_d_par(par)

Get the binary delay derivatives respect to parameters.

Parameters:

par (str) – Parameter name.

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()

dOmega/dOMDOT = tt0

d_omega_d_T0()

dOmega/dPB = dnu/dPB*k+dk/dPB*nu

d_omega_d_par(par)

derivative for omega respect to user input Parameter.

Parameters:

par (string) – parameter name

Return type:

Derivative of omega respect to par

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

ecc()

Calculate eccentricity with EDOT

get_tt0(barycentricTOA)

tt0 = barycentricTOA - T0

nu()

True anomaly (Ae)

prtl_der(y, x)

Find the partial derivatives in binary model pdy/pdx

Parameters:
  • y (str) – Name of variable to be differentiated

  • x (str) – Name of variable the derivative respect to

Returns:

The derivatives pdy/pdx

Return type:

np.array

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.