Closed wtbarnes closed 2 months ago
This pull request updates the aiapy library to account for the new reference_date
property introduced in sunpy v6. The changes primarily affect the fix_observer_location
and update_pointing
functions in the aiapy/calibrate/meta.py
file, as well as related tests in aiapy/calibrate/tests/test_meta.py
. The PR aims to improve the accuracy of coordinate frame and observer coordinate calculations by using the correct reference date.
Change | Details | Files |
---|---|---|
Update observer location calculation to use reference_date |
|
aiapy/calibrate/meta.py |
Modify handling of T_OBS in update_pointing function |
|
aiapy/calibrate/meta.py |
Update tests to account for small numerical differences |
|
aiapy/calibrate/tests/test_meta.py |
sequenceDiagram
participant Client
participant fix_observer_location
participant smap
Client->>fix_observer_location: Call with smap
fix_observer_location->>smap: Get reference_date
smap-->>fix_observer_location: Return reference_date
fix_observer_location->>fix_observer_location: Calculate observer location
fix_observer_location->>smap: Update meta with new location
fix_observer_location-->>Client: Return updated smap
I will leave it up to you @wtbarnes when you want to merge.
This PR includes a few fixes to account for the existence of the new
reference_date
property onMap
which is the correct date to use when constructing the coordinate frame and observer coordinate.This also now assumes the existence of the "T_OBS" key in the metadata since this is what is used for constructing
reference_date
in the case of an AIA map.Since
reference_date
was only introduced in sunpy v6 we should decide how to go about using this property or just make the minimum version of sunpy v6.See also sunpy/sunpy#7810
Summary by Sourcery
Update the code to use the 'reference_date' property for constructing coordinate frames and observer coordinates, assuming the presence of 'T_OBS' in metadata for AIA maps. Adjust tests to reflect these changes and improve accuracy.
Bug Fixes:
Enhancements:
Tests: