Changeset 41526
- Timestamp:
- Apr 2, 2021, 2:52:30 PM (5 years ago)
- Location:
- trunk/pswarp/src
- Files:
-
- 7 edited
-
pswarpCleanup.c (modified) (1 diff)
-
pswarpDefineLayout.c (modified) (1 diff)
-
pswarpLoadAstrometry.c (modified) (1 diff)
-
pswarpLoop.c (modified) (1 diff)
-
pswarpOptions.c (modified) (3 diffs)
-
pswarpTransformReadout.c (modified) (1 diff)
-
pswarpTransformTile.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpCleanup.c
r41510 r41526 86 86 } 87 87 } 88 88 89 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { 89 90 psError(psErrorCodeLast(), false, "Unable to write files."); -
trunk/pswarp/src/pswarpDefineLayout.c
r41510 r41526 174 174 175 175 psImageInit(readout->image, NAN); 176 psFree(readout); // Drop reference 176 psFree(readout); // Drop reference (saved on cell) 177 177 178 178 // copy the image concepts from the skycell -
trunk/pswarp/src/pswarpLoadAstrometry.c
r39981 r41526 150 150 } 151 151 } 152 targetChip->toFPA = psMemIncrRefCounter (chip->toFPA); 153 targetChip->fromFPA = psMemIncrRefCounter (chip->fromFPA); 152 if (targetChip != chip) { 153 psAssert (!targetChip->toFPA, "oops"); 154 psAssert (!targetChip->fromFPA, "oops"); 155 targetChip->toFPA = psMemIncrRefCounter (chip->toFPA); 156 targetChip->fromFPA = psMemIncrRefCounter (chip->fromFPA); 157 } 154 158 } 155 159 156 160 // for pswarpLocalFrame, I need transformations and HDUs on a single fpa (so set on astrom as well as target) 157 target->fpa->toTPA = psMemIncrRefCounter (astrom->fpa->toTPA); 158 target->fpa->fromTPA = psMemIncrRefCounter (astrom->fpa->fromTPA); 159 target->fpa->toSky = psMemIncrRefCounter (astrom->fpa->toSky); 161 // But: do not increment the ref counter if this is the same entry 162 if (target->fpa != astrom->fpa) { 163 psAssert (!target->fpa->toTPA, "oops"); 164 psAssert (!target->fpa->fromTPA, "oops"); 165 psAssert (!target->fpa->toSky, "oops"); 166 target->fpa->toTPA = psMemIncrRefCounter (astrom->fpa->toTPA); 167 target->fpa->fromTPA = psMemIncrRefCounter (astrom->fpa->fromTPA); 168 target->fpa->toSky = psMemIncrRefCounter (astrom->fpa->toSky); 169 } 160 170 161 171 // reset the type to the original value -
trunk/pswarp/src/pswarpLoop.c
r41510 r41526 15 15 bool pswarpLoop(pmConfig *config, psMetadata *stats) 16 16 { 17 18 17 // load the recipe 19 18 bool status = false; -
trunk/pswarp/src/pswarpOptions.c
r39981 r41526 70 70 } 71 71 72 bool applyPixelNaN = psMetadataLookupBool(&status,recipe, "APPLY.PIXELNAN"); ///< apply NaN value to masked pixels 73 if (!status) { 74 applyPixelNaN = true; 75 psWarning("APPLY.PIXELNAN is not set in the %s recipe -- defaulting to %d.", PSWARP_RECIPE, applyPixelNaN); 76 } 77 72 78 // BACKGROUND.MODEL gets set in config->arguments (to false) if no input model is found 73 79 bool doBKG = psMetadataLookupBool(&status,config->arguments, "BACKGROUND.MODEL"); ///< Generate the warped background model? … … 109 115 psMetadataAddBool(recipe, PS_LIST_TAIL, "PSF", PS_META_REPLACE, "Generate a PSF Model?", PSF); 110 116 psMetadataAddBool(recipe, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE, "Generate the warped background model?", doBKG); 117 psMetadataAddBool(recipe, PS_LIST_TAIL, "APPLY.PIXELNAN", PS_META_REPLACE, "apply NaN values to bad pixels?", applyPixelNaN); 111 118 psMetadataAddS32(recipe, PS_LIST_TAIL, "BKG.XGRID", PS_META_REPLACE, "Xsize of background model", bkgXgrid); 112 119 psMetadataAddS32(recipe, PS_LIST_TAIL, "BKG.YGRID", PS_META_REPLACE, "Ysize of background model", bkgYgrid); … … 120 127 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PSF", PS_META_REPLACE, "Generate a PSF Model?", PSF); 121 128 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE, "Generate the warped background model?", doBKG); 129 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "APPLY.PIXELNAN", PS_META_REPLACE, "apply NaN values to bad pixels?", applyPixelNaN); 122 130 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "BKG.XGRID", PS_META_REPLACE, "Xsize of background model", bkgXgrid); 123 131 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "BKG.YGRID", PS_META_REPLACE, "Ysize of background model", bkgYgrid); -
trunk/pswarp/src/pswarpTransformReadout.c
r41510 r41526 40 40 // output mask bits 41 41 psImageMaskType maskIn = 0 ; 42 if (doApplyMaskNaN) {42 if (doApplyMaskNaN) { 43 43 maskIn = psMetadataLookupImageMask(&mdok, recipe, "MASK.INPUT"); 44 44 psAssert(mdok, "MASK.INPUT was not defined"); -
trunk/pswarp/src/pswarpTransformTile.c
r35563 r41526 132 132 double imageValue, varValue; // Value of image and variance map 133 133 psImageMaskType maskValue = inMaskData ? inMaskData[(int)yIn][(int)xIn] : 0; // Value of mask 134 if (!psImageInterpolate(&imageValue, &varValue, &maskValue, xIn, yIn, args->interp)) { 134 135 if (!psImageInterpolate(&imageValue, &varValue, &maskValue, xIn, yIn, args->interp)) { 135 136 psError(psErrorCodeLast(), false, "Unable to interpolate image."); 136 137 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
