Skip to content

Conversation

@wmwv
Copy link
Collaborator

@wmwv wmwv commented Sep 11, 2025

Switch from astropy.io.fits to fitsio.
Closed #148

Very minor code change.

Running a lightcurve with 77 science files against 1 template file is more than 2x as fast in wall clock (18 minutes instead of 40 minutes) and more than 4x as fast in total CPU time (25 min instead of 116). This is running with 3 parallel writers.

@rknop I know you asked for this to go into snappl, but It would be a bit more work to redo how PSF objects are calculated and stored to make this something that could go into snappl. Totally doable, but doing the fitsio change here in phrosty was 6 lines.

@wmwv wmwv requested review from a team and laldoroty as code owners September 11, 2025 22:50
Copy link
Collaborator

@rknop rknop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine for what it it is. I predict it doesn't make much performance difference.

What we really need to do is look at the FITS classes in snappl. I think phrosty uses those enough to write temporary and diagnostic output files that it would make a bigger difference.

@wmwv wmwv merged commit 7139b13 into main Sep 12, 2025
3 checks passed
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.

Compare using fitsio instead of astropy.io.fits to speed up file writing

3 participants