- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (2 props)
-
psphot/src/psphotStackImageLoop.c (modified) (5 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psphot
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psphot/src
- Property svn:ignore
-
old new 22 22 psphotMakePSF 23 23 psphotStack 24 psphotModelTest
-
- Property svn:mergeinfo set to
- Property svn:ignore
-
branches/meh_branches/ppstack_test/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo set to
r31154 r33415 10 10 bool UpdateHeadersForFPA (pmConfig *config, pmFPAview *view); 11 11 bool UpdateHeadersForChip (pmConfig *config, pmFPAview *view); 12 bool UpdateHeadersForReadout (pmConfig *config, pmFPAview *view); 12 13 13 14 bool psphotStackImageLoop (pmConfig *config) { … … 52 53 psMemDump("load"); 53 54 54 // PSF matching55 // Generate the 1st PSF-matched image set (larger target PSFs are generated by smoothing this image) 55 56 if (!psphotStackMatchPSFs (config, view)) { 56 57 psError(psErrorCodeLast(), false, "failure in psphotStackMatchPSFs for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); … … 66 67 return false; 67 68 } 69 70 UpdateHeadersForReadout(config, view); 71 68 72 psMemDump("psphot"); 69 73 } … … 101 105 } 102 106 107 bool UpdateHeadersForReadout (pmConfig *config, pmFPAview *view) { 108 109 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE); 110 bool useRaw = psMetadataLookupBool (NULL, recipe, "PSPHOT.STACK.USE.RAW"); 111 112 int num = psphotFileruleCount(config, "PSPHOT.INPUT"); 113 114 // loop over the available readouts 115 for (int i = 0; i < num; i++) { 116 117 // find the currently selected readout 118 pmFPAfile *output = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.OUTPUT.IMAGE", i); // File of interest 119 psAssert (output, "missing file?"); 120 121 pmFPAfile *inputRaw = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.INPUT.RAW", i); // File of interest 122 pmFPAfile *inputCnv = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.INPUT.CNV", i); // File of interest 123 pmFPAfile *input = useRaw ? inputRaw : inputCnv; 124 psAssert (input, "missing input file"); 125 126 // just copy the input headers to the output headers, then update version info 127 pmReadout *inReadout = pmFPAviewThisReadout(view, input->fpa); ///< Chip in the input 128 pmReadout *outReadout = pmFPAviewThisReadout(view, output->fpa); ///< Chip in the output 129 130 psMetadata *header = psMetadataLookupPtr (NULL, inReadout->analysis, "PSPHOT.HEADER"); 131 psMetadataAdd (outReadout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER", PS_DATA_METADATA, "header stats", header); 132 } 133 return true; 134 } 135 103 136 bool UpdateHeadersForChip (pmConfig *config, pmFPAview *view) { 104 137 … … 131 164 outHDU->header = psMetadataCopy(NULL, inHDU->header); 132 165 } 166 psphotVersionHeaderFull(outHDU->header); 133 167 outChip->toFPA = psMemIncrRefCounter(inChip->toFPA); 134 168 outChip->fromFPA = psMemIncrRefCounter(inChip->fromFPA);
Note:
See TracChangeset
for help on using the changeset viewer.
