Repository navigation
increased accuracy of intermediate rotation transforms - #4290
StuartLittlefair wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
It is not a huge deal, since the erfa routine is fairly slow on its own, but this way the scale conversion to tt gets done twice, which costs a few 100 micro-sec for a single-element time on my laptop. So, maybe replace with
time = time.tt
return erfa.c2i06a(time.jd1, time.jd2)
or, to speed it up even more for the case the time already is TT,
if time.scale != 'tt':
time = time.tt
return erfa.c2i06a(time.jd1, time.jd2)
|
I'm a little worried there may be further problems along these lines. E.g., while trying to understand the usage of |
…ws how to handle this case correctly
…en utc is outside IERS table range
|
@mhvk - yes, there are pretty much all oversights - in most places the typical use cases involve providing the right kind of I'll go through and find all these ASAP, and then make a PR building from this one to address them all at once (we could merge this now, but something's odd with the tests that I don't see locally. And I'll want to try to do all of them consistenly anyway so it'll probably just be simpler to do a new PR) |
|
Sounds good! |
|
While this is being done, can you sanity check the gcrs to icrs transform? You use the erfa routine aticq with gcrs RA and Dec as inputs but I thought this was supposed to take cirs coordinates? |
|
@StuartLittlefair - Ah, yeah, that's not at all obvious, but my read of the docs is that same function to do the transform works for both CIRS<->ICRS and GCRS<->ICRS. The key is what you pass in as the P.S. @StuartLittlefair , this discussion makes me think you'd be an excellent candidate for at least some part of #4268 ... just sayin ;) |
The era routines for calculating rotation matrices and earth rotation angle are specific about which timescale they want their inputs in. This pull request make sure that these transforms use the correct timescales.