IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 2 and Version 3 of BillsPSPSToIPP


Ignore:
Timestamp:
Sep 23, 2015, 8:11:34 AM (11 years ago)
Author:
bills
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BillsPSPSToIPP

    v2 v3  
    88    exp_id = frameID = Detection.imageID / 100
    99
    10 or using joins back to FrameMeta one can find frameID (exp_id) and frameName (exp_name)
     10or using joins back to !FrameMeta one can find frameID (exp_id) and frameName (exp_name)
    1111
     12
     13{{{
    1214    exp_id = frameID [ select ImageMeta.frameID from Detection join ImageMeta on Detection.imageID = ImageMeta.imageID ]
    1315
     
    1719                join FrameMeta on ImageMeta.frameID = FrameMeta.frameName ]
    1820
     21}}}
     22
    1923chip, camera, and warp IDS cannot be found directly in PSPS. Need to go to gpc1 database using the frameID
    2024obtained above.
     
    2226Using the  gpc1 database
    2327
     28
     29{{{
    2430    select chip_id, cam_id, warp_id from relExp join ippRelease using(rel_id)
    2531        where exp_id = frameID and release_name = '3PI.PV3'
     32}}}
    2633
    2734From a script these data can also be obtained with the command
    2835    releasetool -listrelexp -exp_id $frameID -release_name 3PI.PV3
    2936
    30 SUGGESTION: I think we should add chip_id, warp_id, and cam_id to FrameMeta.
     37'''SUGGESTION''': I think we should add chip_id, warp_id, and cam_id to !FrameMeta.
    3138The first two are useful for postage stamps and cam_id would be useful
    3239for tracking/debugging.)
    3340
    34 Detection to corresponding row in CMF
    35 -------------------------------------
     41== Detection to corresponding row in CMF ==
    3642Find cam_id as above, then find the cmf from camProcessedExp. Then in the cmf
    3743the detection is the one with
    3844
     45
     46{{{
    3947    [cmf].IPP_IDET = Detection.ippDetectID
     48
     49}}}
    4050
    4151Detection to corresponding row in DVO
     
    4656Here is how the detection column values are set.
    4757
     58
     59{{{
    4860objID           = PSPS_OBJ_ID = [dvo ave file].EXT_ID (as defined by Jim Heasley's formula)
    4961detectID        = meas.EXT_ID (as defined by Jim Heasley's formula)
     
    5365ippObjID        = meas.CAT_ID << 32 + meas.OBJ_ID
    5466
     67
     68}}}
    5569So to find the catalog file
     70
     71{{{
    5672    cat_id = Detection.dvoRegionID
    5773
     
    5975    OBJ_ID = ippObjID & 0xFFffFFff
    6076
     77}}}
     78
    6179The "directory" for the dvo catalog is SkyTable.fits. The file is then the entry with [Images.dat].INDEX = cat_id
    6280Example if cat_id = 93255 then
    6381
     82
     83{{{
    6484    fileName = [SkyTable.fits[93255]].NAME = "s0000/5228.06"
     85
     86}}}
    6587
    6688And the various dvo files may be found from there.
    6789
    68 ISSUE: How can we get at just the detections from the specific image?
     90== How can we get at just the detections for the specific image? ==
    6991
    7092This would require going to the ipp database with two commands
    7193
     94
     95{{{
    7296    releasetool -listrelexp -exp_id $frameID -release_name SAS.39
    7397    chiptool -processedimfile -chip_id $chip_id -class_id "XY$ccdnum'
     
    7599(need to use sprintf for class_id value to make sure leading zero is
    76100there for ccdnum < 10)
     101}}}
     102
    77103
    78104Then taking chip_imfile_id from the chiptool cmd results look in Images
    79105table find the row with
    80106
     107
     108{{{
    81109    [Images.dat].EXTERN_ID == chip_imfile_id
     110
     111}}}
    82112
    83113and take the value of the column IMAGE_ID and use it to select
     
    85115
    86116
    87 FullForce Measurement to exposure
    88 ---------------------------------
    89 This was discussed last week.
     117== FullForce Measurement to exposure ==
     118
     119This was discussed on the psps working group mailing list.
    90120There is a table which is the list of imageIDs that went into a ForcedWarpMeta (fullForceRun).
    91121
    92122One can find the exposure for a given measurement using the forcedWarpID
    93123
     124
     125{{{
    94126    select DISTINCT ForcedWarpToImage.imageID/100 as frameID
    95127        FROM ForcedWarpMeasurement
     
    97129        ON ForcedWarpMeasurement.forcedWarpID = ForcedWarpToImage.forcedWarpID
    98130
    99 SUGGESTION: Better to add frameID to ForcedWarpMeta (and for postage
     131}}}
     132
     133'''SUGGESTION''': Better to add frameID to !ForcedWarpMeta (and for postage
    100134stamps warp_id would be useful too, but if we add warp_id to FrameMeta
    101135that wouldn't be required.)
     
    108142
    109143
    110 Stack Tables
    111 ------------
     144== Stack Tables ==
    112145
     146
     147{{{
    113148StackObjectThin
    114149
     
    119154StackObjectAttributes
    120155xiippDetectID   = meas.DET_ID = [cmf].IPP_IDET
     156}}}