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

Add a toggle to scale and shift pulsar distances in the CW delay model #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions enterprise_extensions/deterministic.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def cw_delay(toas, pos, pdist,
phase0=0, psi=0,
psrTerm=False, p_dist=1, p_phase=None,
evolve=False, phase_approx=False, check=False,
tref=0):
tref=0, scale_shift_pdists=True):
"""
Function to create GW incuced residuals from a SMBMB as
defined in Ellis et. al 2012,2013.
Expand Down Expand Up @@ -285,6 +285,10 @@ def cw_delay(toas, pos, pdist,
Check if frequency evolves significantly over obs. time [boolean]
:param tref:
Reference time for phase and frequency [s]
:param scale_shift_pdists:
Toggle to scale and shift input p_dist param by distances in
enterprise pulsar. False to just use the input p_dist param directly.
Default True [boolean]

:return: Vector of induced residuals

Expand All @@ -295,7 +299,10 @@ def cw_delay(toas, pos, pdist,
fgw = 10**log10_fgw
gwtheta = np.arccos(cos_gwtheta)
inc = np.arccos(cos_inc)
p_dist = (pdist[0] + pdist[1]*p_dist)*const.kpc/const.c
if scale_shift_pdists:
p_dist = (pdist[0] + pdist[1]*p_dist)*const.kpc/const.c
else:
p_dist = p_dist*const.kpc/const.c

if log10_h is None and log10_dist is None:
raise ValueError("one of log10_dist or log10_h must be non-None")
Expand Down
Loading