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

Version 36 (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, exp_name, camRun.dist_group 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
surveyIDunknownTINYINT0survey flag identifier
filterIDunknownTINYINT0filter identifier
cameraIDunknownSMALLINT0camera identifier
cameraConfigIDunknownSMALLINT0camera configuration identifier
telescopeIDunknownSMALLINT0telescope identifier
analysisVerunknownVARCHAR(MAX) IPP software analysis release
p1RecipunknownVARCHAR(MAX) IPP phase 1 MD5 Checksum
p2RecipunknownVARCHAR(MAX) IPP phase 2 MD5 Checksum
p3RecipunknownVARCHAR(MAX) IPP phase 3 MD5 Checksum
nOTAunknownSMALLINT-999number of valid OTA/CCD images in this exposure
photoScatmagREAL-999 global photometric scatter
numPhotoRefunknownINT-999number of photometric reference sources
expStartdayFLOAT-999 exposure start time in MJD
expTimesREAL-999 exposure time
airmassunknownREAL-999airmass at mid-exposure
raBoredegFLOAT-999 RA of telescope boresight
decBoredegFLOAT-999 DEC of telescope boresight
ctype1unknownVARCHAR(MAX) name of astrometric projection in RA
ctype2unknownVARCHAR(MAX) name of astrometric projection in DEC
crval1degFLOAT-999 RA corresponding to reference pixel
crval2degFLOAT-999 DEC corresponding to reference pixel
crpix1unknownFLOAT-999reference pixel value for RA
crpix2unknownFLOAT-999reference pixel value for DEC
cdelt1unknownFLOAT-999scale factor for RA
cdelt2unknownFLOAT-999scale factor for DEC
pc001001unknownFLOAT-999elements of rotation/Dcale matrix
pc001002unknownFLOAT-999elements of rotation/Dcale matrix
pc002001unknownFLOAT-999elements of rotation/Dcale matrix
pc002002unknownFLOAT-999elements of rotation/Dcale matrix
polyOrderunknownTINYINT255polynomial order of astrometry fit
pca1x3y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x1y2unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x0y3unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x2y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x1y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x0y2unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x3y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x1y2unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x0y3unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x2y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x1y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x0y2unknownFLOAT-999polynomial coefficients for the astrometric fit
calibModNumunknownSMALLINT0calibration modification number
dataReleaseunknownTINYINT0Data release
ImageMeta
ODM attribute units Data type Default Description IPP source IPP variable/notes
imageIDunknownBIGINT0unique ID for each image, hashed from frameID and ccdID (ALEX)
frameIDunknownINT0frame identifier, also known as exposure number
ccdIDunknownSMALLINT0ccd cell identifier in the focal plane
photoCalIDunknownINT0photometry reduction code identifier
filterIDunknownTINYINT0filter ID
biasADUREAL-999 detector bias level
biasScatADUREAL-999 scatter in bias level
skyADUREAL-999 mean sky level
skyScatADUREAL-999 scatter in mean sky level
nDetectunknownINT-999number of detections on CCD
magSatmagREAL-999 saturation magnitude level
completMagmagREAL-999 95% completion level in mag
astroScatmagREAL-999 astrometric scatter for chip
photoScatunknownREAL-999photometric scatter for chip
numAstroRefunknownINT-999number of astrometric reference sources
numPhotoRefunknownINT-999number of photometric reference sources
nxunknownSMALLINT-999chip dimension in x
nyunknownSMALLINT-999chip dimension in y
psfModelIDunknownINT-999PSF model identifier
psfFwhmarcsecREAL-999 model psf full width at half maximum at chip center
psfWidMajorarcsecREAL-999 model PSF parameters at chip center
psfWidMinorarcsecREAL-999 model PSF parameters at chip center
psfThetadegREAL-999 model PSF parameters at chip center
momentFwhmarcsecREAL-999 average PSF full width at half maximum from moments
momentWidMajorarcsecREAL-999 average PSF parameters from moments
momentWidMinorarcsecREAL-999 average PSF parameters from moments
apResidunknownREAL-999corrected aperture residual
dapResidunknownREAL-999scatter of aperture corrections
detectorIDunknownVARCHAR(32) identifier for actual CCD chip
qaFlagsunknownBIGINT-999Q/A flags for this OTA
detrend1unknownVARCHAR(MAX) identifier of detrend image 1
detrend2unknownVARCHAR(MAX) identifier of detrend image 2
detrend3unknownVARCHAR(MAX) identifier of detrend image 3
detrend4unknownVARCHAR(MAX) identifier of detrend image 4
detrend5unknownVARCHAR(MAX) identifier of detrend image 5
detrend6unknownVARCHAR(MAX) identifier of detrend image 6
detrend7unknownVARCHAR(MAX) identifier of detrend image 7
detrend8unknownVARCHAR(MAX) identifier of detrend image 8
photoZeromagREAL-999 local derived photometric zero point
ctype1unknownVARCHAR(MAX) name of astrometric projection in RA
ctype2unknownVARCHAR(MAX) name of astrometric projection in DEC
crval1degFLOAT-999 RA corresponding to reference pixel
crval2degFLOAT-999 DEC corresponding to reference pixel
crpix1pixFLOAT-999 reference pixel value for RA
crpix2pixFLOAT-999 reference pixel value for DEC
cdelt1unknownFLOAT-999scale factor for RA
cdelt2unknownFLOAT-999scale factor for DEC
pc001001unknownFLOAT-999elements of rotation/Dcale matrix
pc001002unknownFLOAT-999elements of rotation/Dcale matrix
pc002001unknownFLOAT-999elements of rotation/Dcale matrix
pc002002unknownFLOAT-999elements of rotation/Dcale matrix
polyOrderunknownTINYINT255polynomial order of astrometry fit
pca1x3y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x1y2unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x0y3unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x2y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x1y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca1x0y2unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x3y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x2y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x1y2unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x0y3unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x2y0unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x1y1unknownFLOAT-999polynomial coefficients for the astrometric fit
pca2x0y2unknownFLOAT-999polynomial coefficients for the astrometric fit
calibModNumunknownSMALLINT0calibration modification number
dataReleaseunknownTINYINT0Data release
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.