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
More flexible read/write for polycos #1371
Conversation
P.S. Polyco calculation is slow, because it relies on making a lot of TOAs and that is slow. Which then makes testing slow (~5min just for |
Note that the change to the |
Codecov Report
@@ Coverage Diff @@
## master #1371 +/- ##
==========================================
+ Coverage 62.22% 62.26% +0.03%
==========================================
Files 89 89
Lines 20232 20260 +28
Branches 3649 3652 +3
==========================================
+ Hits 12589 12614 +25
+ Misses 6859 6856 -3
- Partials 784 790 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Some of the slow parts of working with TOAs are less with barycentric TOAs, so perhaps those could be the default for polyco tests? More broadly, I don't think there's a lot we can do to speed up polyco generation, since those slow TOA calculations are exactly what is needed to get things as seen at specific observatories. (Incidentally, how are clock corrections handled?) If we were willing to diverge from the TEMPO approach, we might find we got equally good or better approximations for the same or fewer TOAs if we distributed the TOAs according to the zeros of Chebyshev polynomials. Doing polynomial fitting on these points amounts to working in the Chebyshev basis, which is the right basis for limiting maximum absolute deviation. We might be able to get a minor speedup by generating all the TOAs at once and reusing any that are needed for more than one polyco entry (if we do that). There's also an issue pointing out that for many satellite applications, polycos are only needed for specified Good Time Intervals, and we could skip generating any outside those. Major speedups are going to require a careful analysis of where PINT spends its time when you're working with TOAs - I don't think that there is necessarily duplicated effort, but there may be many places where unnecessary precision is costing us a lot of time. |
Useful for testing frequently means more flexible for users. |
Examples of new Phase interface:
all work |
I removed the |
Changes:
Path
object or a stream (likeio.StringIO
).len()
,__getitem__
for polycos__getitem__
for Phase objects