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

Allow arbitrary FITS headers #1015

Closed
wants to merge 67 commits into from

Conversation

wtgee
Copy link
Member

@wtgee wtgee commented Oct 12, 2020

Allows for adding custom FITS headers from the headers param of take_observation. Follow up from #1009 .

Description

The take_observation function accepts a headers dict. Previously the keywords in this dict that matched a predefined (and hard-coded, see #1014) pattern would be included in the final FITS image.

This PR essentially copies everything from headers into the header. It will still parse the pre-defined list of headers (e.g. field_name -> FIELD).

Keywords in headers that don't conform to the FITS standard will be added as HIERARCH (see the [set(https://docs.astropy.org/en/stable/io/fits/api/headers.html#astropy.io.fits.Header.set)] method for headers; sadly it's not documented that I found, but it's in the source).

Related Issue

Closes #1013
From #1009

How Has This Been Tested?

Added a new test specifically for the arbitrary headers.

Types of changes

  • New feature (non-breaking change which adds functionality)

wtgee added 23 commits May 31, 2020 17:12
@wtgee
Copy link
Member Author

wtgee commented Oct 12, 2020

Oops, based this off origin instead of upstream. Closing for now and will reopen.

@wtgee wtgee closed this Oct 12, 2020
@wtgee wtgee deleted the allow-arbitrary-fits-headers-1013 branch October 12, 2020 23:21
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

Successfully merging this pull request may close these issues.

Document allowed FITS headers (or allow any)
1 participant