Project

General

Profile

Mag Limits Query

Anne Bauer, Feb 2015

Recently available for SVA1 (and also for Y1A1) is a table providing the single-epoch object IDs for each coadd object observed multiple times. This is very useful for looking at time-variability of objects, but we would also want to know the images that covered an object's position but did not contain a detection of the object, and the mag limits of those images.

The mag limits of an image can be calculated from the Mangle inverse variance weight like:

m_limit = 30.0 − 2.5 log( 10*sigma*( (D/2) / 0.27 )*sqrt(pi) )

where the mangle weight is 1/sigma^2 and D is the aperture diameter. Mangle's default is to use a 2" aperture. Perhaps it would be good to play around with using something like 2*FWHM, and so I include the image's FWHM in the example query below.

Let's say we want to get the Mangle weights, average FWHMs, and observation dates for all images covering all coadd objects in the matched-ID table. This is a huge query, and as such I expect that we will not have the entire catalog as a data product but a similar query could be run on a smaller subset of objects for which one wants the info. But, here is a suggested query for the i band, from des-sci.

(YANNY.SVA1_OC is the table with the matched IDs; this could be replaced with a table with a smaller number of interesting objects.)

select 
SVA1_COADD_OBJECTS_MOLYGON.coadd_objects_id, SVA1_CCDGON.red_image_id as imageid, SVA1_EXPOSURE.mjd_obs, SVA1_IMAGE.fwhm, SVA1_CCDGON.inverse_variance_weight 
from YANNY.SVA1_OC 
join SVA1_COADD_OBJECTS_MOLYGON on SVA1_COADD_OBJECTS_MOLYGON.coadd_objects_id = YANNY.SVA1_OC.coadd_objects_id 
join SVA1_MOLYGON_CCDGON on SVA1_COADD_OBJECTS_MOLYGON.molygon_id_i = SVA1_MOLYGON_CCDGON.molygon_id 
join SVA1_CCDGON on SVA1_CCDGON.red_image_id = YANNY.SVA1_OC.imageid 
join SVA1_IMAGE on SVA1_IMAGE.id = SVA1_CCDGON.red_image_id 
join SVA1_EXPOSURE on SVA1_EXPOSURE.id = SVA1_IMAGE.exposureid

To test this a bit more, I loaded up 20 coadd_objects_ids into a table in my DB area called TEST_IDS. This query gets the i band mag limits for the epochs where the object locations are covered:

select AHBAUER.TEST_IDS.coadd_object_id as coadd_objects_id, 
   SVA1_CCDGON.red_image_id as imageid, 
   SVA1_EXPOSURE.mjd_obs, SVA1_IMAGE.fwhm, 
   SVA1_CCDGON.inverse_variance_weight, SVA1_IMAGE.band 
FROM AHBAUER.TEST_IDS 
JOIN YANNY.SVA1_OC 
   on AHBAUER.TEST_IDS.coadd_object_id = 
      YANNY.SVA1_OC.coadd_objects_id 
JOIN SVA1_COADD_OBJECTS_MOLYGON 
   on SVA1_COADD_OBJECTS_MOLYGON.coadd_objects_id = 
      YANNY.SVA1_OC.coadd_objects_id 
JOIN SVA1_MOLYGON_CCDGON 
   on SVA1_COADD_OBJECTS_MOLYGON.molygon_id_i = 
      SVA1_MOLYGON_CCDGON.molygon_id 
JOIN SVA1_CCDGON 
   on SVA1_CCDGON.red_image_id = YANNY.SVA1_OC.imageid 
JOIN SVA1_IMAGE 
   on SVA1_IMAGE.id = SVA1_CCDGON.red_image_id 
   and SVA1_IMAGE.band = 'i' 
JOIN SVA1_EXPOSURE 
   on SVA1_EXPOSURE.id = SVA1_IMAGE.exposureid

and this query gets the observed mags, corrected by the single-epoch calibration zero points, for the objects, for the i band:

select ahbauer.test_ids.coadd_object_id as coadd_objects_id, 
   sva1_finalcut.mag_auto-25+z.mag_zero as mag_auto, 
   sva1_finalcut.magerr_auto, sva1_finalcut.band, 
   sva1_finalcut.imageid, sva1_finalcut.object_id 
FROM ahbauer.test_ids 
JOIN yanny.sva1_oc 
   on ahbauer.test_ids.coadd_object_id=yanny.sva1_oc.coadd_objects_id 
JOIN sva1_finalcut 
   on yanny.sva1_oc.object_id = sva1_finalcut.object_id 
   and yanny.sva1_oc.imageid = sva1_finalcut.imageid 
JOIN zeropoint z 
   on z.imageid=sva1_finalcut.imageid

These queries do work, although the first one gives many duplicates and I haven't yet sorted out why. I also haven't yet sorted out how well the detection threshold, as determined by missing detections, matches up with the mag limit as calculated using an aperture scaled either absolutely or by a multiple of the FWHM. But here is an example plot I made from the i band measurements and limits, calculated both using the normal 2 arc second aperture and a 2*FWHM aperture, for one of my example objects from SVA1.