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

This is not a fits file. #135

Open
ijiraq opened this issue Aug 6, 2020 · 0 comments
Open

This is not a fits file. #135

ijiraq opened this issue Aug 6, 2020 · 0 comments
Assignees

Comments

@ijiraq
Copy link
Collaborator

ijiraq commented Aug 6, 2020

def _get_headers_from_fits(path):

the file that is being sent to this method is sometimes not a FITS file but a plant text file that contains header keywords. This method could use: fits.Header.fromtextfile() instead of fits.open() in those cases.

@SharonGoliath noticed this issue when dealing with NGVS data. Perhaps a try/except is the best solution?

try:
   fits.open(xxxxx)
except OSError as ex:
   fits.Header.fromtextfile(xxxx)

@ijiraq ijiraq assigned ijiraq and SharonGoliath and unassigned ijiraq Aug 6, 2020
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

2 participants