Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Query

Code Block
languagesql
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:

...

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

Code Block

...

languagesql
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

...

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

Code Block
languagesql
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

...

Now we get all detections associated with these objIDs

...

Code Block
languagesql
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

...

Now we get the forced photometry

...

Code Block
languagesql
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

...

Query #1: Get the ObjID for the star

...

Code Block
languagesql
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)

Results

ID_GAIAGAIARAGAIADECGperiodobjIDraMeandecMeanraMeanErrdecMeanErrqualityFlag
objIDraMeandecMeanraMeanErrdecMeanErrqualityFlag
gMeanPSFMaggMeanPSFMagErrgMeanPSFMagNptrMeanPSFMagrMeanPSFMagErrrMeanPSFMagNptiMeanPSFMagiMeanPSFMagErriMeanPSFMagNptzMeanPSFMagzMeanPSFMagErrzMeanPSFMagNptyMeanPSFMagyMeanPSFMagErryMeanPSFMagNptrMeanKronMagrMeanKronMagErrnDetectionsngnrninznygFlagsgQfPerfectrFlagsrQfPerfectiFlagsiQfPerfectzFlagszQfPerfectyFlagsyQfPerfect
primaryDetectionbestDetection58463094835225646.3414689159231.5419981082525217.44080.5554679
10985046341482086746.341469861.541999060.
00303
003030000021681190.
00392
003920000046491626017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
999407
99940699338913
11

Query #2: Get the detections

Code Block
SELECT o.ID_GAIA,o.GAIARA, o.GAIADec, o.Gmag, o.period,
languagesql
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

