Open drphilmarshall opened 8 years ago
@rbiswas4 What's the relationship between the idValue
in the TwinkSN
table and the instance catalog sourceID
from the phosim input files? I had thought they were the same, but the idValue
examples in your notebook have too few digits (and don't appear in the Run1.1 instance catalogs) and the sourceID
for an obvious SN in the phosim data isn't found by your RefLightCurves
code. I recall there was some discussion regarding generating unique sourceID
s for phosim, but I thought that only pertained to the lensed AGNs.
@jchiang87 Thanks! That was indeed a lack of thought on my part. I will fix this before issueing the PR.
@jchiang87 Could you please give me a couple of IDs taken from the Instance Catalog, so that I can run some tests? Thanks
Hi @rbiswas4, I think these should be good to try:
6144007055260714, 6144158471480362, 6144004217753642, 6144011651279914, 6144030054709290
@jchiang87 Thanks! Those were useful to set up an example ipython notebook.
Here are some plots comparing the reference light curves (in blue) and the forced source light curves (in red): I found the sourceId's (the term used in the PhoSim centroid files for the instance catalog object ids) by looking at the light curves inferred from the centroid files and picking out the ones that look like SNs. (There's a bunch of code here to do that.) The objectIds for the forced source fluxes (red points) were found by positional coincidence with the instance catalog coordinates. I'd say all but objectId 56569 (middle bottom) are correct associations. Some of the light curves match pretty well, others not so much. Given that these are fairly bright, I would have expected they all would match more consistently than this.
@jchiang87 Are there error bars that I am not able to see because the errors are too small? Are these coadds? The blue light curves look rather smooth!
Yep, the error bars are being plotted, and for the red points (which I assume you meant), the errors are from doing the forced photometry on the calexp images (if I understand things correctly). I even made the points using fmt='.'
so as not to obscure the error bars. Here is the script that produced those plots for reference.
Hmm. Actually I meant both, and particularly the blue points (because I am in a better position to interpret/change/compare with other ideas etc.). But your reply probably means both are being plotted?
Please have a look at the compare_lcs.py
script and make sure I'm unpacking the errors for the reference light curves correctly. It seems straight-forward.
@jchiang87 I just looked at your script, and did not see anything wrong in the script. And these are not coadds either. I realized, that I was suspecting them to be coadds because (a) they looked smooth and (b) because there were not the usual number of points I am used to seeing in DDF fields. But I just remembered that (b) is not valid because Twinkles cadence is not DDF cadence. So, perhaps these are simply super bright objects and therefore smooth ... So, I checked, and indeed these are intrinsically very bright objects and are at low redshifts < 0.1. So, maybe they should be smooth.
Here are plots showing the comparison for all six bands for a handful of the brighter SNe. I've added 10x10 arcsec cutouts of the coadded images for each band. In the cutouts, the red points are the locations of the Level 2 coadd objects, the blue star at the center is at the CatSim location of the SN whose light curves are plotted, and the green stars are at the CatSim locations of the other SNe in the field.
@jchiang87 If you can take @rbiswas4 code and use it to make Monitor plots of an observed light curve with reference light curve overlaid, you win the prize of being able to close this issue! You may need to upgrade the Monitor's visualization capabilities to do this - you can issue that too, and hence double the size of your prize! :-)