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

instru.analog_pointing incompatible with astropy < 4 #51

Open
flomertens opened this issue Jul 15, 2021 · 0 comments
Open

instru.analog_pointing incompatible with astropy < 4 #51

flomertens opened this issue Jul 15, 2021 · 0 comments

Comments

@flomertens
Copy link

When using astropy 3.2 I have the following issue when calling analog_pointing:

[...]
File "/home/fmertens/nenucal-cd/lib/python3.6/site-packages/nenupy/beam/beam.py", line 376, in beam_values
az, el = analog_pointing(self.azana, el)
File "/home/fmertens/nenucal-cd/lib/python3.6/site-packages/nenupy/instru/instru.py", line 321, in analog_pointing
phi_idx = (azimuth.value/0.05 - 0.5).astype(int)
AttributeError: 'float' object has no attribute 'astype'

The same code works fine with astropy 4. The issue is that azimuth.value is a python native float object in astropy 3, which do not have a method astype, while in astropy 4 it is a numpy float object which then have a method astype.

One fix would be to change the code that check whatever azimuth/elevation is a scalar to check azimuth.value instead of azimuth.

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

1 participant