IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links
wiki:ippToPsps_Detections

Version 51 (modified by watersc1, 15 years ago) ( diff )

--

Back to ippToPsps main page

Outline

The input for the detection batch is one IPP camera-stage smf file for a given exposure, as well as an associated DVO database from which to retrieve object, and other, IDs. One FITS file is generated for each exposure.

PSPS tables

1 Primary extension
1 FrameMeta extension
1 ImageMeta extension per chip
1 Detection extension per chip
1 SkinnyObject extension per chip
1 ObjectCalColor extension per chip

The full table definitions can be seen here

The 'object ID' is featured in the last three tables, and must remain unique across the exposure (it is generated within DVO). In the merged PSPS database, the primary key on the detections table is both the object ID and detection ID, meaning the the same object can appear in multiple, overlapping exposures as they will have different detection IDs.

Current IPP to PSPS mappings

The following table details the current mapping between IPP and PSPS. The source of smf files queued by ippToPsps is a list of cam_ids that are loaded into the relevant DVO database. These cam_ids are then used to obtain metadata from the IPP GPC1 database, as well as the location of the smf itself.

FrameMeta
ODM attribute units Data type Default Description IPP source IPP variable/notes
frameIDunknownINT0unique exposure/frame identifier. GPC1 database SELECT exp_id FROM camRun JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE camRun.cam_id = cam_id
frameNameunknownVARCHAR(32) frame name provided by camera software GPC1 database SELECT exp_name FROM camRun JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE camRun.cam_id = cam_id
surveyIDunknownTINYINT0survey flag identifier GPC1 database SELECT camRun.dist_group FROM camRun JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE camRun.cam_id = cam_id. The IPP dist_group is then used to get the surveyID from the PSPS 'Survey' table here
filterIDunknownTINYINT0filter identifier smf primary header Single character filter (grizy) is used to get PSPS ID from Filter table here
cameraIDunknownSMALLINT0camera identifier NA hardcoded to 1
cameraConfigIDunknownSMALLINT0camera configuration identifier NA hardcoded to 1
telescopeIDunknownSMALLINT0telescope identifier NA hardcoded to 1
analysisVerunknownVARCHAR(MAX) IPP software analysis release NA empty CZW: available in database as software_ver/header as PHOT_V
p1RecipunknownVARCHAR(MAX) IPP phase 1 MD5 ChecksumNA empty
p2RecipunknownVARCHAR(MAX) IPP phase 2 MD5 Checksum NA empty
p3RecipunknownVARCHAR(MAX) IPP phase 3 MD5 Checksum NA empty
nOTAunknownSMALLINT-999number of valid OTA/CCD images in this exposure smf file count of psf extensions successfully read from the smf file
photoScatmagREAL-999 global photometric scatter smf primary header ZPT_ERR
numPhotoRefunknownINT-999number of photometric reference sources smf XYnn.hdr extensions sum of NASTRO over all OTAs
expStartdayFLOAT-999 exposure start time in MJDsmf primary header MJD-OBS
expTimesREAL-999 exposure time smf primary header EXPREQ
airmassunknownREAL-999airmass at mid-exposuresmf primary header AIRMASS
raBoredegFLOAT-999 RA of telescope boresight smf primary header RA
decBoredegFLOAT-999 DEC of telescope boresight smf primary header DEC
ctype1unknownVARCHAR(MAX) name of astrometric projection in RAsmf primary header CTYPE1
ctype2unknownVARCHAR(MAX) name of astrometric projection in DECsmf primary header CTYPE2
crval1degFLOAT-999 RA corresponding to reference pixelsmf primary header CRVAL1
crval2degFLOAT-999 DEC corresponding to reference pixelsmf primary header CRVAL2
crpix1unknownFLOAT-999reference pixel value for RA smf primary headerCRPIX1
crpix2unknownFLOAT-999reference pixel value for DEC smf primary header CRPIX2
cdelt1unknownFLOAT-999scale factor for RAsmf primary header CDELT1
cdelt2unknownFLOAT-999scale factor for DECsmf primary header CDELT2
pc001001unknownFLOAT-999elements of rotation/Dcale matrix smf primary header PC001001
pc001002unknownFLOAT-999elements of rotation/Dcale matrix smf primary header PC001002
pc002001unknownFLOAT-999elements of rotation/Dcale matrix smf primary headerPC002001
pc002002unknownFLOAT-999elements of rotation/Dcale matrixsmf primary header PC002002
polyOrderunknownTINYINT255polynomial order of astrometry fitsmf primary header NPLYTERM
pca1x3y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA1X3Y0
pca1x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary header PCA1X2Y1
pca1x1y2unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA1X1Y2
pca1x0y3unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary headerPCA1X0Y3
pca1x2y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA1X2Y0
pca1x1y1unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA1X1Y1
pca1x0y2unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA1X0Y2
pca2x3y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA2X3Y0
pca2x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary header PCA2X2Y1
pca2x1y2unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary headerPCA2X1Y2
pca2x0y3unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary headerPCA2X0Y3
pca2x2y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf primary header PCA2X2Y0
pca2x1y1unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary header PCA2X1Y1
pca2x0y2unknownFLOAT-999polynomial coefficients for the astrometric fit smf primary headerPCA2X0Y2
calibModNumunknownSMALLINT0calibration modification numberNA hardcoded to 1
dataReleaseunknownTINYINT0Data release NA hardcoded to 1
ImageMeta
ODM attribute units Data type Default Description IPP source IPP variable/notes
imageIDunknownBIGINT0unique ID for each image, hashed from frameID and ccdID (ALEX) GPC1 and smf extension name frameID (below) mashed together with OTA number
frameIDunknownINT0frame identifier, also known as exposure number GPC1 database SELECT exp_id FROM camRun JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE camRun.cam_id = cam_id
ccdIDunknownSMALLINT0ccd cell identifier in the focal plane smf OTA number
photoCalIDunknownINT0photometry reduction code identifier DVO image->photcode from DVO Image structure
filterIDunknownTINYINT0filter ID smf primary header same as for FrameMeta (see above)
biasADUREAL-999 detector bias level empty CZW: probably best to use gpc1.rawExp.bg
biasScatADUREAL-999 scatter in bias level empty CZW: probably best to use gpc1.rawExp.bg_stdev
skyADUREAL-999 mean sky level smf XYnn.hdr extension MSKY_MN
skyScatADUREAL-999 scatter in mean sky level smf XYnn.hdr extension MSKY_SIG
nDetectunknownINT-999number of detections on CCD smf XYnn.psf extension count of detections retrieved from the psf extension
magSatmagREAL-999 saturation magnitude level smf XYnn.hdr extension FSATUR
completMagmagREAL-999 95% completion level in mag smf XYnn.hdr extension FLIMIT
astroScatmagREAL-999 astrometric scatter for chipsmf XYnn.hdr extension CERROR
photoScatunknownREAL-999photometric scatter for chip smf primary header ZPT_OBS
numAstroRefunknownINT-999number of astrometric reference sourcessmf XYnn.hdr extension NASTRO
numPhotoRefunknownINT-999number of photometric reference sourcessmf XYnn.hdr extension NASTRO
nxunknownSMALLINT-999chip dimension in xsmf XYnn.hdr extension CNAXIS1
nyunknownSMALLINT-999chip dimension in ysmf XYnn.hdr extension CNAXIS2
psfModelIDunknownINT-999PSF model identifier NA empty CZW: PS_MODEL_PS1_V1
psfFwhmarcsecREAL-999 model psf full width at half maximum at chip center smf XYnn.hdr extension (FWHM_MAJ + FWHM_MIN) / 2.0
psfWidMajorarcsecREAL-999 model PSF parameters at chip centersmf XYnn.hdr extension FWHM_MAJ
psfWidMinorarcsecREAL-999 model PSF parameters at chip center smf XYnn.hdr extension FWHM_MIN
psfThetadegREAL-999 model PSF parameters at chip center smf XYnn.hdr extension ANGLE
momentFwhmarcsecREAL-999 average PSF full width at half maximum from moments smf XYnn.hdr extension (IQ_FW1 + IQ_FW2) / 2.0
momentWidMajorarcsecREAL-999 average PSF parameters from moments smf XYnn.hdr extensionIQ_FW1
momentWidMinorarcsecREAL-999 average PSF parameters from moments smf XYnn.hdr extension IQ_FW2
apResidunknownREAL-999corrected aperture residualsmf XYnn.hdr extension APMIFIT
dapResidunknownREAL-999scatter of aperture correctionssmf XYnn.hdr extension DAPMIFIT
detectorIDunknownVARCHAR(32) identifier for actual CCD chipsmf XYnn.hdr extension DETECTOR
qaFlagsunknownBIGINT-999Q/A flags for this OTA DVO image->flags from DVO Image structure
detrend1unknownVARCHAR(MAX) identifier of detrend image 1 smf XYnn.hdr extension DETREND.MASK
detrend2unknownVARCHAR(MAX) identifier of detrend image 2smf XYnn.hdr extension DETREND.DARK
detrend3unknownVARCHAR(MAX) identifier of detrend image 3smf XYnn.hdr extensionDETREND.FLAT
detrend4unknownVARCHAR(MAX) identifier of detrend image 4 NA empty CZW: can we add DETREND.FRINGE
detrend5unknownVARCHAR(MAX) identifier of detrend image 5 NAempty CZW: can we add DETREND.LINEARITY
detrend6unknownVARCHAR(MAX) identifier of detrend image 6 NAempty
detrend7unknownVARCHAR(MAX) identifier of detrend image 7 NA empty
detrend8unknownVARCHAR(MAX) identifier of detrend image 8 NAempty
photoZeromagREAL-999 local derived photometric zero point smf primary header ZPT_OBS
ctype1unknownVARCHAR(MAX) name of astrometric projection in RA smf XYnn.hdr extension CTYPE1
ctype2unknownVARCHAR(MAX) name of astrometric projection in DEC smf XYnn.hdr extensionCTYPE2
crval1degFLOAT-999 RA corresponding to reference pixelsmf XYnn.hdr extension CRVAL1
crval2degFLOAT-999 DEC corresponding to reference pixelsmf XYnn.hdr extension CRVAL2
crpix1pixFLOAT-999 reference pixel value for RAsmf XYnn.hdr extension CRPIX1
crpix2pixFLOAT-999 reference pixel value for DECsmf XYnn.hdr extension CRPIX2
cdelt1unknownFLOAT-999scale factor for RAsmf XYnn.hdr extension CDELT1
cdelt2unknownFLOAT-999scale factor for DECsmf XYnn.hdr extension CDELT2
pc001001unknownFLOAT-999elements of rotation/Dcale matrixsmf XYnn.hdr extension PC001001
pc001002unknownFLOAT-999elements of rotation/Dcale matrixsmf XYnn.hdr extension PC001002
pc002001unknownFLOAT-999elements of rotation/Dcale matrixsmf XYnn.hdr extension PC002001
pc002002unknownFLOAT-999elements of rotation/Dcale matrix smf XYnn.hdr extension PC002002
polyOrderunknownTINYINT255polynomial order of astrometry fitsmf XYnn.hdr extension NPLYTERM
pca1x3y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA1X3Y0
pca1x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit smf XYnn.hdr extensionPCA1X2Y1
pca1x1y2unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA1X1Y2
pca1x0y3unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA1X0Y3
pca1x2y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA1X2Y0
pca1x1y1unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA1X1Y1
pca1x0y2unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA1X0Y2
pca2x3y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA2X3Y0
pca2x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit smf XYnn.hdr extensionPCA2X2Y1
pca2x1y2unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA2X1Y2
pca2x0y3unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA2X0Y3
pca2x2y0unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA2X2Y0
pca2x1y1unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA2X1Y1
pca2x0y2unknownFLOAT-999polynomial coefficients for the astrometric fitsmf XYnn.hdr extension PCA2X0Y2
calibModNumunknownSMALLINT0calibration modification number NA hardcoded to 1
dataReleaseunknownTINYINT0Data release NA hardcoded to 1
Detection
ODM attribute units Data type Default Description IPP source IPP variable/notes
objIDunknownBIGINT0ODM object identifier DVO ave.extID from dvoDetection structure
detectIDunknownBIGINT0ODM detection identifier DVO meas.extID from dvoDetection structure
ippObjIDunknownBIGINT0object id generated by IPP DVO ave.catID*1000000000 + ave.objID from dvoDetection structure
ippDetectIDunknownBIGINT0detection id generated by IPP smf XYnn.psf extension IPP_IDET
filterIDunknownTINYINT0filter ID: g=1, r=2, i=3, z=4, y=5, w=6, ... smf primary header same as for FrameMeta (see above)
surveyIDunknownTINYINT0survey flag identifier GPC1 same as for FrameMeta (see above)
imageIDunknownBIGINT0image id hash of frame identifier & OTA/CCD number GPC1 and smf extension name same as for ImageMeta (see above)
obsTimedayFLOAT-999 Time of mid observation smf primary header (MJD-OBS + EXPTIME) / 172800.0
xPospixREAL-999 measured x on CCD from PSF fitsmf XYnn.psf extension X_PSF
yPospixREAL-999 measured y on CCD from PSF fitsmf XYnn.psf extension Y_PSF
xPosErrpixREAL-999 estimated error in xsmf XYnn.psf extension X_PSF_SIG
yPosErrpixREAL-999 estimated error in y smf XYnn.psf extension Y_PSF_SIG
instFluxadu/sREAL-999 PSF instrumental flux smf primary header (EXPTIME) and XYnn.psf extension POW(10.0, (-0.4*PSF_INST_MAG)) / EXPTIME
instFluxErradu/sREAL-999 estimated error in flux smf primary header (EXPTIME) and XYnn.psf extension ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / EXPTIME)) / 1.085736)
peakADUaduREAL-999 peak count in source pixel smf primary header (EXPTIME) and XYnn.psf extension POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / EXPTIME
psfWidMajorarcsecREAL-999 model PSF width in major axissmf XYnn.psf extension PSF_MAJOR
psfWidMinorarcsecREAL-999 model PSF width in minor axissmf XYnn.psf extension PSF_MINOR
psfThetadegREAL-999 model PSF orientation angle smf XYnn.psf extensionPSF_THETA
psfLikelihoodunknownREAL-999PSF likelihoodsmf XYnn.psf extension erfc(abs(EXT_NSIGMA) / sqrt(2))
psfCfunknownREAL-999PSF coverage factorsmf XYnn.psf extension PSF_QF
momentXXarcsecREAL-999 moment XXsmf XYnn.psf extension MOMENTS_XX
momentXYarcsecREAL-999 moment XYsmf XYnn.psf extension MOMENTS_XY
momentYYarcsecREAL-999 momeny YY smf XYnn.psf extensionMOMENTS_YY
apMagmagnitudeREAL-999 Aperture magnitudesmf XYnn.psf extension AP_MAG
apMagErrmagnitudeREAL-999 Aperture magnitude error NA empty
kronFluxmagnitudeREAL-999 Kron flux NA empty CZW: SMF/XY.psf/KRON_FLUX
kronFluxErrmagnitudeREAL-999 Kron flux error NA empty CZW: SMF/XY.psf/KRON_FLUX_ERR
kronRadarcsecsREAL-999 Kron radius NA empty
kronRadErrarcsecsREAL-999 Kron radius error NA empty
crLikelihoodunknownREAL-999Likelihood the source is a cosmic ray smf XYnn.psf extension (EXT_NSIGMA > 0) ? 0 : 1 - psfLikelihood
extendedLikelihoodunknownREAL-999Likelihood the source is extended smf XYnn.psf extension (EXT_NSIGMA > 0) ? 1 - psfLikelihood : 0
infoFlagunknownBIGINT-999flag indicating provenance informationsmf XYnn.psf extension and DVO dvoDetection.meas.dbFlags << 32 | FLAGS
skyaduREAL-999 PSF sky level at source smf XYnn.psf extension SKY
skyErraduREAL-999 estimated error in sky smf XYnn.psf extension SKY_SIGMA
sgSepunknownREAL-999star/galaxy separator smf XYnn.psf extension EXT_NSIGMA
activeFlagunknownTINYINT-999indicates whether this detection/orphan is still a detection/orphan NA hardcoded to 0
assocDateunknownDATE28881231date object association assigned NA date that batch has been prepared
historyModNumunknownSMALLINT0modification number in the O-D association history NA hardcoded to 0
dataReleaseunknownTINYINT0Data release when this detection was originally taken. Recalibrations do not affect this value. NA hardcoded to 0
SkinnyObject
ODM attribute units Data type Default Description IPP source IPP variable/notes
objIDunknownBIGINT0ODM object identifier index DVO same as Detection table - see above
ippObjIDunknownBIGINT0IPP object number DVO same as Detection table - see above
projectionCellIDunknownINT-999projection cell identifier at discovery time NA empty CZW: the skycell_id contains this
dataReleaseunknownTINYINT0Data release to propagate to the object NA hardcoded to 0
surveyIDunknownTINYINT255surveyID GPC1 same as for FrameMeta (see above)
ObjectCalColor
ODM attribute units Data type Default Description IPP source IPP variable/notes
objIDunknownBIGINT0ODM object identifier DVO same as Detection table - see above
ippObjIDunknownBIGINT0ipp object identifier DVO same as Detection table - see above
filterIDunknownTINYINT0filter identifier smf primary header same as for FrameMeta (see above)
calColormagREAL0 color adopted for magnitude calculation NA empty
calColorErrmagREAL0 error in calibrating color NA empty
calibModNumunknownSMALLINT0calibration modification number NA hardcoded to 1
dataReleaseunknownTINYINT0Data release when this color calibration was established NA hardcoded to 0

Running

To create and publish detection batches, do the following from the IPP trunk:

cd ippToPsps/perl
./makeDetections.pl

This will list all options. Essentials are the following:

* REQUIRED: need to provide an output path  -o <path>
* REQUIRED: need to provide a DVO Db        -d <dvoDb>
* REQUIRED: need to provide a DVO location  -l <dvoLocation>

Running with just these arguments will create batches for all unprocessed exposures available in the provided DVO database. It will store the batches in the provided output directory. To publish the batches to the datastore, the -p argument (datastore product) must be provided.

The script connects with the ippToPsps database, so is aware of what has and has not already been processed and published. Only using the -f option can you force it to re-process a batch. Note that publishing the same exposure under two different batch names will cause havoc for the ODM, so be careful with the -f option.

Example usage would be:

./makeDetections.pl -o . -d ThreePi.V1 -l /data/ipp004.0/gpc1/catdirs/ThreePi.V1 -p PSPS_test

This will work through all available exposures in the DVO database 'ThreePi.V1' at the location specified, and publishing to the 'PSPS_test' datastore product, updating the ippToPsps database as it proceeds. Querying this database allows you to see what has been processed, the failure rate, what has been published to the datastore etc.

Note: See TracWiki for help on using the wiki.