Changeset 21396
- Timestamp:
- Feb 6, 2009, 2:15:00 PM (17 years ago)
- Location:
- trunk/ppSub/src
- Files:
-
- 2 edited
-
ppSubArguments.c (modified) (7 diffs)
-
ppSubReadoutUpdate.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubArguments.c
r21360 r21396 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1.5 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-0 6 01:37:17$8 * @version $Revision: 1.57 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-07 00:15:00 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 182 182 bool ppSubArgumentsSetup(int argc, char *argv[], pmConfig *config) 183 183 { 184 int argnum; // Argument Number184 int argnum; // Argument Number 185 185 assert(config); 186 186 … … 192 192 193 193 if ((argnum = psArgumentGet(argc, argv, "-psphot-visual"))) { 194 psArgumentRemove(argnum, &argc, argv);195 psphotSetVisual(true);194 psArgumentRemove(argnum, &argc, argv); 195 psphotSetVisual(true); 196 196 } 197 197 … … 200 200 psMetadata *arguments = config->arguments; // Command-line arguments 201 201 psMetadataAddStr(arguments, PS_LIST_TAIL, "-inmask", 0, "Input mask image", NULL); 202 psMetadataAddStr(arguments, PS_LIST_TAIL, "-in weight", 0, "Input weightimage", NULL);203 psMetadataAddStr(arguments, PS_LIST_TAIL, "-refmask", 0, "Reference mask image", NULL);204 psMetadataAddStr(arguments, PS_LIST_TAIL, "-ref weight", 0, "Referenceweightimage", NULL);202 psMetadataAddStr(arguments, PS_LIST_TAIL, "-invariance", 0, "Input variance image", NULL); 203 psMetadataAddStr(arguments, PS_LIST_TAIL, "-refmask", 0, "Reference mask image", NULL); 204 psMetadataAddStr(arguments, PS_LIST_TAIL, "-refvariance", 0, "Reference variance image", NULL); 205 205 psMetadataAddStr(arguments, PS_LIST_TAIL, "-stats", 0, "Statistics file", NULL); 206 206 psMetadataAddF32(arguments, PS_LIST_TAIL, "-region", 0, "Size of iso-kernel region", NAN); … … 226 226 psMetadataAddImageMask(arguments, PS_LIST_TAIL, "-mask-bad", 0, "Mask value for bad pixels", 0); 227 227 psMetadataAddImageMask(arguments, PS_LIST_TAIL, "-mask-poor", 0, "Mask value for poor pixels", 0); 228 psMetadataAddF32(arguments, PS_LIST_TAIL, "-poor-frac", 0, "Fraction of weightfor poor pixels", NAN);228 psMetadataAddF32(arguments, PS_LIST_TAIL, "-poor-frac", 0, "Fraction of variance for poor pixels", NAN); 229 229 psMetadataAddF32(arguments, PS_LIST_TAIL, "-badfrac", 0, "Maximum fraction of bad pixels to accept", 1.0); 230 230 psMetadataAddBool(arguments, PS_LIST_TAIL, "-reverse", 0, "Reverse sense of subtraction?", false); … … 265 265 fileList("INPUT.MASK", inMask, "Name of the input mask image", config); 266 266 } 267 const char *in Weight = psMetadataLookupStr(NULL, arguments, "-inweight"); // Name of input weight268 if (in Weight && strlen(inWeight) > 0) {269 fileList("INPUT. WEIGHT", inWeight, "Name of the input weightimage", config);267 const char *inVariance = psMetadataLookupStr(NULL, arguments, "-invariance"); // Name of input variance 268 if (inVariance && strlen(inVariance) > 0) { 269 fileList("INPUT.VARIANCE", inVariance, "Name of the input variance image", config); 270 270 } 271 271 … … 274 274 fileList("REF.MASK", refMask, "Name of the reference mask image", config); 275 275 } 276 const char *ref Weight = psMetadataLookupStr(NULL, arguments, "-refweight"); // Name of ref weight277 if (ref Weight && strlen(refWeight) > 0) {278 fileList("REF. WEIGHT", refWeight, "Name of the reference weightimage", config);276 const char *refVariance = psMetadataLookupStr(NULL, arguments, "-refvariance"); // Name of ref variance 277 if (refVariance && strlen(refVariance) > 0) { 278 fileList("REF.VARIANCE", refVariance, "Name of the reference variance image", config); 279 279 } 280 280 -
trunk/ppSub/src/ppSubReadoutUpdate.c
r21360 r21396 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-0 6 01:37:17$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-07 00:15:00 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 29 29 // Renormalising for pixels, because that's what magic desires 30 30 if (!ppSubReadoutRenormPixels (config, recipe, outRO)) { 31 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "failure in renormalization");32 return false;31 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "failure in renormalization"); 32 return false; 33 33 } 34 34 … … 48 48 // Generate binned JPEGs 49 49 { 50 psImageMaskType maskBad = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels50 psImageMaskType maskBad = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels 51 51 52 52 int bin1 = psMetadataLookupS32(NULL, recipe, "BIN1"); // First binning level … … 58 58 59 59 pmReadout *ro1 = pmReadoutAlloc(cell1); 60 pmReadout *ro2 = pmReadoutAlloc(cell2); // Binned readouts60 pmReadout *ro2 = pmReadoutAlloc(cell2); // Binned readouts 61 61 if (!pmReadoutRebin(ro1, outRO, maskBad, bin1, bin1)) { 62 62 psError(PS_ERR_UNKNOWN, false, "Unable to bin output (1st binning)"); … … 79 79 { 80 80 psImage *sig = (psImage*)psBinaryOp(NULL, outRO->image, "*", outRO->image); 81 psBinaryOp(sig, sig, "/", outRO-> weight);81 psBinaryOp(sig, sig, "/", outRO->variance); 82 82 psFits *fits = psFitsOpen("significance.fits", "w"); 83 83 psFitsWriteImage(fits, NULL, sig, 0, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
