Skip to content

Conversation

@abostroem
Copy link
Collaborator

The residual image shown when you run --s psfmag --show is different from what is shown by the checkmag stage. Specifically, the checkmag stage shows the residual of the PSF fitting - which is done after the 2D polynomial subtraction. This means that you are seeing the combined background subtraction plus PSF subtraction. On the other hand, the psfmag stage shows the original image with just the PSF subtraction. I've been going back and forth about what is most useful. This PR adds the "original - PSF fit" to the display_psf_fit function which is called during the checkmag stage and when you click on points during the getmag stage. This requires saving this image to the data directory - so when this file is not present the code gracefully only displays the original two images.

I tested this on two supernova:
SN2025tis does not have the new file:
lscloop.py -n 2025tis -e 20250807 --id 328 -f B -s checkmag
This will bring up a plot with two subplots

SN2025ngs has been run with the new code:

lscloop.py -n 2025ngs -e 20250810 --id 105 -f B -s psfmag -F
lscloop.py -n 2025ngs -e 20250810 --id 105 -f B -s checkmag

This will bring up a plot with three subplots

@jrfarah
Copy link

jrfarah commented Jan 17, 2026

I tested this PR on my local copy and found it worked very well with no issues. I did not test on the objects suggested in the PR (since those are nominally already checked out and worked) so I instead tried it on some public SN 2023ixf data. Before installing this update, I see what I usually do, a two panel image:

Screenshot 2026-01-16 at 4 25 30 PM

After installing, I now get the 3 panels showing the original image, PSF subtraction, and 2D poly subtraction:

Screenshot 2026-01-16 at 4 33 20 PM

They look appreciably different and I noted no errors while running or in the output. I think this PR is good to go.

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