Page History
...
SELECT d.ID_GAIA,d.RA_GAIA as GAIARA, d.DEC_GAIA as GAIADec, d.Gmag, d.period, CROSS APPLY dbo.fGetNearbyObjEq(d.RA_GAIA, d.DEC_GAIA, 1.0/3600.0) as x JOIN MeanObjectView o on o.ObjID=x.ObjId LEFT JOIN StackObjectAttributes AS soa ON soa.objID = x.objID WHERE o.nDetections>8 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
Query #2: Get the detections
SELECT o.ID_GAIA,o.GAIARA, o.GAIADec, o.Gmag, o.period, 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.[RRL_584630948352256_PS1det] FROM mydb.[RRL_584630948352256_PS1] o JOIN Detection d on d.ObjID = o.ObjID |
Results
Query #3: Get the forced detections
SELECT o.ID_GAIA,o.GAIARA, o.GAIADec, o.Gmag, o.period, o.objID, o.raMean, o.decMean, FROM mydb.[RRL_584630948352256_PS1] o JOIN ForcedWarpMeasurement fwm on fwm.ObjID = o.ObjID |