-
Notifications
You must be signed in to change notification settings - Fork 101
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
Unknown ufunc pmsafe from astrometry.py #1733
Comments
I forgot to strip a lot of unnecessary imports etc. from the example. My apologies! |
Can you be explicit about what versions you are using (astropy, erfa, pint, numpy, ...)? |
Also, this sounds more like an enterprise issue/question. The pint-only commands work fine, right? |
I'm confused though because yes, I'm not having problems with pint commands. But this only happens when enterprise is set to use pint instead of tempo2. Enterprise is calling on pint's astrometry.py for some specific astrometric transformation that then in turn fails. I guess that's why it's not obvious to me that it's enterprise. (I'm not calling erfa directly at all, I only imported/printed it in the example to confirm it wasn't broken being invoked directly.) pint 0.9.8+175.gc50630d7 I can paste the traceback if needed. |
Can you either find what the enterprise command is, or ask @Hazboun6 ? |
You mean my actual enterprise call? Just what's in the example code, Within that, this causes the problem: And the failure is in pint's astrometry.py: |
So this is an enterprise error. The usage for
but enterprise is trying to pass a plain Quantity. Something like:
will work instead, I think. |
Or (and maybe this was the intent):
|
Note that it's possible to support quantity input, it just hasn't come up. |
Thanks very much @dlakaplan, I appreciate your help! |
(Confirmed that the change |
I agree that you should submit this as an Enterprise PR @tcromartie ! I am surprised this hasn't popped up before though, since this is in the |
@dlakaplan, @tcromartie, @Hazboun6 I am not sure whether I agree that this only an Enterprise issue. It's an inconsistency in the PINT API as well For Ecliptic coordinates, if you do For Equatorial coordinates, the units are not supported. Of course it's easy to change in Enterprise, but IMO this should be made consistent in PINT as well. I don't like Enterprise passing the
The reason this hasn't come up is because the only PTAs using PINT have been using Ecliptic coordinates. |
I think that using the quantity versions isn't actually supported, but works accidentally (the docstrings aren't all fully consistent, but don't claim to support units). However, I agree that they should. |
I have provided the code that's failing (attached w/ nominal par, tim). When building an
enterprise.pulsar
Pulsar with 'pint' selected as the timing package (psr = Pulsar(par, tim, timing_package='pint')
) and when PMRA/PMDEC are included in the model (not using'tempo2'
or when the astrometry parameters aren't included), it fails with the following:TypeError: unknown ufunc pmsafe. If you believe this ufunc should be supported, please raise an issue on https://github.com/astropy/astropy
After the
AstrometryEquatorial.ssb_to_psb_xyz_ICRS
call topmsafe
inastrometry.py
.I can import erfa with no problem.
erfa.pmsafe
doesn't fail otherwise, though.example.tar.gz
The text was updated successfully, but these errors were encountered: