On this page


Get high-fidelity stars in given area

Goal/Description

We want to get all objects with R degrees of a given position that are high fidelity stellar-like objects.

We get all objects within 0.2 degree of RA=334.0 and Dec=0.0 which have mean magnitudes in griz (i.e. at least 1 detection in each band that can be used for the mean mag). In addition, we require QfPerfect>0.85 in all bands. We select stars with the difference between Kron and PSF magnitude as described here.

Note that the search radius is in arcminutes.  This is a recent change in the interface to make the PS1 database functions consistent with those used for SDSS, GALEX, Kepler, the HSC, and other MAST catalogs.

Tables used

Query

SELECT o.objID, 
o.raMean, o.decMean, o.raMeanErr, o.decMeanErr,
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt,
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect,
soa.primaryDetection, soa.bestDetection
INTO mydb.[HighFidelityStarsDR2]
FROM dbo.fGetNearbyObjEq(334, 0.0, 0.2*60.0) as x
JOIN MeanObjectView o on o.ObjID=x.ObjId
LEFT JOIN StackObjectAttributes AS soa ON soa.objID = x.objID
WHERE o.nDetections>5
AND soa.primaryDetection>0
AND o.gQfPerfect>0.85 and o.rQfPerfect>0.85 and o.iQfPerfect>0.85 and o.zQfPerfect>0.85
AND (o.rmeanpsfmag - o.rmeankronmag < 0.05)


Results

696 objects, here are the first 10:

107763340006509592334.00067427-0.192394010.001920.002456019.63130.0076211418.36530.0065281517.24440.0023472616.72250.0024551216.48510.0158981318.46990.0097619316173412141150000.9998731150000.9992911150000.9996341150000.9990441150000.99962211
107763340149672418334.01502523-0.198394020.005180.002855221.97510.083929320.79480.0316931519.64860.0130221719.11140.0128571218.80210.0265641420.98950.053647653152013141150000.9994621150000.9996441150000.9993091150000.9996281150000.99898211
107763340365446394334.03656773-0.19510620.024250.027075221.80920.062935621.32680.07511221.09110.0276632420.51950.044181019.35650.000343121.41590.0682166381429102168922160.9993251150000.9996361150000.9993671150000.999632168922160.99898211
107773339339718616333.93399766-0.184857650.004220.007986021.09670.0578641219.8960.0112421218.6140.006882918.02340.0046131017.77390.022577920.01170.0311778512123712121150000.9994041150000.9997151150000.9998561150000.9995151150000.99952611
107773339418197028333.94187857-0.186141460.019710.039595221.57050.012027220.9810.008091620.5860.028582720.32250.049434820.32660.143002120.97790.1531026049351111150000.9991150000.9990291150000.9996281150000.9992531149920.99776511
107773339602519327333.96026447-0.184273450.004520.00796021.0790.018093619.76090.014422618.4560.0046372117.86120.0060051017.60790.035327619.82380.015897658112510111150000.9991681150000.9991581150000.9996131150000.9992121150000.99813311
107773339666312601333.96664968-0.18987530.002620.002376018.33170.0055231417.77110.0027631417.5310.0031372717.42430.006355717.36890.016866817.85090.00506771416298101150000.9994791150000.9997421150000.9995481150000.998681150000.99890611
107773339901521365333.99016194-0.190867220.003920.007325221.94950.067887920.83390.0248211319.37540.0051453318.6420.011191218.29680.01511220.87940.082054819143313121150000.9990951150000.9997291150000.9994281150000.9997061150000.9991111
107773339922175058333.99225189-0.18784710.003560.021736017.81180.0058681217.05280.0025851216.75430.00222616.62070.005681216.50890.0097861217.11910.0033358714143114141150000.9997041150000.9994421150000.9995771150000.9992381150000.99930711
107773340107508029334.01078438-0.185362360.00570.00576017.14060.0018981216.58370.0029451316.33750.0018912216.22930.0022241316.1460.008295916.64360.0011668716153014121150000.9996841150000.9994641150000.9999121150000.9994351150000.99902211

Galaxy Candidates for K2 SN Search

Goal/Description

The Kepler Extra-Galactic Survey (KEGS) is a program using the Kepler telescope to search for supernovae, active galactic nuclei, and other transients in galaxies. We have to identify galaxies in a suitable redshift range (z<=0.12) a priori, which will be monitored by K2. Here is an example to get galaxies for Campaign 14. We only select objects with r<=19.5, and we make a cut on (rmeanpsfmag - rmeankronmag)>=0.05 in order to remove stars (More info about Star-Galaxy Separation is here). We only want to use objects for which the majority of pixels were not masked, thus the cut on QFperfect>=0.95. We also obtain the petrosian radii in order to be able to select galaxies by size.

Query

SELECT  o.objID,
ot.raStack, ot.decStack, ot.raMean, ot.decMean,
ot.ng,  o.gMeanPSFMag,o.gMeanPSFMagErr,o.gMeanKronMag,o.gMeanKronMagErr,
ot.nr,  o.rMeanPSFMag,o.rMeanPSFMagErr,o.rMeanKronMag,o.rMeanKronMagErr,
ot.ni,  o.iMeanPSFMag,o.iMeanPSFMagErr,o.iMeanKronMag,o.iMeanKronMagErr,
ot.nz,  o.zMeanPSFMag,o.zMeanPSFMagErr,o.zMeanKronMag,o.zMeanKronMagErr,
ot.ny,  o.yMeanPSFMag,o.yMeanPSFMagErr,o.yMeanKronMag,o.yMeanKronMagErr,
o.gQfPerfect,o.rQfPerfect,o.iQfPerfect,o.zQfPerfect,o.yQfPerfect,
ot.qualityFlag,ot.objInfoFlag,
sp.gpetRadius,sp.rpetRadius,sp.ipetRadius,sp.zpetRadius,sp.ypetRadius,
sp.gpetR50,sp.rpetR50,sp.ipetR50,sp.zpetR50,sp.ypetR50,
soa.primaryDetection, soa.bestDetection
       INTO mydb.[C14]
FROM MeanObject AS o
JOIN fgetNearbyObjEq(160.68333, 6.85167 , 8.5*60.0) cone ON cone.objid = o.objID
JOIN ObjectThin AS ot ON ot.objID = o.objID
LEFT JOIN StackPetrosian AS sp ON sp.objID = o.objID
LEFT JOIN StackObjectAttributes AS soa ON soa.objID = o.objID
 WHERE ot.ni >= 3
     AND ot.ng >= 3
     AND ot.nr >= 3
     AND soa.primaryDetection>0
     AND (o.rMeanKronMag > 0 AND o.rMeanKronMag <= 19.5 )
     AND (o.gQfPerfect >= 0.95)
     AND (o.rQfPerfect >= 0.95)
     AND (o.iQfPerfect >= 0.95)
     AND (o.zQfPerfect >= 0.95)
     AND (o.rmeanpsfmag - o.rmeankronmag > 0.05)


Results

First 10 out of 161,920 Rows of MyDB Table C14

125391633203089697163.3203034114.49934933163.3202888214.499330921021.00930.03608920.67310.0748271419.77030.02660119.25630.015281019.26810.01153818.63970.0214551418.99570.01690118.37290.015641318.69680.03064218.12660.0375910.9995660.9996350.9992130.9992090.999349615120245768.61662.719812.660622.670842.774831.258871.191921.087371.06831.0298511
125391634958624964163.4958642914.49541362163.4958360214.49541251020.33360.03003819.55830.0204551419.79660.0355818.92140.0223741519.53160.02587218.62780.0093251319.3670.03379518.56210.0329861419.12710.03827218.38290.0511010.9996190.9994570.9989650.9990230.999377534449157125.274075.047874.279134.715885.211242.087631.805381.59331.465893.2760511
125391635282559255163.5282652714.49899141163.5282394114.49899527820.95980.06209120.17410.0267351420.39230.06290219.4170.0290261520.07270.03636619.01680.0244431119.86520.02521118.82080.031221819.24060.09263518.77780.1411020.9997260.9994350.99920.9991130.999185534449157124.604355.280314.940895.314334.20822.207382.365342.079092.097791.9896211
125391636122615271163.6122480114.49564107163.6122231214.49563751021.01580.04507520.31790.0733741620.08380.03902419.3610.0320282319.67380.02457218.96320.0144861319.44870.02020718.70970.0242551219.21020.06318618.59490.0731460.9996030.9997630.9996560.9988140.999592534449157123.830933.526663.353484.647193.175081.433111.456911.246871.440551.1315811
118791643648704345164.364864278.99489954164.364887298.994907111219.14290.05265218.22540.017751018.15850.04725417.19220.0106842417.83590.01458216.73990.0064931517.5290.03420716.4750.0163071217.38210.03268516.52170.0167640.9994060.9999250.9996270.9991770.998446615120245769.411887.510378.155576.791086.692493.2392.899722.987122.585672.5330311
118791644119204724164.412068318.9951804164.412073118.995164071120.44820.04995519.99320.0312261019.45950.05505819.06360.0349542119.13870.00994218.69940.0129181818.90020.02813118.42240.0170081618.75510.0390618.34530.0484060.9998240.9995250.9995360.9996980.999067534449157123.2393.364073.611282.587155.268741.321491.371881.332321.0671.5481911
118791644639089117164.46390888.99886558164.46388938.998823951220.58450.01395420.52220.025129919.53920.01418219.46730.0280322519.22910.00958219.09120.010408818.98440.01937218.86410.0121951018.86940.0333218.72610.0509690.9998240.9997270.9997520.9986580.99909534449157121.710522.177271.846351.717991.601210.8105680.9024190.7862210.696830.68577111
112311673903612557167.390365823.59342292167.390346433.593426791020.61910.02881920.08520.0347351319.22420.01542418.60720.0199273018.65170.02910318.03810.0102671518.69670.02440817.8330.0164861518.27450.05080717.59220.0294650.9995420.9997520.9999180.9996680.999759615120245764.499315.25925.9236.452039.718261.71361.894712.121162.273822.5015111
112311673903612557167.390365823.59342292167.390346433.593426791020.61910.02881920.08520.0347351319.22420.01542418.60720.0199273018.65170.02910318.03810.0102671518.69670.02440817.8330.0164861518.27450.05080717.59220.0294650.9995420.9997520.9999180.9996680.999759615120245765.759976.378285.776225.69016.939461.832952.146781.961951.986651.9688711
112311673927395135167.39276133.59560997167.392744753.59561368821.29230.07546420.53470.038571219.88380.03419.27460.0205443719.35580.02375218.79830.0136541419.31370.03371318.55080.0255011218.91650.03519418.19120.033290.9996550.9996030.999760.9992070.999066534449157122.693253.553842.872813.02684139.1430.8211871.099991.063841.13938-99911

Obtain lightcurves for a given set of objects

Goal/Description

The goal is to obtain light curves for a list of objects. The list of objects with their RA/Dec position is uploaded into Mydb, the PS1 objects are identified, and then the light curves are obtained. Here we upload a list of 13 RR Lyrae stars from the Catalina sky survey into mydb.[RRLcatalina]

Query #1: Match Catalina RR Lyrae stars to PS1 objects

We search for objects in the PS1 DB that are within 3 arcsec of the Catalina positions. Most of the parameters (mean mags, # of detections, etc) we get from the MeanObjectView table. We also join the StackObjectAttributes table in order to get primaryDetection and bestDetection (BestDetection is corrupted in DR2, but will be fixed in DR2.1, see the description of StackObjectThin table for a more detailed description). These RR Lyrae stars are bright, thus we can expect many detections, and we therefore require  o.nDetections>5. We only want to use objects for which the majority of pixels were not masked, thus the cut on QFperfect>=0.95. In order to select only stars (and exclude galaxies), we require (o.rmeanpsfmag - o.rmeankronmag)< 0.05, as described here

SELECT d.CSS_ID, d.RA as CSSRA, d.Dec as CSSDec, d.V, d.Period, d.Amp, d.Npts, d.Dist, d.Red, d.CSIDnum,
o.objID,  
o.raMean, o.decMean, o.raMeanErr, o.decMeanErr, 
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt, 
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect,
soa.primaryDetection, soa.bestDetection
 INTO mydb.[RRLPS1]
 FROM mydb.[RRLcatalina] d
CROSS APPLY dbo.fGetNearbyObjEq(d.RA, d.Dec, 3.0/60.0) as x
JOIN MeanObjectView o on o.ObjID=x.ObjId
LEFT JOIN StackObjectAttributes AS soa ON soa.objID = x.objID
WHERE o.nDetections>5 
AND soa.primaryDetection>0 
AND o.gQfPerfect>0.85 and o.rQfPerfect>0.85 and o.iQfPerfect>0.85 and o.zQfPerfect>0.85 
AND (o.rmeanpsfmag - o.rmeankronmag < 0.05)


Results (25 minutes)

There are 12 out of 13 matches, and below are the first 10 entries

CSS_J220309.8+051633330.790975.2759316.680.6386980.3829415.620.0571104118064018114333307910211643330.79101255.27596260.002170.004276017.06650.003394516.68730.002055316.59980.012561716.49210.018882816.54240.0122651216.72160.007911751272811171150000.9994971150000.9992651150000.9996391150000.9996971150000.99897811
CSS_J221949.2-024020334.95521-2.6722416.510.7094910.3724914.120.0851001120004060104793349551433447334.95514654-2.67250150.030630.020436016.74440.006159516.46110.006758616.47710.0044791316.37520.005638716.35940.018196716.50580.003776638112310111150000.9996461150000.9998251150000.9996721150000.9987271150000.99933111
CSS_J220559.8-023949331.49951-2.6636518.110.537170.8923427.820.1521001118004001104803314996713860331.49966923-2.663805670.005590.008575218.65980.034348718.44560.032674818.08950.0300171917.92960.0467951017.99230.00375918.48060.0248476712122112101150000.9991291150000.999311150000.9996381150000.9992171150000.99879811
CSS_J220457.2-051411331.23867-5.2365615.640.536430.751739.670.061004118010930101713312388786386331.23888082-5.236755940.004690.005296016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
CSS_J215602.1-052021329.00905-5.3392116.510.7575580.4721814.770.0361004117008292101593290092623326329.00923968-5.339287190.01670.018416016.84940.0078616.42170.0220471516.37590.0080411516.34680.003574816.37210.0180631116.48270.0234157210162212121150000.9999211150000.9996771150000.9994061150000.9991671150000.99943511
CSS_J220820.9-020222332.08714-2.039717.010.5616870.9526317.610.0921001119018133105553320871392714332.08715134-2.039794720.00270.01026017.75550.003879817.3820.0089321317.16340.033642317.17830.007448416.94410.013463417.38460.00940480142129881150000.9996851150000.9992741150000.9998781150000.9988711150000.99967211
CSS_J222707.9+051259336.783115.2164616.190.5525570.7327511.290.1731104120055941114263367831840264336.783195465.216479990.001770.001886016.33580.006233616.22930.117566716.27940.0169042516.16580.024596916.0840.028519916.28070.1348978713153612111150000.9995581150000.998991150000.9996771150000.9992771150000.99857211
CSS_J215435.8-005450328.64951-0.9141617.750.5752120.925724.140.1261001117050169106903286496013281328.64959053-0.914316820.002190.001385218.14090.074842717.87060.0572561017.61590.0420861717.76570.024178917.6690.0111571017.90650.0623717512122613121150000.9996821150000.9993131150000.9992911150000.9996971150000.99902411
CSS_J222942.0-040519337.42517-4.0887618.080.4756991.1923029.630.0671004120034845103093374253263940337.42533413-4.088731280.002450.001945218.8380.022485918.5520.01008818.50710.0138251418.23550.118849818.34540.0194021018.63140.0117768214162612141150000.9995221150000.9995811150000.9994791150000.9996691150000.9993511
CSS_J223105.2+000538337.771770.0940416.970.6702280.427817.70.0711101121002733108113377718393164337.771859970.093919850.010240.010616017.19520.013075716.98060.0065821416.87660.0128723016.84650.015577816.74790.011255917.02360.0059729414223510131150000.9995021150000.9996831150000.9997331150000.9991911150000.99969411

Query #2: Get the detections

Now we get all detections associated with these objIDs

SELECT
o.objID, o.raMean, o.decMean,
d.ra, d.dec, d.raErr, d.decErr, 
d.detectID, d.obstime, d.exptime, d.airmass, d.psfflux, d.psffluxErr, d.psfQf, d.psfQfPerfect, d.psfLikelihood, d.psfChiSq, d.extNSigma, d.zp, d.apFlux, d.apFluxErr,
d.imageID, d.filterID,
d.sky, d.skyerr, d.infoflag, d.infoflag2, d.infoflag3,
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt, 
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect,
o.primaryDetection, o.bestDetection
 INTO mydb.[RRLPS1det]
 FROM mydb.[RRLPS1] o
JOIN Detection d on d.ObjID = o.ObjID


Results (30 seconds)

There are 946 detection entries for the 12 objects, and below are the first 10 entries

101713312388786386331.23888082-5.23675594331.23887966-5.236737090.01421290.020436928104123120000023056911.4125766451.134790.002368083.23403E-050.07493820.02829960.0014811.221773.1783824.56090.0001011921.15941E-067921642037.38736E-053.65002E-06102760453128327686016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.2388835-5.23673670.008722090.013683628104006920000014856911.4009661451.120940.002357912.46269E-050.1154580.115458-0.6833521.38811-0.40789424.56060.0001150571.24099E-067921472036.59469E-053.4392E-06102760453128327686016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23887945-5.236752670.002552730.0027200727215526814000005456822.5529494451.239780.001600255.42303E-060.9982730.9982730.7184581.851510.3605224.60310.001630744.55078E-067543441439.63136E-054.39628E-0610276045312873749126016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23887517-5.236753570.002555730.0027983827215410114000005556822.5412889451.291010.001639925.55706E-060.9990950.9990950.5771441.655770.55756124.60160.001653624.55156E-067543271430.0001025064.54961E-0610276051712873749126016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23888039-5.236754710.002511590.0025232527215643414000006156822.5646058451.198980.0015995.33245E-060.9991920.9991920.1627261.950351.3959624.60480.001656684.56818E-067543611439.17713E-054.18141E-0610276045312873749126016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23888187-5.236758050.002280020.0022956627215759614000005856822.576232451.167190.001607265.26372E-060.9995010.9995010.2229331.891151.2187724.60470.001658194.55018E-067543781438.90853E-054.19146E-0610276051712873749126016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23887668-5.236739140.00225780.001980327386105647000014956839.6107502301.137310.001971368.18044E-060.8851710-0.2267841.2275-1.2086824.22170.001724376.86483E-067638494745.24721E-055.20364E-06102760453160348806016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23888109-5.236749940.003347480.0030812227416085747000008656842.6087543301.1480.001441267.36061E-060.9340250-0.3586471.03449-0.91794724.24020.001382926.01342E-067656154746.60553E-055.55748E-06102760517160348806016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23887875-5.236744190.006211350.0062808128403513537000008856941.351618451.177460.001254425.51837E-060.9993670.9993670.05185081.202171.9443724.53480.001276984.00209E-068075623735.62479E-053.33006E-0610276045312873421446016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594331.23887939-5.23676170.006495790.0066217828403635937000008656941.3638651451.214370.001258445.59236E-060.999130.999130.02153912.12852.298424.52340.001148583.81474E-068075803735.97269E-053.37162E-0610276045312873749126016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611

Query #3: Get the forced detections

Now we get the forced photometry

SELECT
o.objID, o.raMean, o.decMean,
fwm.detectID, fwm.obstime, fwm.exptime, fwm.airmass, fwm.Fpsfflux, fwm.FpsffluxErr, fwm.FpsfQf, fwm.FpsfQfPerfect, fwm.FpsfChiSq, fwm.zp, fwm.FapFlux, fwm.FapFluxErr,
fwm.forcedWarpID, fwm.filterID,
fwm.Fsky, fwm.Fskyerr, fwm.Finfoflag, fwm.Finfoflag2, fwm.Finfoflag3,
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt, 
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect,
o.primaryDetection, o.bestDetection
 INTO mydb.[RRLPS1forceddet]
 FROM mydb.[RRLPS1] o
JOIN ForcedWarpMeasurement fwm on fwm.ObjID = o.ObjID


Results (3:45 minutes)

There are 824 forced detection entries for the 12 objects, and below are the first 10 entries

101713312388786386331.23888082-5.23675594247394876066575312955509.1963096301.125280.002261558.89297E-060.9984470.8990651.7050924.21840.002258537.8829E-065730688442.44443E-075.58402E-0616986988901247815686016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247394931579027613755509.2069606301.116110.002376238.73044E-060.9979870.6190151.9887424.20530.002344778.07563E-06573068864-7.89231E-084.77904E-06706740801806016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247396038257882064956084.5997338301.160110.001540277.7769E-060.9981490.9981491.7997424.29260.001682086.49405E-065730688841.73045E-076.09569E-06169869889073410566016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247396169844942596156439.5801154601.343190.001569169.80598E-060.2725970.1803291.1752624.25920.0004236372.32656E-06573068904-1.71004E-073.96178E-06169869889006016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247396204634177693756595.2046749601.154270.001512384.94983E-060.9985730.9985733.2198624.29440.001555724.46429E-065730689348.98555E-083.09952E-061698698890408954886016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247396221491924330556084.5880277301.190010.001506647.84793E-060.9982770.9982771.708124.28450.001619566.38274E-065730689443.2375E-076.02042E-06169869889073410566016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247410553690416900155451.3857987401.113240.0008953056.75477E-060.7257630.55960171.77224.690.002056955.07366E-065730690126.39024E-091.49626E-06169869889006016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247410580533962500155801.4656768401.160950.0006164714.43598E-060.9989610.99896163.053324.67820.002068055.10856E-065730690525.8963E-081.63808E-06169869889073410566016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247410586332168349755801.4755793401.185920.0010984.21394E-060.9987080.9987082.3290624.68830.0012684.01415E-065730690621.10105E-071.71416E-0616986988901080043526016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611
101713312388786386331.23888082-5.23675594247410588103842359355804.378647401.138120.001597377.25792E-060.6139810.50558812.086224.6920.001011073.5996E-065730690727.46216E-081.61881E-06169869889006016.27170.027581615.59560.03394615.88790.0345061215.89230.017074315.85420.007946515.73680.076347731614241091150000.9996811150000.9993841150000.9995011150000.9987611150000.99799611



Obtain lightcurves for a single object

Goal/Description

Star CSS J030521.9+013231 (Catalina Sky Survey), 584630948352256 (GAIA) is an RR Lyrae with period = 0.55547 days and coordinates RA = 46.341468915923 and DEC = 1.54199810825252 (ref. GAIA DR2,  2018yCat.1345....0G). In the following, we obtain the PSF and aperture photometry light-curves, both forced and unforced, for this star.

Query #1: Get the ObjID for the star

SELECT 
o.objID,  
o.raMean, o.decMean, o.raMeanErr, o.decMeanErr, 
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt, 
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect
 INTO mydb.[RRL_584630948352256_PS1]
FROM dbo.fGetNearbyObjEq(46.341468915923, 1.54199810825252, 1.0/60.0) as x
JOIN MeanObjectView o on o.ObjID=x.ObjId


Results (1 entry, < 1 min)

objIDraMeandecMeanraMeanErrdecMeanErrqualityFlaggMeanPSFMaggMeanPSFMagErrgMeanPSFMagNptrMeanPSFMagrMeanPSFMagErrrMeanPSFMagNptiMeanPSFMagiMeanPSFMagErriMeanPSFMagNptzMeanPSFMagzMeanPSFMagErrzMeanPSFMagNptyMeanPSFMagyMeanPSFMagErryMeanPSFMagNptrMeanKronMagrMeanKronMagErrnDetectionsngnrninznygFlagsgQfPerfectrFlagsrQfPerfectiFlagsiQfPerfectzFlagszQfPerfectyFlagsyQfPerfect
10985046341482086746.341469861.541999060.003030000021681190.003920000046491626017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913

Query #2: Get the detections

SELECT 
o.objID, o.raMean, o.decMean,
d.ra, d.dec, d.raErr, d.decErr, 
d.detectID,
 d.obstime, d.exptime, d.airmass, d.psfflux, d.psffluxErr, d.psfQf, 
d.psfQfPerfect, d.psfLikelihood, d.psfChiSq, d.extNSigma, d.zp, 
d.apFlux, d.apFluxErr,
d.imageID, d.filterID,
d.sky, d.skyerr, d.infoflag, d.infoflag2, d.infoflag3,
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt, 
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect
 INTO mydb.[RRL_584630948352256_PS1det]
 FROM mydb.[RRL_584630948352256_PS1] o
JOIN Detection d on d.ObjID = o.ObjID


Results (92 entries, < 1 min)

Below are the first 10 entries out of 92 total entries

objIDraMeandecMeanradecraErrdecErrdetectIDobstimeexptimeairmasspsffluxpsffluxErrpsfQfpsfQfPerfectpsfLikelihoodpsfChiSqextNSigmazpapFluxapFluxErrimageIDfilterIDskyskyerrinfoflaginfoflag2infoflag3qualityFlaggMeanPSFMaggMeanPSFMagErrgMeanPSFMagNptrMeanPSFMagrMeanPSFMagErrrMeanPSFMagNptiMeanPSFMagiMeanPSFMagErriMeanPSFMagNptzMeanPSFMagzMeanPSFMagErrzMeanPSFMagNptyMeanPSFMagyMeanPSFMagErryMeanPSFMagNptrMeanKronMagrMeanKronMagErrnDetectionsngnrninznygFlagsgQfPerfectrFlagsrQfPerfectiFlagsiQfPerfectzFlagszQfPerfectyFlagsyQfPerfect
10985046341482086746.341469861.5419990646.341465831.541999130.009303729981184010.0096892500296235120566112773000015056157.6114477301.096539974212650.0003124180075246844.38540018876665E-060.9983540177345280.998354017734528-0.9961450099945070.87238597869873-0.0048311301507055824.26659965515140.0003128749958705162.82292990050337E-065126337345.3173800552031E-054.96299981023185E-06102760517128744837766017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341471011.541995840.008864640258252620.0093005802482366620566183473000013956157.6185191301.084640026092530.0003087979857809844.30704994869302E-060.9978860020637510.997886002063751-0.7512199878692630.885471999645233-0.31703200936317424.26460075378420.0003070069942623382.80717995337909E-065126477345.40842011105269E-054.96676011607633E-06102760517128744837766017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341470321.541994860.0164823997765780.018109099939465520546351973000014956155.6353733301.070350050926210.0004264760063961151.07013001979794E-050.9975069761276250.997506976127625-0.4019590020179750.956974983215332-0.83812701702117923.28190040588380.0004324890032876285.24767983733909E-065117357350.0002806730044540021.65041001309874E-05102760517128241521286017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341475291.542007290.01820969954133030.018521599471569120546391473000014356155.6393177301.066750049591060.0004794780106749391.25105998449726E-050.9970269799232480.997026979923248-0.1146790012717251.0324399471283-1.5775099992752123.27949905395510.0004396490112412725.31304021933465E-065117437350.0003930029924958941.91349008673569E-05102760453128912609926017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341486711.54200090.0101944999769330.0099984798580408121134710673000008656214.471324431.073590040206910.0003368649922776973.1451399991056E-060.9988809823989870.9708110094070430.9731330275535580.5710170269012450.033678598701953924.47299957275390.0003403179871384052.1996900159138E-065314177317.04271997165051E-061.81308996616281E-0610276051712873749126017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341470481.54200660.009333900175988670.0087078996002674121134841073000008256214.4843629431.062520027160640.000319473008858042.96693997370312E-060.9993789792060850.9882529973983760.1089930012822150.5604010224342351.6027400493621824.47739982604980.0003297629882581532.17397996493673E-065314377317.01579983797274E-061.76822004505084E-0610276051712873749126017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.34147131.541998190.003330020001158120.0033882700372487321055709366000007956206.5712068451.11612999439240.0005187939968891442.92105005428311E-060.9983270168304440.9983270168304440.6735990047454831.160140037536620.42121300101280224.57939910888670.0005225139902904632.58356999438547E-065269996633.55550982931163E-052.70530995294394E-061027605171281248154246017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341466261.542002410.003471419913694260.0035481599625221055844266000009156206.5846906451.152729988098140.0005161250010132792.92271010948753E-060.9979069828987120.76691597700119-0.2888930141925811.1114000082016-1.0605499744415324.57810020446780.0005118770059198142.55920008385147E-065270196633.64152001566254E-052.64890991275024E-06102760517128348806017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341475381.541999940.003994400147348640.0045131701044738321055177875000008056206.5180227401.058740019798280.0004756159905809912.96145003630954E-060.9990019798278810.9990019798278810.9099370241165161.048359990119930.11311800032854124.68020057678220.000480396993225442.4879000193323E-065269417522.86260001303162E-052.47058005697909E-0610276051712873749126017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.5419990646.341472621.54199390.00364916003309190.0040896399877965521055304675000007356206.530699401.061169981956480.0005306359962560243.04362993119867E-060.9992439746856690.999243974685669-0.5486170053482061.09794998168945-0.59983402490615824.67889976501460.0005283370264805852.61910008703126E-065269617522.90354000753723E-052.51040000875946E-0610276051712873749126017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913

Query #3: Get the forced detections

SELECT
o.objID, o.raMean, o.decMean,
fwm.detectID,
 fwm.obstime, fwm.exptime, fwm.airmass, fwm.Fpsfflux, fwm.FpsffluxErr, 
fwm.FpsfQf, fwm.FpsfQfPerfect, fwm.FpsfChiSq, fwm.zp, fwm.FapFlux, 
fwm.FapFluxErr,
fwm.forcedWarpID, fwm.filterID,
fwm.Fsky, fwm.Fskyerr, fwm.Finfoflag, fwm.Finfoflag2, fwm.Finfoflag3,
o.qualityFlag,
o.gMeanPSFMag, o.gMeanPSFMagErr, o.gMeanPSFMagNpt,
o.rMeanPSFMag, o.rMeanPSFMagErr, o.rMeanPSFMagNpt,
o.iMeanPSFMag, o.iMeanPSFMagErr, o.iMeanPSFMagNpt,
o.zMeanPSFMag, o.zMeanPSFMagErr, o.zMeanPSFMagNpt,
o.yMeanPSFMag, o.yMeanPSFMagErr, o.yMeanPSFMagNpt,
o.rMeanKronMag, o.rMeanKronMagErr,
o.nDetections, o.ng, o.nr, o.ni, o.nz,o.ny,
o.gFlags, o.gQfPerfect,
o.rFlags, o.rQfPerfect,
o.iFlags, o.iQfPerfect,
o.zFlags, o.zQfPerfect,
o.yFlags, o.yQfPerfect
INTO mydb.[RRL__584630948352256_PS1forceddet] 
FROM mydb.[RRL_584630948352256_PS1] o
JOIN ForcedWarpMeasurement fwm on fwm.ObjID = o.ObjID


Results (84 entries, <1 min)

Below are the first 10 entries out of 84 total entries

objIDraMeandecMeandetectIDobstimeexptimeairmassFpsffluxFpsffluxErrFpsfQfFpsfQfPerfectFpsfChiSqzpFapFluxFapFluxErrforcedWarpIDfilterIDFskyFskyerrFinfoflagFinfoflag2Finfoflag3qualityFlaggMeanPSFMaggMeanPSFMagErrgMeanPSFMagNptrMeanPSFMagrMeanPSFMagErrrMeanPSFMagNptiMeanPSFMagiMeanPSFMagErriMeanPSFMagNptzMeanPSFMagzMeanPSFMagErrzMeanPSFMagNptyMeanPSFMagyMeanPSFMagErryMeanPSFMagNptrMeanKronMagrMeanKronMagErrnDetectionsngnrninznygFlagsgQfPerfectrFlagsrQfPerfectiFlagsiQfPerfectzFlagszQfPerfectyFlagsyQfPerfect
10985046341482086746.341469861.54199906247611931553588969055507.3712258431.14572000503540.0003502189938444642.648800091265E-060.99814498424530.99814498424530.7650970220565824.45639991760250.0003594960144255312.33503010349523E-064252165316.85637999708888E-081.56919998062222E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611933378950069855507.3823453431.116260051727290.000339841004461052.61849004346004E-060.9980720281600950.9980720281600950.74998199939727824.46409988403320.000348416011547672.29292004405579E-064252165415.37593010108139E-081.50972005030781E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611940787768655455871.5445119431.353369951248170.0002546040050219743.88524995287298E-060.9993240237236020.9993240237236021.1026300191879324.09700012207030.0002628749934956432.28175008487597E-064252165711.09932997816031E-073.17848002850951E-0616986988901080043526017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611951739935260255871.5567211431.445569992065430.0003708919975906613.16761997964932E-060.9989579916000370.9989579916000371.0963799953460724.36849975585940.0003717239887919282.40599001699593E-064252165818.86901005969776E-081.9790900296357E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611950693036981856214.471324431.073590040206910.0003240299993194643.07633990814793E-060.9997109770774840.9731159806251530.63075798749923724.46089935302730.0003379129921086132.1908799681114E-064252165913.48615003531449E-091.4986300129749E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611948867675881056214.4843629431.062520027160640.000300590996630492.80448989542492E-060.9998009800910950.9892820119857790.58918702602386524.45569992065430.0003322949924040592.18906006921316E-06425216601-1.36515003745785E-081.61688001298899E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611973751642652256620.367559431.066300034523010.0005234139971435073.3680000797176E-060.9991179704666140.9991179704666140.87650597095489524.47579956054690.0005268700188025832.74996000371175E-064252166115.30874011417382E-081.7956000419872E-0616986988901247815686017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611978368732495456630.3025631431.129480004310610.0002697200106922542.32235993280483E-060.9990890026092530.9990890026092531.2416100502014224.46520042419430.0002844409900717442.03790000341542E-06425216621-8.71303029725823E-121.5039599929878E-0616986988901247815686017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247611992810560028256630.3156559431.099650025367740.0003498439909890292.72148008662043E-060.9989169836044310.9987409710884091.3101799488067624.47060012817380.0003538829914759842.25994995162182E-064252166311.1416600109726E-081.47287005347607E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913
10985046341482086746.341469861.54199906247612547344525033055859.5429067431.179819941520690.000305322988424452.5323899990326E-060.9997000098228450.9997000098228451.7789800167083724.4183998107910.0003157760074827822.18451009459386E-064252166412.13619006927956E-081.4864200466036E-06169869889073410566017.63990020751950.0298919994384051217.19619941711430.04488600045442581317.48119926452640.04934100061655042317.50720024108890.05795700103044511017.52680015563960.02181899920105931017.21780014038090.04143000021576889214183017131150000.9995040297508241150000.9997199773788451150000.9995329976081851150000.998973011970521150000.99940699338913


The following figures show the PS1 i-band light curve for the RR Lyrae based on the detection and force detection aperture and PSF photometry:

FIG. 1: PS1 i-band light curve for the RR Lyrae from aperture photometry (left panel) and  PSF photometry (right) from the Detection table.

FIG. 2: PS1 i-band light curve  for the same star from aperture photometry (left panel) and PSF photometry  (right) from the force detection table.  


As a comparison, the Catalina Sky Survey V-band light curve:


Select mean objects and associated detections within 3 deg of HDF; compare photometry and astrometry with Gaia DR2

This mini-project illustrates how to extract mean objects with predefined quality parameters and then the associated detections.  The goal ultimately is to understand the astrometric properties of PanSTARRS before the Gaia adjustments, therefore we are interested in the original detections; forced measurements are not useful.

Step 1: Obtain mean objects in cone search, filtering for objects with a high probability of Gaia matches

We start with a cone search of ObjectThin within a 3 degree radius of the nominal HDF position (169.2,61.3).  We select only mean objects with at least three detections and mean PSF magnitude r < 21.0 (Gaia sources are sparse at fainter magnitudes).  The following search was run in CasJobs and took 8:29, returning 192,611 objects.

select o.objID, o.raMean, o.decMean, o.raMeanErr, o.decMeanErr, 
   o.raStack, o.decStack, o.raStackErr, o.decStackErr, o.epochMean, 
   o.nDetections, o.ng, o.nr, o.ni, o.nz, o.ny, o.objInfoFlag, o.qualityFlag,
   m.gMeanPSFMag, m.rMeanPSFMag, m.iMeanPSFMag, m.zMeanPSFMag, m.yMeanPSFMag,
   m.gMeanPSFMagErr, m.rMeanPSFMagErr, m.iMeanPSFMagErr, m.zMeanPSFMagErr, m.yMeanPSFMagErr,
   m.gMeanKronMag, m.rMeanKronMag, m.iMeanKronMag, m.zMeanKronMag, m.yMeanKronMag,
   m.gFlags, m.rFlags, m.iFlags, m.zFlags, m.yFlags 
   into mydb.MyTable_HDF_3deg from fGetNearbyObjEq(169.20,62.30,180.0) nb
inner join ObjectThin o on o.objid=nb.objid and o.nDetections>3
inner join MeanObject m on o.objid=m.objid and o.uniquePspsOBid=m.uniquePspsOBid and m.rMeanPSFMag<21.0


The output table is 48,200 kb; here is a sample of the first few rows:


bigint [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

smallint [2]

smallint [2]

smallint [2]

smallint [2]

smallint [2]

smallint [2]

int [4]

tinyint [1]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

int [4]

int [4]

int [4]

int [4]

int [4]


objIDraMeandecMeanraMeanErrdecMeanErrraStackdecStackraStackErrdecStackErrepochMeannDetectionsngnrninznyobjInfoFlagqualityFlaggMeanPSFMagrMeanPSFMagiMeanPSFMagzMeanPSFMagyMeanPSFMaggMeanPSFMagErrrMeanPSFMagErriMeanPSFMagErrzMeanPSFMagErryMeanPSFMagErrgMeanKronMagrMeanKronMagiMeanKronMagzMeanKronMagyMeanKronMaggFlagsrFlagsiFlagszFlagsyFlags
179681712835753758171.283559759.735863690.003650000086054210.0082999998703599171.2835648459.73587370.001000000047497450.0010000000474974556887.0658912726172412135036359686019.63859939575218.609699249267617.447399139404316.921699523925816.67420005798340.009003999643027780.008698999881744380.004497999791055920.004377999808639290.0088109998032450719.653999328613318.664199829101617.511400222778316.9904994964616.7628002166748115000115000115000115000115000
181881687299148148168.7299368661.572846190.01322000008076430.014299999922514168.7299281461.572933810.001000000047497450.0010000000474974556067.98423611751112271694449157125321.253200531005920.462699890136720.115600585937519.850500106811519.50760078430180.06048899888992310.05154100060462950.03937999904155730.03533900156617160.079178996384143821.032400131225619.982799530029319.518299102783219.316999435424819.11580085754391689221616892216168922161689221616892216
184901650524008966165.0523844464.090152760.008980000391602520.0161300003528595165.0523703864.090186050.001000000047497450.0010000000474974556850.597314811039184121145036359686014.876899719238314.468199729919414.332500457763714.295999526977514.26780033111570.003291999921202660.002353999996557830.00209499988704920.004273999948054550.0041729998774826514.931599617004414.531100273132314.388999938964814.35410022735614.2974996566772115000115000115000115000115000
183201732358863225173.2359732162.668787690.01348999980837110.0165800005197525173.2358820162.668759330.001000000047497450.0010000000474974556170.75402778689102613104449157125319.226999282836918.67399978637718.729600906372118.514299392700218.35670089721680.04199799895286560.09958700090646740.06123600155115130.1141259968280790.03237000107765216.322999954223615.96739959716815.911100387573215.893300056457516.10960006713871689221616892216168922161689221616892216
183961662062155429166.2062349363.303911170.01016999967396260.00496000004932284166.2062558463.3039140.001000000047497450.0010000000474974557009.8412615768614221794365271045220.306100845336919.95229911804219.843399047851619.815599441528319.46870040893550.01828599907457830.01108399964869020.01359200011938810.01463299989700320.095564998686313620.402999877929720.055999755859419.945199966430719.930299758911119.1963996887207115000115000115000115000115000
184091652132916264165.2131755763.412931280.03965999931097030.0457100011408329165.2131585463.41294820.001000000047497450.0010000000474974556455.00677083314481054449157125321.010499954223620.222000122070320.280799865722719.930599212646519.35490036010740.1341370046138760.03897000104188920.01494599971920250.1375489979982380.037838000804185919.569700241088919.434600830078118.955600738525418.620800018310518.2922000885011689221616892216168922161689221616892216
182291632855391025163.2854423461.908546620.009870000183582310.00810999982059002163.2855198161.908584070.001000000047497450.0010000000474974556890.1930439871962417155036359686018.520799636840817.598100662231417.18350028991717.025800704956116.9036006927490.007381999865174290.005032999906688930.003556000068783760.005563999991863970.006905000191181918.596000671386717.665100097656317.270500183105517.104200363159217.0216007232666115000115000115000115000115000
181781686296338628168.629674161.489849910.006149999797344210.014580000191927168.6296480961.489921460.001000000047497450.0010000000474974556778.06214128313142218165036360966015.682700157165515.307100296020515.175800323486315.163599967956515.14939975738530.003380999900400640.002305000089108940.003481999970972540.002041999949142340.0026620000135153515.728199958801315.35470008850115.221699714660615.216699600219715.1858997344971115000115000115000115000115000
184901651016408575165.1016387164.089823170.01498000044375660.0162300001829863165.1015922464.089859550.001000000047497450.0010000000474974556221.05408565861214352144449157125321.161399841308620.583799362182620.248500823974620.026800155639619.57799911499020.0289489999413490.03816999867558480.02350099943578240.04286900162696840.095078997313976321.004199981689520.272499084472720.011800765991219.737300872802719.330299377441416892216168922161689221616892216115000
183961660492332532166.0490593663.301524980.01113000046461820.00353999994695187166.04908163.30151830.001000000047497450.0010000000474974557010.88079861721152315184365272325221.908599853515620.943899154663119.761199951171919.21739959716818.97130012512210.1302929967641830.02821500040590760.01100800000131130.01623200066387650.032907001674175321.2488002777121.038000106811519.878099441528319.340999603271518.977399826049816892472115000115000115000115000
181781684177294164168.4177590761.486171110.02759999968111520.0313999988138676168.4177421561.48618770.001000000047497450.0010000000474974555831.9228703748510161164449157125321.674400329589820.845300674438520.468500137329120.066099166870119.65290069580080.07818999886512760.03576600179076190.0376879982650280.04359500110149380.10396900027990321.600400924682620.425699234008820.052600860595719.568700790405319.3642997741699115000168922161689221616892216115000
181781685428055178168.5428435461.486984680.01578000001609330.0245299991220236168.5428123961.487029460.001000000047497450.0010000000474974555996.65858796671314191474449157125320.453500747680720.282100677490220.028499603271520.026199340820319.76189994812010.01295499969273810.02614500001072880.03076400049030780.04390500113368030.10423099994659420.248100280761719.958700180053719.795000076293919.628799438476619.558599472045916892216168922161689221616892216115000

Note that the mean object astrometric parameters (raMean, decMean) have been post-processed to match with corresponding Gaia sources, and therefore are not indicative of the underlying PanSTARRS astrometry.

Step 2: Obtain detections associated with objects selected in Step 1

The following query identifies all detections associated (i.e., having the same ObjID) as the mean objects obtained in Step 1, and extracts relevant parameters for each.  The query ran for 3:18 and returned 8,560,632 rows (detections), or an average of over 40 per mean object. 

select d.detectID, d.objid, d.obstime, d.exptime, d.airmass, d.psfflux, d.psffluxErr, d.psfQF,
d.imageID, d.filterID, d.sky, d.skyerr, d.infoflag, d.infoflag2, d.infoflag3, d.ra, d.dec, d.raerr, d.decerr 
into mydb.MyTable_HDF_det2
from Detection d
inner join MyDB.MyTable_HDF_3deg mm on d.objid=mm.objid


The resulting table is about 1.3 GB, exceeding the standard limit in CasJobs.  A sample of the first several rows follows.


bigint [8]

bigint [8]

float [8]

float [8]

float [8]

float [8]

float [8]

float [8]

bigint [8]

tinyint [1]

float [8]

float [8]

bigint [8]

int [4]

int [4]

float [8]

float [8]

float [8]

float [8]


detectIDobjidobstimeexptimeairmasspsffluxpsffluxErrpsfQFimageIDfilterIDskyskyerrinfoflaginfoflag2infoflag3radecraerrdecerr
14825000431000054017916168849875933555583.5003176451.348449945449831.91964991245186E-051.32776995087625E-060.9989179968833922844003135.78510989726055E-053.17303010888281E-063566796907374912168.8499125559.307201060.03775979951024060.0377597995102406
14825066631000142117916168849875933555583.5069285451.334789991378781.46703996506403E-051.32614002268383E-060.9988089799880982844103135.76378006371669E-053.13063992507523E-063566796907374912168.8498129659.307154570.04934319853782650.0493431985378265
12332571117000017917916168849875933555334.2573031301.280840039253234.31074004154652E-053.70660995940852E-060.9995570182800291693751745.73653014726005E-054.78320998809068E-06356679690124782656168.8498427659.307210120.04670640081167220.0467064008116722
12342664617000022917916168849875933555335.2666525301.286540031433114.95345011586323E-055.49368996871635E-060.9996020197868351698931747.6477401307784E-055.54801999896881E-06356679690124782656168.8498200559.307152270.06020810082554820.0602081008255482
12342538817000018117916168849875933555335.2540732301.280699968338012.96463003905956E-053.3808998978202E-060.9976670145988461698701747.8459401265718E-055.75311014472391E-063565158507374912168.8499264759.307143160.06189449876546860.0618944987654686
11675354617000009417916168849875933555268.5356725361.477880001068121.73035004991107E-051.85177998446306E-060.9988420009613041477401721.61984007718274E-052.14170995604945E-063565158507374912168.8499545159.30718950.05811170116066930.0581117011606693
11675441617000022717916168849875933555268.5443795361.515789985656741.99864007299766E-052.02677006200247E-060.998709022998811477551721.64802004292142E-052.17587989936874E-063565158507374912168.8497854559.307198650.05506790056824680.0550679005682468
11564466317000036617916168849875933555257.4468208321.281659960746772.90089992631692E-054.25750022259308E-060.9991989731788641443761739.26200009416789E-054.89407011627918E-06356679690108005440168.8500683759.307164010.07962950319051740.0796295031905174
11715120217000027917916168849875933555272.5123379521.430600047111517.2386001193081E-061.12247005290556E-060.9507290124893191488001716.34667003396316E-061.66244001320592E-063566796907374912168.8499170559.307267530.08420000225305560.0842000022530556
11564366517000016117916168849875933555257.4368465321.286839962005623.17109006573446E-053.91080993722426E-060.9992690086364751443591739.12395989871584E-054.86543012812035E-06356679690108005440168.8498281159.307242740.06699889898300170.0669988989830017
22356166065000040117916168849875933556336.6168684431.501070022583017.67202982387971E-061.16457999865816E-060.9980090260505685808796514.41867996414658E-061.75355000919808E-063566796907374912168.8495948659.307388580.08270119875669480.0827011987566948
22356230365000036317916168849875933556336.6232838431.530670046806346.94970003678463E-061.12114003059105E-060.9985970258712775808886514.63049991594744E-061.78015000074083E-063565158507374912168.8499765859.307147630.08789809793233870.0878980979323387
18654938836000054617916168849875933555966.4940736301.287840008735662.57753999903798E-052.9135799195501E-060.9976869821548464519183649.48685992625542E-055.99779014009982E-063566796907374912168.8499592859.307228640.06158199906349180.0615819990634918
18654859636000047617916168849875933555966.4861404301.294569969177253.00632000289625E-053.19225000566803E-060.9984599947929384519033649.63661004789174E-056.03015996603062E-063565158507374912168.8498806259.307177440.05784339830279350.0578433983027935
19482886136000039917916168849875933556049.2888798451.279600024223332.2316900867736E-051.71546003002732E-060.9971929788589484833903635.70791016798466E-053.15303009301715E-063566796907374912168.849787359.307235660.04186490178108220.0418649017810822

Step 3: Match objects and detections with the closest Gaia DR2 source

The same region of the sky contains 86,685 Gaia DR2 sources, of which 77448 have a valid five-parameter astrometric solution, and 68638 have also a valid G magnitude.  For the first matching stage, we do not require valid magnitude or five-parameter astrometry; the direct positional match with a generous 10" radius finds 82,398 matches, with the vast majority well within 1":

In this comparison, it is useful to distinguish point sources from extended sources.  The latter wuill likely be treated differently in Gaia vs. Pan_STARRS, and their astrometric and photometric accuracy is likely poorer.  One way to distinguish point from extended sources is to use the difference between Kron and PSF magnitudes; another is encoded in the QF_OBJ_EXT bit (bit 1) from the qualityFlag parameter in ObjectThin (extracted from the query in Step 1):

ExtendedFlag = (qualityFlag AND 1)

(this is a bitwise AND).  The ExtendedFlag thus defined correlates well with the Kron vs. PSF magnitude difference (which presumably is part of the definition):

Red dots in this plot have ExtendedFlag == true.  In the following, we use ExtendedFlag to identify extended objects.

Step 4: compare Gaia and PanSTARRS magnitudes for point sources

The match distance distribution shows clearly that "true" matches likely have match distances << 1".  This plot shows that PanSTARRS r-band PSF magnitudes and Gaia G band magnitudes match very well for ``true'' point source matches (separation < 0.2"):

The plot shows two populations of point sources: a narrow band with r-G ~ 0, containing a majority of the matches, and a broader distribution at positive r-G values (brighter in G than in r).  Extended sources are mostly brighter in PanSTARRS r, as expected since Gaia, with its higher angular resolution, would only measure the core of the object.  (We will neglect extended sources henceforth.)  It turns out that the second population of point sources, at positive r-G, is constituted of very red stars, for which the extremely broad G passband is dominated by red photons.  This becomes clear if the r-G magnitude difference is plotted against PanSTARRS colors, e.g., r-i:

where the region of positive r-G (Gaia brighter) corresponds with positive r-i (red stars).  The narrowness of the sequence testifies to the quality of Gaia and PanSTARRS magnitudes. 

We can take one additional step and attempt to define a color transformation that maps Gaia magnitudes (G, B, and R) into PanSTARRS r.  A degree 4 polynomial results in a very good match, albeit with large scatter at faint magnitudes, where Gaia B and R magnitudes lose precision:

It would also be possible to define a combination of PanSTARRS magnitudes to map into Gaia G, but the above plots clealy show that magnitudes are well matched, so this has not been pursued further. 

Step 5: Compute mean detection positions and compare to Gaia astrometry

Finally, we compare the astrometric match between Gaia and PanSTARRS using both mean object quantities and the average of detection positions.  Mean object astrometry is obtained from the DR2 table ObjectThin and has been adjusted to Gaia.  Detection positions are taken from the DR2 Detection table, and have not been adjusted to Gaia.  Accordingly, if we assign to each matched object a ``mean detection'' position corresponding to the average of its detections (as indicated by objID), this position is a true indicator of the underlying quality of PanSTARRS astrometry before Gaia matching:

The black histogram shows the match distance for mean object (typically Gaia-adjusted) positions; it peaks at 5 mas, with a significant tail beyond 20 mas.  The red histogram uses the mean position of detections; it peaks at 20 mas, with a significant tail beyond 50 mas.  More analysis is in progress to better understand how proper motions might impact the relative astrometry for both matched and unmatched PanSTARRS sources.  In particular, we plan to use detection positions to obtain proper motion estimates or bounds for sources that do not have Gaia proper motions.  Note that separations based on mean detection positions have not been adjusted for the (known) proper motion of the corresponding Gaia source; this is ongoing.

In summary, we show that 1) most Gaia sources within the chosen area have PanSTARRS matches; 2) point-source photometry is very consistent between Gaia and PanSTARRS, with obvious deviations related to both extended sources and point sources of extreme colors; and 3) detection positions can be used to understand the vaidity of PanSTARRS astrometry after matching to Gaia, and potentially offer information of source proper motions.

  • No labels