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

Version 44 (modified by rhenders, 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
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
biasScatADUREAL-999 scatter in bias level empty
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
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
detrend5unknownVARCHAR(MAX) identifier of detrend image 5 NAempty
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
detectIDunknownBIGINT0ODM detection identifier
ippObjIDunknownBIGINT0object id generated by IPP
ippDetectIDunknownBIGINT0detection id generated by IPP
filterIDunknownTINYINT0filter ID: g=1, r=2, i=3, z=4, y=5, w=6, ...
surveyIDunknownTINYINT0survey flag identifier
imageIDunknownBIGINT0image id hash of frame identifier & OTA/CCD number
obsTimedayFLOAT-999 Time of mid observation
xPospixREAL-999 measured x on CCD from PSF fit
yPospixREAL-999 measured y on CCD from PSF fit
xPosErrpixREAL-999 estimated error in x
yPosErrpixREAL-999 estimated error in y
instFluxadu/sREAL-999 PSF instrumental flux
instFluxErradu/sREAL-999 estimated error in flux
peakADUaduREAL-999 peak count in source pixel
psfWidMajorarcsecREAL-999 model PSF width in major axis
psfWidMinorarcsecREAL-999 model PSF width in minor axis
psfThetadegREAL-999 model PSF orientation angle
psfLikelihoodunknownREAL-999PSF likelihood
psfCfunknownREAL-999PSF coverage factor
momentXXarcsecREAL-999 moment XX
momentXYarcsecREAL-999 moment XY
momentYYarcsecREAL-999 momeny YY
apMagmagnitudeREAL-999 Aperture magnitude
apMagErrmagnitudeREAL-999 Aperture magnitude error
kronFluxmagnitudeREAL-999 Kron flux
kronFluxErrmagnitudeREAL-999 Kron flux error
kronRadarcsecsREAL-999 Kron radius
kronRadErrarcsecsREAL-999 Kron radius error
crLikelihoodunknownREAL-999Likelihood the source is a cosmic ray
extendedLikelihoodunknownREAL-999Likelihood the source is extended
infoFlagunknownBIGINT-999flag indicating provenance information
skyaduREAL-999 PSF sky level at source
skyErraduREAL-999 estimated error in sky
sgSepunknownREAL-999star/galaxy separator
activeFlagunknownTINYINT-999indicates whether this detection/orphan is still a detection/orphan
assocDateunknownDATE28881231date object association assigned
historyModNumunknownSMALLINT0modification number in the O-D association history
dataReleaseunknownTINYINT0Data release when this detection was originally taken. Recalibrations do not affect this value.
SkinnyObject
ODM attribute units Data type Default Description IPP source IPP variable/notes
objIDunknownBIGINT0ODM object identifier index
ippObjIDunknownBIGINT0IPP object number
projectionCellIDunknownINT-999projection cell identifier at discovery time
dataReleaseunknownTINYINT0Data release to propagate to the object
surveyIDunknownTINYINT255surveyID </coluumn>
ObjectCalColor
ODM attribute units Data type Default Description IPP source IPP variable/notes
objIDunknownBIGINT0ODM object identifier
ippObjIDunknownBIGINT0ipp object identifier
filterIDunknownTINYINT0filter identifier
calColormagREAL0 color adopted for magnitude calculation
calColorErrmagREAL0 error in calibrating color
calibModNumunknownSMALLINT0calibration modification number
dataReleaseunknownTINYINT0Data release when this color calibration was established

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.