LM-SAL / aiapy

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

fix_observer_location crashes when HAE{x,y,z} metadata not present #72

Closed nabobalis closed 10 months ago

nabobalis commented 3 years ago

In GitLab by @dstansby1 on Nov 9, 2020, 09:04

AIA maps between 2020-05-03 and 2020-05-18 seem to be missing the hae metadata, which means that fix_observer_location fails with the following error:

  File "/Users/dstansby/github/solarsynoptic/aia_helpers.py", line 98, in prep
    m = fix_observer_location(m)
  File "/Users/dstansby/miniconda3/lib/python3.8/site-packages/aiapy/calibrate/meta.py", line 34, in fix_observer_location
    x=smap.meta['haex_obs'] * u.m,
  File "/Users/dstansby/miniconda3/lib/python3.8/site-packages/sunpy/util/metadata.py", line 49, in __getitem__
    return OrderedDict.__getitem__(self, key.lower())
KeyError: 'haex_obs'

I'm not sure whether the solution here is to:

Anyway, thought I would report just in case it's helpful.

nabobalis commented 3 years ago

In GitLab by @wtbarnes on Nov 9, 2020, 09:08

This is concerning. It also means the derived observer coordinate on the sunpy map will be incorrect for this set of images.

nabobalis commented 3 years ago

In GitLab by @markcheung on Nov 9, 2020, 09:28

Thanks @dstansby1 will bring this to the attention of JSOC.

nabobalis commented 3 years ago

In GitLab by @markcheung on Nov 9, 2020, 09:34

When I spot check some files at the JSOC (http://jsoc.stanford.edu/ajax/lookdata.html) I find the HAE[XYZ]_OBS keywords are populated. Could you give an example of some images with this problem? The FSN keyword can be used as the unique identifier for each image.

nabobalis commented 3 years ago

In GitLab by @dstansby1 on Nov 10, 2020, 03:08

I've deleted and re-downloaded the AIA maps, and they seem to be fine now - I wonder if I was accidentally using an old lower level data product without realising. Anyway, all seems fine from my end, sorry for the noise!

nabobalis commented 3 years ago

In GitLab by @markcheung on Nov 11, 2020, 09:15

Thanks for checking @dstansby1. We appreciate contributions from the community.