ID_GAIAGAIARAGAIADECGperiod
objIDraMeandecMeanradecraErrdecErrdetectIDobstimeexptimeairmasspsffluxpsffluxErrpsfQfpsfQfPerfectpsfLikelihoodpsfChiSqextNSigmazpapFluxapFluxErrimageIDfilterIDskyskyerrinfoflaginfoflag2infoflag3qualityFlaggMeanPSFMaggMeanPSFMagErrgMeanPSFMagNptrMeanPSFMagrMeanPSFMagErrrMeanPSFMagNptiMeanPSFMagiMeanPSFMagErriMeanPSFMagNptzMeanPSFMagzMeanPSFMagErrzMeanPSFMagNptyMeanPSFMagyMeanPSFMagErryMeanPSFMagNptrMeanKronMagrMeanKronMagErrnDetectionsngnrninznygFlagsgQfPerfectrFlagsrQfPerfectiFlagsiQfPerfectzFlagszQfPerfectyFlagsyQfPerfect
primaryDetection
bestDetection58463094835225646.3414689159231.5419981082525217.44080.55547
10985046341482086746.341469861.5419990646.341465831.541999130.
00930373
009303729981184010.
00968925
0096892500296235120566112773000015056157.6114477301.
09654
096539974212650.
000312418
0003124180075246844.
3854E
38540018876665E-060.
998354
9983540177345280.
998354
998354017734528-0.
996145
9961450099945070.
872386
87238597869873-0.
00483113
0048311301507055824.
2666
26659965515140.
000312875
0003128749958705162.
82293E
82292990050337E-065126337345.
31738E
3173800552031E-054.
963E
96299981023185E-06102760517128744837766017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
9989731158463094835225646.3414689159231.5419981082525217.44080.55547
998973011970521150000.
999407
99940699338913
10985046341482086746.341469861.5419990646.341471011.541995840.
00886464
008864640258252620.
00930058
0093005802482366620566183473000013956157.6185191301.
08464
084640026092530.
000308798
0003087979857809844.
30705E
30704994869302E-060.
997886
9978860020637510.
997886
997886002063751-0.
75122
7512199878692630.
885472
885471999645233-0.
317032
31703200936317424.
2646
26460075378420.
000307007
0003070069942623382.
80718E
80717995337909E-065126477345.
40842E
40842011105269E-054.
96676E
96676011607633E-06102760517128744837766017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
999407
99940699338913
1
109850463414820867
1584630948352256
46.
341468915923
341469861.
5419981082525217.44080.5554710985046341482086746.341469861.54199906
5419990646.
46.
341470321.541994860.
0164824
0164823997765780.
0181091
018109099939465520546351973000014956155.6353733301.
07035
070350050926210.
000426476
0004264760063961151.
07013E
07013001979794E-050.
997507
9975069761276250.
997507
997506976127625-0.
401959
4019590020179750.
956975
956974983215332-0.
838127
83812701702117923.
2819
28190040588380.
000432489
0004324890032876285.
24768E
24767983733909E-065117357350.
000280673
0002806730044540021.
65041E
65041001309874E-05102760517128241521286017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.341475291.542007290.
0182097
01820969954133030.
0185216
018521599471569120546391473000014356155.6393177301.
06675
066750049591060.
000479478
0004794780106749391.
25106E
25105998449726E-050.
997027
9970269799232480.
997027
997026979923248-0.
114679
1146790012717251.
03244
0324399471283-1.
57751
5775099992752123.
2795
27949905395510.
000439649
0004396490112412725.
31304E
31304021933465E-065117437350.
000393003
0003930029924958941.
91349E
91349008673569E-05102760453128912609926017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.341486711.54200090.
0101945
0101944999769330.
00999848
0099984798580408121134710673000008656214.471324431.
07359
073590040206910.
000336865
0003368649922776973.
14514E
1451399991056E-060.
998881
9988809823989870.
970811
9708110094070430.
973133
9731330275535580.
571017
5710170269012450.
0336786
033678598701953924.
473
47299957275390.
000340318
0003403179871384052.
19969E
1996900159138E-065314177317.
04272E
04271997165051E-061.
81309E
81308996616281E-0610276051712873749126017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.341470481.54200660.
0093339
009333900175988670.
0087079
0087078996002674121134841073000008256214.4843629431.
06252
062520027160640.
000319473
000319473008858042.
96694E
96693997370312E-060.
999379
9993789792060850.
988253
9882529973983760.
108993
1089930012822150.
560401
5604010224342351.
60274
6027400493621824.
4774
47739982604980.
000329763
0003297629882581532.
17398E
17397996493673E-065314377317.
0158E
01579983797274E-061.
76822E
76822004505084E-0610276051712873749126017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.34147131.541998190.
00333002
003330020001158120.
00338827
0033882700372487321055709366000007956206.5712068451.
11613
11612999439240.
000518794
0005187939968891442.
92105E
92105005428311E-060.
998327
9983270168304440.
998327
9983270168304440.
673599
6735990047454831.
16014
160140037536620.
421213
42121300101280224.
5794
57939910888670.
000522514
0005225139902904632.
58357E
58356999438547E-065269996633.
55551E
55550982931163E-052.
70531E
70530995294394E-061027605171281248154246017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.341466261.542002410.
00347142
003471419913694260.
00354816
0035481599625221055844266000009156206.5846906451.
15273
152729988098140.
000516125
0005161250010132792.
92271E
92271010948753E-060.
997907
9979069828987120.
766916
76691597700119-0.
288893
2888930141925811.
1114
1114000082016-1.
06055
0605499744415324.
5781
57810020446780.
000511877
0005118770059198142.
5592E
55920008385147E-065270196633.
64152E
64152001566254E-052.
64891E
64890991275024E-06102760517128348806017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.341475381.541999940.
0039944
003994400147348640.
00451317
0045131701044738321055177875000008056206.5180227401.
05874
058740019798280.
000475616
0004756159905809912.
96145E
96145003630954E-060.
999002
9990019798278810.
999002
9990019798278810.
909937
9099370241165161.
04836
048359990119930.
113118
11311800032854124.
6802
68020057678220.
000480397
000480396993225442.
4879E
4879000193323E-065269417522.
8626E
86260001303162E-052.
47058E
47058005697909E-0610276051712873749126017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071158463094835225646.3414689159231.5419981082525217.44080.55547
99940699338913
10985046341482086746.341469861.5419990646.341472621.54199390.
00364916
00364916003309190.
00408964
0040896399877965521055304675000007356206.530699401.
06117
061169981956480.
000530636
0005306359962560243.
04363E
04362993119867E-060.
999244
9992439746856690.
999244
999243974685669-0.
548617
5486170053482061.
09795
09794998168945-0.
599834
59983402490615824.
6789
67889976501460.
000528337
0005283370264805852.
6191E
61910008703126E-065269617522.
90354E
90354000753723E-052.
5104E
51040000875946E-0610276051712873749126017.
6399
63990020751950.
029892
0298919994384051217.
1962
19619941711430.
044886
04488600045442581317.
4812
48119926452640.
049341
04934100061655042317.
5072
50720024108890.
057957
05795700103044511017.
5268
52680015563960.
021819
02181899920105931017.
2178
21780014038090.
04143
04143000021576889214183017131150000.
999504
9995040297508241150000.
99972
9997199773788451150000.
999533
9995329976081851150000.
998973
998973011970521150000.
9994071
99940699338913
1

Query #3: Get the forced detections

Code Block
languagesql
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

0.55547145720003502196488E998145998145765097456400035949633503E85638E5692E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994071162600033984161849E998072998072749982464100034841629292E37593E50972E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994073533700025460488525E9993249993241026309700026287528175E09933E17848E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994074455700037089216762E99895899895809638368500037172440599E86901E97909E6399029892196204488648120493415072057957526802181921780414399950499972999533998973999407073590003240307634E999711973116630758460900033791319088E48615E49863E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994071341468915923541998108252520625200030059180449E999801989282589187455700033229518906E36515E61688E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994070663000523414368E99911899911887650647580005268774996E30874E7956E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994070.55547129480002697232236E9990899990892416146520002844410379E71303E50396E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994070996500034984472148E99891799874131018470600035388325995E14166E47287E63990298921962044886481204934150720579575268021819217804143999504999729995339989739994071798200030532353239E9997999777898418400031577618451E13619E48642E6399029892196204488648120493415072057957526802181921780414399950499972999533998973999407
ID_GAIAGAIARAGAIADECGmagperiod
objIDraMeandecMeandetectIDobstimeexptimeairmassFpsffluxFpsffluxErrFpsfQfFpsfQfPerfectFpsfChiSqzpFapFluxFapFluxErrforcedWarpIDfilterIDFskyFskyerrFinfoflagFinfoflag2Finfoflag3qualityFlaggMeanPSFMaggMeanPSFMagErrgMeanPSFMagNptrMeanPSFMagrMeanPSFMagErrrMeanPSFMagNptiMeanPSFMagiMeanPSFMagErriMeanPSFMagNptzMeanPSFMagzMeanPSFMagErrzMeanPSFMagNptyMeanPSFMagyMeanPSFMagErryMeanPSFMagNptrMeanKronMagrMeanKronMagErrnDetectionsngnrninznygFlagsgQfPerfectrFlagsrQfPerfectiFlagsiQfPerfectzFlagszQfPerfectyFlagsyQfPerfect
primaryDetectionbestDetection58463094835225646.3414689159231.5419981082525217.4408
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
1158463094835225646.3414689159231.5419981082525217.44080.55547
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.
1158463094835225646.3414689159231.5419981082525217.44080.55547
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.
11
99940699338913
58463094835225646.3414689159231.5419981082525217.44080.55547
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.
1158463094835225646.3414689159231.5419981082525217.44080.55547
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
584630948352256
109850463414820867
1
46.
341469861.
17.44080.5554710985046341482086746.341469861.541999062476119488676758810
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.
1158463094835225646.3414689159231.5419981082525217.44080.55547
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.
1158463094835225646.3414689159231.5419981082525217.4408
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.
11
99940699338913
58463094835225646.3414689159231.5419981082525217.44080.55547
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.
11
99940699338913
58463094835225646.3414689159231.5419981082525217.44080.55547
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
1

1


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:

...

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

Image Added

...

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.

Code Block
languagesql
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. 

Code Block
languagesql
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":

Image Added

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):

Image Added

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"):

Image Added

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:

Image Added

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:

Image Added

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:

Image Added

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.