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

Account for use of reference_date property #345

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

wtbarnes
Copy link
Contributor

@wtbarnes wtbarnes commented Sep 23, 2024

This PR includes a few fixes to account for the existence of the new reference_dateproperty on Map 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:

  • Fix the use of the incorrect date for constructing the coordinate frame and observer coordinate by using the new 'reference_date' property instead of 'smap.date'.

Enhancements:

  • Assume the existence of the 'T_OBS' key in the metadata for constructing 'reference_date' in AIA maps, aligning with changes in sunpy v6.

Tests:

  • Update tests to use 'u.allclose' for asserting observer coordinate values with a relative tolerance, improving test accuracy.
  • Remove the test that checks for a warning when 'T_OBS' is missing from metadata, as this scenario is no longer applicable.

This comment was marked as spam.

sourcery-ai[bot]

This comment was marked as spam.

@nabobalis
Copy link
Contributor

I will leave it up to you @wtbarnes when you want to merge.

@wtbarnes wtbarnes added bug Something isn't working backport calibrate labels Sep 24, 2024
@wtbarnes wtbarnes merged commit 68b6ce7 into LM-SAL:main Sep 24, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Something isn't working calibrate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants