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

new fits.open_header function, typo fixes and better verbosity #612

Merged
merged 13 commits into from
Aug 11, 2023

Conversation

IainHammond
Copy link
Contributor

@IainHammond IainHammond commented Aug 8, 2023

hello there's a new function in vip_hci.fits for only opening FITS headers (open_header). This is designed to be super lightweight and is a wrapper around a core astropy function with a nice VIP interface. It behaves very similar to open_fits but is about 40 times faster to use on an average sized SPHERE data set, depending on your disk speed and file sizes. Good for pipeline use. It allows for opening HDU headers by number n or by HDU name extname too.

I adapted the new try/except in open_fits to better catch the specific astropy error it's meant to avoid, rather than potentially hiding something else. This came about because I noticed this try/except doesn't work on SPHERE data that has BZERO/BSCALE/BLANK header keywords as it still opens the file and raises the error later when accessing the hdulist.data containing those keywords. I don't know any way to avoid this and it's uncommon enough to probably not matter. I've also tidied the code and improved the verbosity.

Every typo of FWHM has been fixed and bad pixel correction no longer reminds you that ADACS made it lighting fast even if you ask for verbose=False, but we very much appreciate their work and I've added our developer to the authors of that function.

Finally I fixed an upcoming scipy.ndimage.filter deprecation

@IainHammond IainHammond closed this Aug 8, 2023
@IainHammond IainHammond reopened this Aug 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2023

Codecov Report

Merging #612 (fdcb1a6) into master (f046ff0) will increase coverage by 1.53%.
Report is 7 commits behind head on master.
The diff coverage is 51.56%.

❗ Current head fdcb1a6 differs from pull request most recent head 7b676cd. Consider uploading reports for the commit 7b676cd to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #612      +/-   ##
==========================================
+ Coverage   56.02%   57.55%   +1.53%     
==========================================
  Files          67       67              
  Lines       13446    13461      +15     
==========================================
+ Hits         7533     7747     +214     
+ Misses       5913     5714     -199     
Files Changed Coverage Δ
vip_hci/fm/negfc_fmerit.py 79.25% <ø> (ø)
vip_hci/fm/negfc_mcmc.py 70.21% <ø> (-0.16%) ⬇️
vip_hci/fm/negfc_nested.py 58.06% <ø> (ø)
vip_hci/fm/negfc_simplex.py 86.61% <ø> (ø)
vip_hci/objects/dataset.py 43.84% <0.00%> (ø)
vip_hci/objects/postproc.py 63.16% <0.00%> (+34.93%) ⬆️
vip_hci/psfsub/framediff.py 29.85% <ø> (ø)
vip_hci/psfsub/llsg.py 20.09% <ø> (ø)
vip_hci/psfsub/loci.py 76.33% <ø> (ø)
vip_hci/psfsub/medsub.py 77.10% <ø> (ø)
... and 13 more

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@IainHammond IainHammond changed the title new fits.open_header function, open_fits works with header=True, typo fixes and better verbosity new fits.open_header function, typo fixes and better verbosity Aug 11, 2023
@VChristiaens VChristiaens merged commit c12f0cb into vortex-exoplanet:master Aug 11, 2023
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.

3 participants