Changes between Version 2 and Version 3 of BillsPSPSToIPP
- Timestamp:
- Sep 23, 2015, 8:11:34 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BillsPSPSToIPP
v2 v3 8 8 exp_id = frameID = Detection.imageID / 100 9 9 10 or using joins back to FrameMeta one can find frameID (exp_id) and frameName (exp_name)10 or using joins back to !FrameMeta one can find frameID (exp_id) and frameName (exp_name) 11 11 12 13 {{{ 12 14 exp_id = frameID [ select ImageMeta.frameID from Detection join ImageMeta on Detection.imageID = ImageMeta.imageID ] 13 15 … … 17 19 join FrameMeta on ImageMeta.frameID = FrameMeta.frameName ] 18 20 21 }}} 22 19 23 chip, camera, and warp IDS cannot be found directly in PSPS. Need to go to gpc1 database using the frameID 20 24 obtained above. … … 22 26 Using the gpc1 database 23 27 28 29 {{{ 24 30 select chip_id, cam_id, warp_id from relExp join ippRelease using(rel_id) 25 31 where exp_id = frameID and release_name = '3PI.PV3' 32 }}} 26 33 27 34 From a script these data can also be obtained with the command 28 35 releasetool -listrelexp -exp_id $frameID -release_name 3PI.PV3 29 36 30 SUGGESTION: I think we should add chip_id, warp_id, and cam_id toFrameMeta.37 '''SUGGESTION''': I think we should add chip_id, warp_id, and cam_id to !FrameMeta. 31 38 The first two are useful for postage stamps and cam_id would be useful 32 39 for tracking/debugging.) 33 40 34 Detection to corresponding row in CMF 35 ------------------------------------- 41 == Detection to corresponding row in CMF == 36 42 Find cam_id as above, then find the cmf from camProcessedExp. Then in the cmf 37 43 the detection is the one with 38 44 45 46 {{{ 39 47 [cmf].IPP_IDET = Detection.ippDetectID 48 49 }}} 40 50 41 51 Detection to corresponding row in DVO … … 46 56 Here is how the detection column values are set. 47 57 58 59 {{{ 48 60 objID = PSPS_OBJ_ID = [dvo ave file].EXT_ID (as defined by Jim Heasley's formula) 49 61 detectID = meas.EXT_ID (as defined by Jim Heasley's formula) … … 53 65 ippObjID = meas.CAT_ID << 32 + meas.OBJ_ID 54 66 67 68 }}} 55 69 So to find the catalog file 70 71 {{{ 56 72 cat_id = Detection.dvoRegionID 57 73 … … 59 75 OBJ_ID = ippObjID & 0xFFffFFff 60 76 77 }}} 78 61 79 The "directory" for the dvo catalog is SkyTable.fits. The file is then the entry with [Images.dat].INDEX = cat_id 62 80 Example if cat_id = 93255 then 63 81 82 83 {{{ 64 84 fileName = [SkyTable.fits[93255]].NAME = "s0000/5228.06" 85 86 }}} 65 87 66 88 And the various dvo files may be found from there. 67 89 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? == 69 91 70 92 This would require going to the ipp database with two commands 71 93 94 95 {{{ 72 96 releasetool -listrelexp -exp_id $frameID -release_name SAS.39 73 97 chiptool -processedimfile -chip_id $chip_id -class_id "XY$ccdnum' … … 75 99 (need to use sprintf for class_id value to make sure leading zero is 76 100 there for ccdnum < 10) 101 }}} 102 77 103 78 104 Then taking chip_imfile_id from the chiptool cmd results look in Images 79 105 table find the row with 80 106 107 108 {{{ 81 109 [Images.dat].EXTERN_ID == chip_imfile_id 110 111 }}} 82 112 83 113 and take the value of the column IMAGE_ID and use it to select … … 85 115 86 116 87 FullForce Measurement to exposure 88 --------------------------------- 89 This was discussed last week.117 == FullForce Measurement to exposure == 118 119 This was discussed on the psps working group mailing list. 90 120 There is a table which is the list of imageIDs that went into a ForcedWarpMeta (fullForceRun). 91 121 92 122 One can find the exposure for a given measurement using the forcedWarpID 93 123 124 125 {{{ 94 126 select DISTINCT ForcedWarpToImage.imageID/100 as frameID 95 127 FROM ForcedWarpMeasurement … … 97 129 ON ForcedWarpMeasurement.forcedWarpID = ForcedWarpToImage.forcedWarpID 98 130 99 SUGGESTION: Better to add frameID to ForcedWarpMeta (and for postage 131 }}} 132 133 '''SUGGESTION''': Better to add frameID to !ForcedWarpMeta (and for postage 100 134 stamps warp_id would be useful too, but if we add warp_id to FrameMeta 101 135 that wouldn't be required.) … … 108 142 109 143 110 Stack Tables 111 ------------ 144 == Stack Tables == 112 145 146 147 {{{ 113 148 StackObjectThin 114 149 … … 119 154 StackObjectAttributes 120 155 xiippDetectID = meas.DET_ID = [cmf].IPP_IDET 156 }}}
