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

ImageFileColection.hdus() should warn if kwarg not found #744

Open
mtpenny opened this issue Aug 19, 2020 · 0 comments
Open

ImageFileColection.hdus() should warn if kwarg not found #744

mtpenny opened this issue Aug 19, 2020 · 0 comments

Comments

@mtpenny
Copy link

mtpenny commented Aug 19, 2020

In the following code snippet I misremembered the keyword argument to return the filename, it was then likely interpreted as a header keyword filter, and hdus returned an empty list. It would be better if the there was a warning for each file that didn't contain the filter keyword.

Interestingly, the following example also caused the images.summary not to show in a Jupyter notebook, despite it being called before images.hdus. I.e., if you comment out the for loop, the summary shows, but does not if it's left in.

`
datadir='/where/your/data/is/'
path = Path(datadir)
images = ccdp.ImageFileCollection(path)

images.summary['file', 'imagetyp', 'filter', 'exptime', 'naxis1', 'naxis2']

for im,fname in images.hdus(imagetyp='Bias Frame',with_fname=True):
print(im.header['EXPTIME'])
`

In the above, of course, with_fname should have been return_fname

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