Skip to content

reducing memory usage on OU TDE notebook#326

Open
jkrick wants to merge 1 commit into
Caltech-IPAC:mainfrom
jkrick:tde-memory-reduction
Open

reducing memory usage on OU TDE notebook#326
jkrick wants to merge 1 commit into
Caltech-IPAC:mainfrom
jkrick:tde-memory-reduction

Conversation

@jkrick
Copy link
Copy Markdown
Contributor

@jkrick jkrick commented May 29, 2026

This PR reduces memory usage in the TDE light curve notebook to address CI failures likely caused by memory constraints. It does not effect the science or goals of the notebook

Changes:

  • Replace full-image background estimation (np.nanmedian/np.nanstd over 4088×4088 pixels) with a local annulus-based background using photutils SkyCircularAnnulus and ApertureStats
  • Add del data in show_gallery() to free each full image array immediately after display
  • Add del img in make_cutout() to free the full image array after the cutout is extracted
  • Reduce default number of gallery images from 6 to 4
  • Reduce default number of cutout images from 6 to 4

@jkrick jkrick self-assigned this May 29, 2026
@jkrick jkrick requested a review from bsipocz May 29, 2026 19:54
@jkrick
Copy link
Copy Markdown
Contributor Author

jkrick commented May 29, 2026

maybe this closes #317 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant