LM-SAL / aiapy

Python library for AIA data analysis
https://aiapy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

SunpyDeprecationWarning about JSOCResponse when running aiapy.calibration.degradation() #90

Closed nabobalis closed 11 months ago

nabobalis commented 3 years ago

In GitLab by @ebuchlin on May 10, 2021, 01:18

Steps to reproduce

I run aiapy 0.5.0 with python 3.8.6 under Ubuntu 20.10 with astropy==4.2.1, sunpy==2.1.4, and pyerfa==1.7.3.

When running the following code:

import astropy.units as u
from astropy.time import Time
from aiapy.calibrate import degradation

t = Time(58817.5, format="mjd", scale="utc")   # 2019-11-30T12:00:00
d = degradation(94 * u.AA, t)
print(d)

the output is

/usr/local/lib/python3.8/dist-packages/erfa/core.py:154: ErfaWarning: ERFA function "taiutc" yielded 1 of "dubious year (Note 4)"
  warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),
WARNING: SunpyDeprecationWarning: specify desired keywords as arguments to JSOCResponse.show() [aiapy.calibrate.util]
WARNING: SunpyDeprecationWarning: use JSOCClient.search() instead [aiapy.calibrate.util]
/usr/local/lib/python3.8/dist-packages/erfa/core.py:154: ErfaWarning: ERFA function "utctai" yielded 1 of "dubious year (Note 3)"
  warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),
/usr/local/lib/python3.8/dist-packages/erfa/core.py:154: ErfaWarning: ERFA function "dtf2d" yielded 100 of "dubious year (Note 6)"
  warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),
WARNING: AiapyUserWarning: Multiple valid epochs for 58817.5. Using the most recent one [aiapy.calibrate.util]
[0.90317732]

Behavior vs expected behavior

This issue is about the SunpyDeprecationWarning. I guess that the aiapy code needs to be updated so that there is no warning anymore about JSOCResponse.show().

nabobalis commented 3 years ago

In GitLab by @wtbarnes on May 24, 2021, 12:53

mentioned in commit 247ddf883497a3ea6c23534de5a81cef4a954f5b