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

Apparent internal inconsistency in calculation of polycos #1852

Open
marlow511 opened this issue Oct 23, 2024 · 1 comment
Open

Apparent internal inconsistency in calculation of polycos #1852

marlow511 opened this issue Oct 23, 2024 · 1 comment
Assignees

Comments

@marlow511
Copy link

I am trying to calculate phase values for the pulsar J0332+5434 using 

pint.polycos. In doing so, I encountered an inconsistency in the phase
values produced using different mjdStart and mjdEnd values, even though
the times for which phases were calculated always lay within the range
defined by mjdStart and mjdEnd. Moreover, this behavior has an odd
history dependence. Two simple test scripts (attached) illustrate the
problem.

test6.py calculates a set of polycos for a variety of intervals. It then
uses eval_abs_phase() to calculate the fractional phases for five times that
are representative of the observation interval. The output from this run
is shown below (Table 1). The table at the end shows good agreement among the polyco calculations. Moreover, the results are reasonably consistent
with tempo.

test7.py also calculates a set of polycos, but just for a single user-specified
interval. As can be seen from Table 2 below, the results are not consistent.

Note that this inconsistency appears to be internal to PINT.polycos.
test6.py.md
test7.py.md

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Table 1
Output of test6.py (warning messages have been suppressed)
model=# Created: 2024-10-23T16:41:45.078604

PINT_version: 1.0.1

User: marlow

Host: phy-marlowfcp2

OS: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.17

Python: 3.8.13 (default, Mar 28 2022, 11:38:47)

[GCC 7.5.0]

Format: pint

PSRJ J0332+5434
UNITS TDB
RM -64.33 0 0.06
DILATEFREQ N
DMDATA N
NTOA 0
RAJ 3:32:59.40960000 0 0.00009999999999999999
DECJ 54:34:43.32900000 0 0.00100000000000000002
PMRA 16.97 0 0.03
PMDEC -10.37 0 0.05
PX 0.59 0 0.02
POSEPOCH 56000.0000000000000000
F0 1.39954153872 0 6e-12
F1 -4.01197e-15 0 1.4e-20
F2 5.3e-28 0 1.5e-28
PEPOCH 46473.0000000000000000
PLANET_SHAPIRO N
DM 26.7641 0 0.0001

t[0:5]=[60593.725 60593.73125 60593.7375 60593.74375 60593.75 ]
Start Stop 1 2 3 4 5 6
60593.0 60594.0 [0.7217132 0.51647065 0.3112414 0.10602414 0.90082022]
60592.0 60595.0 [0.7217132 0.51647065 0.3112414 0.10602414 0.90082022]
60593.5 60594.0 [0.7217132 0.51647065 0.3112414 0.10602414 0.90082022]
60593.6 60593.8 [0.72171322 0.51647139 0.3112419 0.10602382 0.90081899]
60593.7 60593.8 [0.72171315 0.51647053 0.3112413 0.10602403 0.90081961]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Table 2
Concatenated outputs of multiple runs of test7.py

Using interval 0
t[0:5]=[60593.725 60593.73125 60593.7375 60593.74375 60593.75 ]
Start Stop 1 2 3 4 5 6
60593.0 60594.0 [0.7217132 0.51647065 0.3112414 0.10602414 0.90082022]
Using interval 1
t[0:5]=[60593.725 60593.73125 60593.7375 60593.74375 60593.75 ]
Start Stop 1 2 3 4 5 6
60592.0 60595.0 [0.68782502 0.48258246 0.27735321 0.07213596 0.86693203]
Using interval 2
t[0:5]=[60593.725 60593.73125 60593.7375 60593.74375 60593.75 ]
Start Stop 1 2 3 4 5 6
60593.5 60594.0 [0.73866852 0.53342597 0.32819672 0.12297946 0.91777554]
Using interval 3
t[0:5]=[60593.725 60593.73125 60593.7375 60593.74375 60593.75 ]
Start Stop 1 2 3 4 5 6
60593.6 60593.8 [0.07482819 0.86958636 0.66435691 0.45913879 0.25393397]
Using interval 4
t[0:5]=[60593.725 60593.73125 60593.7375 60593.74375 60593.75 ]
Start Stop 1 2 3 4 5 6
60593.7 60593.8 [4.10988871e-01 2.05746249e-01 5.17067856e-04 7.95299743e-01
5.90095332e-01]

@dlakaplan
Copy link
Contributor

Potentially also related to #1713 and #1369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants