Skip to content

Conversation

@abostroem
Copy link
Collaborator

This PR was modeled off of PR #80 which implemented MuSCAT

Other changes:

  • This also slightly changes the way the color correction is used when no instrument is found. Previously there were site colors defined. I have removed them and now it defaults to 0 color correction and prints a warning to the screen that the color correction is 0 and suggests using the --unfix option to calculate a color correction.
  • Fixed a bug in the wcs calculation (only used when BANZAI fails) for the fwhmgess3 for the sinistro telescopes

Testing:
I tested this on the 2024-02-06 data from proposal LCOEPO2014B-010 of SN 2024bch

I ran the following commands:

lscloop.py -n 2024bch -e 20240206 -T sq -s psf
lscloop.py -n 2024bch -e 20240206 -T sq -s psfmag
lscloop.py -n 2024bch -e 20240206 -T sq -s zcat #This results in no color correction applied
lscloop.py -n 2024bch -e 20240206 -T sq -s zcat --unfix -F #this calculates the color correction
lscloop.py -n 2024bch -e 20240206 -T sq -s mag

I compared the final photometry for a few different epochs and ii was all pretty close to the 1m reduction taken at about the same time.

To test the wcs stage:
lscloop.py -n 2024bch -e 20240206 -T sq --id 184 -s wcs

I then loaded the BANZAI and wcs stage image into DS9 and matched WCS - they aligned pretty closely

I noticed a weird bug here that the WCS gets updated but the other database terms aren't reset because the filename contains an extra .fits. But this isn't a bug introduced by this PR and it doesn't break anything, so I'm not going to fix it right now. I've filed this as Issue 131.

Note that this PR does not check difference imaging capabilities

elif 'fl' in _instrume or 'fa' in _instrume:
fwhmgess3=half_total_flux_radius_to_fwhm(median(array(fwhm3))) * 0.389
if _imex: fwhmgessime = median(array(ccc)) * 0.467
if _imex: fwhmgessime = median(array(ccc)) * 0.389
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bug fix

@abostroem
Copy link
Collaborator Author

Note the 0.734 pixel scale value comes from the file header

@abostroem
Copy link
Collaborator Author

I'll also note I was able to download and ingest these files with LCOGTingest.py without making any changes anywhere

Copy link
Collaborator

@griffin-h griffin-h left a comment

Choose a reason for hiding this comment

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

Looks good, just left some minor comments. I assume @cmccully will actually test this on the supernova machine, but let me know if you need me to do it.

@@ -138,6 +138,31 @@ def readkey3(hdr,keyword):
except:
_instrume='none'
if 'kb' in _instrume: # SBIG
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this just be if 'kb' in _instrume or 'sq' in _instrume:? Pre-2014, different instruments had different header keywords, but they have been standard since then.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed with recent push

elif prefix == 'ep':
insttype = 'MUSCAT'
elif prefix == 'sq':
insttype = 'qhy'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some of these instruments are already in the SNEx database with the type QHY (caps). Ignoring the fact that I have no idea where that came from, let's make it consistent here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

On the other hand, there are already both MuSCAT and MUSCAT in the database, so maybe this doesn't matter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can make it consistent - even if SQL doesn't care

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed with recent push

Comment on lines 82 to 84
if hdr['SITEID'] in ['elp','tfn','ogg']:
CD1_1 = (-1) * CD1_1
CD2_2 = (-1) * CD2_2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this actually true? It looks like this came from copying the Sinistro block, but I have no idea if the same random sites have 180º rotated cameras.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Stefano said this is northern vs southern hemisphere

Copy link
Collaborator

Choose a reason for hiding this comment

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

I actually have no idea. Probably Griffin is right is just a rotation of the camera.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't test the southern hemisphere but it did something sensible for tfn when I ran the wcs stage

@abostroem
Copy link
Collaborator Author

What has to happen to get this PR approved? Now that the QHY600 detectors are available in SNEx, I'd like to get it merged. I think if we were doing the WCS wrong for one of the hemispheres it would have come up by now, all other comments have been addressed

cmccully and others added 2 commits March 27, 2024 13:30
@abostroem
Copy link
Collaborator Author

I reran the commands described above with PR #134 merged in - everything looks great. @estefaniapadilla can you please run these commands on supernova (note this is EPO data, so we might not be automatically downloading it - alternately, you could run it on a standard e.g. L107 which we might be downloading automatically)

@abostroem
Copy link
Collaborator Author

@griffin-h can you approve the changes @cmccully and I made?

@abostroem abostroem requested a review from griffin-h March 28, 2024 20:54
Copy link
Collaborator

@griffin-h griffin-h left a comment

Choose a reason for hiding this comment

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

Looks fine to me. I didn't test the new WCS code but I trust that Curtis did something reasonable. All my other comments are resolved.

@abostroem
Copy link
Collaborator Author

I tested the new WCS code in PR #134

@griffin-h
Copy link
Collaborator

I tested the new WCS code in PR #134

Got it, I didn't realize that #134 was a PR into this PR, and not into master.

@estefaniapadilla estefaniapadilla merged commit cae5a6a into master Apr 11, 2024
@estefaniapadilla
Copy link
Collaborator

tested the commands on the supernova machine and worked as expected

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.

5 participants