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

fix negative arc line ringing #548

Merged
merged 1 commit into from Feb 4, 2021
Merged

fix negative arc line ringing #548

merged 1 commit into from Feb 4, 2021

Conversation

sbailey
Copy link
Contributor

@sbailey sbailey commented Feb 4, 2021

Fixes #547 where pixsim tests were failing due to negative pixels being passed to np.poisson(). It turns out that desi/spectro/templates/calib/v0.4/arc-lines-average-in-vacuum-from-winlight-20170118.fits has some negative values in the wings of arc lines. Prior to specter commit #6a0d107, psf.project was clipping these negative values but now it allows you to project negative values if you really really want to so you have to fix it on the input side.

The fix is simple: clip negative values from the input arc file prior to simulating.

@sbailey
Copy link
Contributor Author

sbailey commented Feb 4, 2021

Tests pass at NERSC but I'm getting the "suspiciously low ELG flux" problem every time I run now; perhaps something in numpy 1.20 triggers this more? I'm going to merge this PR since the test failures are unrelated to the fix here (fixing negative arcs).

@sbailey sbailey merged commit ca0a234 into master Feb 4, 2021
@sbailey sbailey deleted the negative_pixsim branch February 4, 2021 04:58
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.

TestPixsim negative flux failure
1 participant