You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: