Skip to content

Fix TwoDHist plot and GSObject fitting - #205

Merged
rmjarvis merged 5 commits into
mainfrom
fix_twodhist_tmodel
Aug 12, 2026
Merged

Fix TwoDHist plot and GSObject fitting#205
rmjarvis merged 5 commits into
mainfrom
fix_twodhist_tmodel

Conversation

@rmjarvis

@rmjarvis rmjarvis commented Aug 11, 2026

Copy link
Copy Markdown
Owner

This PR has two extremely small fixes that don't have anything to do with each other, besides that they were prompted by runs on Roman coadd images by Brenna (@WellsBN).

  1. We noticed when looking at the TwoDHist outputs that the T_model panel was actually just a copy of the T panel. This was a straightforward copy/paste bug in the code, which is fixed here.
  2. When fitting the Gaussian profile, she was sometimes getting crashes that seemed to be out-of-memory errors, from extremely large memory allocations. I'm pretty sure this is because scipy was sometimes trying bad parameter combinations in the non-linear fitting. This used to work fine, since GalSim would throw an exception when the FFT was too large, and Piff would catch those errors and call the proposed parameter bad. But now the default behavior is to just warn for that rather than error. The fix is to just change GalSim's default back to errors, which is a simple global variable edit.

@nihardalal nihardalal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me!

Comment thread piff/gsobject_model.py
@rmjarvis
rmjarvis force-pushed the fix_twodhist_tmodel branch 3 times, most recently from d7bed05 to d4b1e16 Compare August 11, 2026 22:02
@rmjarvis rmjarvis added this to the Version 1.7 milestone Aug 12, 2026
@rmjarvis
rmjarvis force-pushed the fix_twodhist_tmodel branch from d4b1e16 to e8fbc68 Compare August 12, 2026 03:23
@rmjarvis
rmjarvis merged commit 0ac1fea into main Aug 12, 2026
9 checks passed
@rmjarvis
rmjarvis deleted the fix_twodhist_tmodel branch August 12, 2026 16:45
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