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

Don't abort if wavelengths are outside valid range for absorption #1227

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

rmjarvis
Copy link
Member

Bekah Polen ran into an edge case where some photons had bad wavelengths being accumulated via the Silicon sensor. They also had flux=0, so the other details didn't matter, but it was raising an exception that the wavelengths weren't valid for the absorption depth table.

This PR fixes this by taking the absorption depth to be the value for the minimum or maximum valid wavelength whenever the wavelength is too blue or too red, respectively.

We could probably add an optimization to check for flux=0 sooner as an optimization, but I didn't do that here.

Copy link

@jchiang87 jchiang87 left a comment

Choose a reason for hiding this comment

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

lgtm

@rmjarvis rmjarvis merged commit a145d1c into releases/2.4 Jul 17, 2023
8 checks passed
@rmjarvis rmjarvis deleted the bad_wavelength branch July 17, 2023 13:28
@rmjarvis rmjarvis added bug report Bug report optics/atm Related to realistic PSFs from optics, atmosphere, etc. desc Of possible interest to LSST DESC members looking for a project labels Jul 21, 2023
@rmjarvis rmjarvis added this to the v2.5 milestone Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug report desc Of possible interest to LSST DESC members looking for a project optics/atm Related to realistic PSFs from optics, atmosphere, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants