Changeset 35539
- Timestamp:
- May 9, 2013, 10:00:41 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419/pswarp/src
- Files:
-
- 5 edited
-
pswarpCleanup.c (modified) (1 diff)
-
pswarpDefineLayout.c (modified) (2 diffs)
-
pswarpLoopBackground.c (modified) (1 diff)
-
pswarpOptions.c (modified) (1 diff)
-
pswarpParseCamera.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pswarp/src/pswarpCleanup.c
r35536 r35539 19 19 "PSWARP.OUTPUT.BKGMODEL", 20 20 "PSWARP.OUTPUT.SOURCES", 21 "PSPHOT.INPUT",22 21 "PSPHOT.OUTPUT", 23 22 "PSPHOT.RESID", -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpDefineLayout.c
r35535 r35539 95 95 bool bilevelAstrometry = psMetadataLookupBool (NULL, skycell->fpa->analysis, "ASTROMETRY.BILEVEL"); 96 96 97 // generate the output hdu and contents bits98 pmFPAAddSourceFromFormat(output->fpa, output->format);99 100 97 // XXX this is a bit muddled : we are setting up the astrometry elements for the output 101 98 // background model here instead of in pswarpLoadAstrometry, where it would be more natural … … 106 103 107 104 // if we have an output background model, generate hdu, etc and supply astrometry 108 if (bkgModel) { 109 pmFPAAddSourceFromFormat(bkgModel->fpa, bkgModel->format); 110 111 if (bilevelAstrometry) { 112 // top-level elements of the bkgModel astrometry 113 bkgModel->fpa->toTPA = psMemIncrRefCounter (skycell->fpa->toTPA); 114 bkgModel->fpa->fromTPA = psMemIncrRefCounter (skycell->fpa->fromTPA); 115 bkgModel->fpa->toSky = psMemIncrRefCounter (skycell->fpa->toSky); 116 } 105 if (bkgModel && bilevelAstrometry) { 106 // top-level elements of the bkgModel astrometry 107 bkgModel->fpa->toTPA = psMemIncrRefCounter (skycell->fpa->toTPA); 108 bkgModel->fpa->fromTPA = psMemIncrRefCounter (skycell->fpa->fromTPA); 109 bkgModel->fpa->toSky = psMemIncrRefCounter (skycell->fpa->toSky); 117 110 } 118 111 -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoopBackground.c
r35537 r35539 167 167 } 168 168 169 if ( false &&!pswarpUpdateMetadata (output->fpa, skycell->fpa, input->fpa, astrom->fpa, config, false)) {169 if (!pswarpUpdateMetadata (output->fpa, skycell->fpa, input->fpa, astrom->fpa, config, false)) { 170 170 psError(psErrorCodeLast(), false, "problem generating statistics."); 171 171 goto FAIL; -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpOptions.c
r35535 r35539 70 70 } 71 71 72 bool doBKG = psMetadataLookupBool(&status,recipe, "BACKGROUND.MODEL"); ///< Generate the warped background model? 72 // BACKGROUND.MODEL gets set in config->arguments (to false) if no input model is found 73 bool doBKG = psMetadataLookupBool(&status,config->arguments, "BACKGROUND.MODEL"); ///< Generate the warped background model? 73 74 if (!status) { 74 doBKG = false; 75 // if it is not in config->arguments, look in recipe 76 doBKG = psMetadataLookupBool(&status,recipe, "BACKGROUND.MODEL"); ///< Generate the warped background model? 77 if (!status) { 78 doBKG = false; 75 79 psWarning("BACKGROUND.MODEL is not set in the %s recipe -- defaulting to FALSE.", PSWARP_RECIPE); 80 } 76 81 } 82 77 83 int bkgXgrid = psMetadataLookupS32(&status,recipe, "BKG.XGRID"); ///< Xsize of background model 78 84 if (!status) { -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpParseCamera.c
r35538 r35539 76 76 } 77 77 output->save = true; 78 pmFPAAddSourceFromFormat(output->fpa, output->format); // ** builds the HDUs, is this OK? 78 79 79 80 pmFPAfile *outMask = useInputCamera ? … … 116 117 pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL"): 117 118 pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT.BKGMODEL", skycell->cameraName, skycell->formatName); 119 if (!outBackground) { 120 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.BKGMODEL"); 121 return false; 122 } 118 123 outBackground->xBin = psMetadataLookupS32(&status, recipe, "BKG.XGRID"); 119 124 outBackground->yBin = psMetadataLookupS32(&status, recipe, "BKG.YGRID"); 120 121 if (!outBackground) {122 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.BKGMODEL");123 return false;124 }125 125 outBackground->save = true; 126 pmFPAAddSourceFromFormat(outBackground->fpa, outBackground->format); // ** builds the HDUs, is this OK? 126 127 } 127 128 … … 136 137 } 137 138 psphotInput->src = psMemIncrRefCounter(output->fpa); 139 pmFPAAddSourceFromFormat(psphotInput->fpa, psphotInput->format); // ** builds the HDUs, is this OK? 138 140 139 141 // specify the number of psphot input images (psphotReadout loops over all input images) … … 232 234 foundBackground = true; 233 235 } else { 236 // cannot do the background model if an input is not supplied. 237 psMetadataAddBool (config->arguments, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE, "no input background supplied", false); 234 238 psLogMsg("pswarp", PS_LOG_INFO, "No background models supplied"); 235 239 } … … 329 333 psLogMsg("pswarp", PS_LOG_INFO, "No variance supplied"); 330 334 } 335 336 // XXX for now we do not have an option to supply a background model set in multi input mode 337 psMetadataAddBool (config->arguments, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE, "no input background supplied", false); 331 338 } 332 339
Note:
See TracChangeset
for help on using the changeset viewer.
