Skip to content

Commit

Permalink
clip at 1e-8
Browse files Browse the repository at this point in the history
  • Loading branch information
zonca committed Jan 18, 2025
1 parent c111e11 commit 2c1a7d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pysm3/models/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def flux2amp(flux, fwhm):
sigma = fwhm2sigma(fwhm)
amp = flux / (2 * np.pi * sigma**2)
# sim_objects fails if amp is zero
c = 1e-9 # clip
c = 1e-8 # clip
amp[np.logical_and(amp < c, amp >= 0)] = c
amp[np.logical_and(amp > -c, amp < 0)] = -c
return amp
Expand Down

0 comments on commit 2c1a7d8

Please sign in to comment.