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

convert2hmi.py will accept hmi data #9

Open
PaulJWright opened this issue May 3, 2021 · 0 comments
Open

convert2hmi.py will accept hmi data #9

PaulJWright opened this issue May 3, 2021 · 0 comments

Comments

@PaulJWright
Copy link
Contributor

convert2hmi.py will accept hmi data. Expected behaviour: the data should be recognised as HMI and skipped.

python convert2HMI.py --instrument mdi --data_path ../solarmag/ --destination ../solarmag/ --use_patches

2021-04-28 - 23:21:15 INFO __main__: Processing ../solarmag/mdi.fd_m_96m_lev182.20110331_013600_TAI.data.fits
2021-04-28 - 23:21:15 INFO __main__: Attempting inference on patches...
2021-04-28 - 23:21:26 INFO __main__: Success.
2021-04-28 - 23:21:26 INFO __main__: Processing ../solarmag/hmi.m_720s.20110331_013600_TAI.1.magnetogram.fits
2021-04-28 - 23:21:37 INFO __main__: Attempting inference on patches...
2021-04-28 - 23:24:25 INFO __main__: Success.
Traceback (most recent call last):
  File "convert2HMI.py", line 182, in <module>
    inferred_map = file_dset.create_new_map(inferred, scale_factor, args.add_noise, model_name, config_data, padding)
  File "/content/magnetograph_2HMI_converter/source/dataset.py", line 58, in create_new_map
    new_meta['r_sun'] = new_meta['r_sun'] * scale_factor
  File "/usr/local/lib/python3.7/dist-packages/sunpy/util/metadata.py", line 48, in __getitem__
    return OrderedDict.__getitem__(self, key.lower())
KeyError: 'r_sun'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant