Changeset 18918
- Timestamp:
- Aug 5, 2008, 11:18:27 AM (18 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 6 edited
-
ppStackArguments.c (modified) (15 diffs)
-
ppStackLoop.c (modified) (3 diffs)
-
ppStackMatch.c (modified) (3 diffs)
-
ppStackPSF.c (modified) (1 diff)
-
ppStackReadout.c (modified) (2 diffs)
-
ppStackSources.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackArguments.c
r18785 r18918 49 49 } \ 50 50 } \ 51 psMetadataAdd##TYPE( config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \51 psMetadataAdd##TYPE(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \ 52 52 } 53 53 … … 64 64 } \ 65 65 } \ 66 psMetadataAdd##TYPE( config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \66 psMetadataAdd##TYPE(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \ 67 67 } 68 68 … … 80 80 } \ 81 81 psMaskType value = pmConfigMaskGet(name, config); \ 82 psMetadataAddU8( config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \82 psMetadataAddU8(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \ 83 83 } 84 84 … … 94 94 } \ 95 95 } \ 96 psMetadataAddS32(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, psStatsOptionFromString(stat)); \ 96 psMetadataAddS32(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, \ 97 NULL, psStatsOptionFromString(stat)); \ 97 98 } 98 99 … … 106 107 psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest 107 108 if (value && strlen(value) > 0) { 108 return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);109 return psMetadataAddStr(target, PS_LIST_TAIL, mdName, PS_META_REPLACE, NULL, value); 109 110 } 110 111 return false; … … 128 129 } 129 130 } 130 return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);131 return psMetadataAddStr(target, PS_LIST_TAIL, mdName, PS_META_REPLACE, NULL, value); 131 132 } 132 133 … … 142 143 psMetadataAddStr(arguments, PS_LIST_TAIL, "-stats", 0, "Statistics file", NULL); 143 144 psMetadataAddS32(arguments, PS_LIST_TAIL, "-iter", 0, "Number of rejection iterations", 0); 144 psMetadataAddF32(arguments, PS_LIST_TAIL, "-combine-rej", 0, "Combination rejection thresold (sigma)", NAN); 145 psMetadataAddF32(arguments, PS_LIST_TAIL, "-combine-rej", 0, 146 "Combination rejection thresold (sigma)", NAN); 145 147 psMetadataAddU8(arguments, PS_LIST_TAIL, "-mask-bad", 0, "Mask value for bad pixels", 0); 146 148 psMetadataAddU8(arguments, PS_LIST_TAIL, "-mask-blank", 0, "Mask value for blank region", 0); 147 149 psMetadataAddF32(arguments, PS_LIST_TAIL, "-threshold-mask", 0, "Threshold for mask deconvolution", NAN); 148 psMetadataAddF32(arguments, PS_LIST_TAIL, "-image-rej", 0, "Pixel rejection fraction threshold for rejecting entire image", NAN); 150 psMetadataAddF32(arguments, PS_LIST_TAIL, "-image-rej", 0, 151 "Pixel rejection fraction threshold for rejecting entire image", NAN); 149 152 psMetadataAddS32(arguments, PS_LIST_TAIL, "-rows", 0, "Rows to read at once", 0); 150 153 psMetadataAddBool(arguments, PS_LIST_TAIL, "-photometry", 0, "Do photometry on stacked image?", false); 151 psMetadataAddS32(arguments, PS_LIST_TAIL, "-psf-instances", 0, "Number of instances for PSF generation", 0); 154 psMetadataAddS32(arguments, PS_LIST_TAIL, "-psf-instances", 0, 155 "Number of instances for PSF generation", 0); 152 156 psMetadataAddF32(arguments, PS_LIST_TAIL, "-psf-radius", 0, "Radius for PSF generation", NAN); 153 psMetadataAddStr(arguments, PS_LIST_TAIL, "-psf-model", 0, "Model name for PSF generation", "PS_MODEL_RGAUSS");157 psMetadataAddStr(arguments, PS_LIST_TAIL, "-psf-model", 0, "Model name for PSF generation", NULL); 154 158 psMetadataAddS32(arguments, PS_LIST_TAIL, "-psf-order", 0, "Spatial order for PSF generation", 0); 155 159 psMetadataAddBool(arguments, PS_LIST_TAIL, "-variance", 0, "Use variance for rejection?", false); 156 psMetadataAddBool(arguments, PS_LIST_TAIL, "-safe", 0, "Play safe with small numbers of pixels to combine?", false); 160 psMetadataAddBool(arguments, PS_LIST_TAIL, "-safe", 0, 161 "Play safe with small numbers of pixels to combine?", false); 157 162 psMetadataAddF32(arguments, PS_LIST_TAIL, "-source-radius", 0, "Source exclusion radius", NAN); 158 163 psMetadataAddS32(arguments, PS_LIST_TAIL, "-source-iter", 0, "Source clipping iterations", 0); … … 160 165 psMetadataAddS32(arguments, PS_LIST_TAIL, "-source-min", 0, "Source minimum overlap", 0); 161 166 psMetadataAddBool(arguments, PS_LIST_TAIL, "-renorm", 0, "Renormalise variance maps?", false); 162 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-mean", 0, "Statistic for mean in renormalisation", NULL); 163 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-stdev", 0, "Statistic for stdev in renormalisation", NULL); 167 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-mean", 0, 168 "Statistic for mean in renormalisation", NULL); 169 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-stdev", 0, 170 "Statistic for stdev in renormalisation", NULL); 164 171 psMetadataAddS32(arguments, PS_LIST_TAIL, "-renorm-width", 0, "Width of renormalisation boxes", 0); 165 172 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL); 166 173 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL); 167 174 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-weight", 0, "Suffix for temporary weight maps", NULL); 168 psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0, "Delete temporary files on completion?", false); 175 psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0, 176 "Delete temporary files on completion?", false); 169 177 170 178 if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 3) { … … 173 181 174 182 const char *stampsName = psMetadataLookupStr(NULL, arguments, "-stamps"); // Name of stamps file 175 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "STAMPS", 0, "Stamps file", stampsName); 176 // if (!stampsName && !psMetadataLookupPtr(&mdok, config->arguments, "PPSTACK.SOURCES")) { 177 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, "One of -sources or -stamps must be specified."); 178 //goto ERROR; 179 // } 183 psMetadataAddStr(arguments, PS_LIST_TAIL, "STAMPS", 0, "Stamps file", stampsName); 180 184 181 185 unsigned int numBad = 0; // Number of bad lines … … 185 189 return false; 186 190 } 187 psMetadataAddMetadata(config->arguments, PS_LIST_TAIL, "INPUTS", 0, 188 "Metadata with input details", inputs); 191 psMetadataAddMetadata(arguments, PS_LIST_TAIL, "INPUTS", 0, "Metadata with input details", inputs); 189 192 psFree(inputs); 190 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, 191 "Root name of the output image list", argv[2]); 192 193 valueArgStr(arguments, "-stats", "STATS", config->arguments); 194 195 if (psMetadataLookupBool(NULL, arguments, "-photometry")) { 196 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, 197 "Do photometry on stacked image?", true); 198 } 193 psMetadataAddStr(arguments, PS_LIST_TAIL, "OUTPUT", 0, "Root name of the output image list", argv[2]); 194 195 valueArgStr(arguments, "-stats", "STATS", arguments); 196 197 psMetadataAddBool(arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, 198 "Do photometry on stacked image?", 199 psMetadataLookupBool(NULL, arguments, "-photometry")); 199 200 200 201 return true; … … 207 208 psMetadata *arguments = config->arguments; // Command-line arguments 208 209 209 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe for ppSim210 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe 210 211 if (!recipe) { 211 212 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSTACK_RECIPE); … … 229 230 VALUE_ARG_RECIPE_FLOAT("-psf-radius", "PSF.RADIUS", F32); 230 231 VALUE_ARG_RECIPE_INT("-psf-order", "PSF.ORDER", S32, 0); 231 valueArg Str(arguments, "-psf-model", "PSF.MODEL", config->arguments);232 valueArgRecipeStr(arguments, recipe, "-psf-model", "PSF.MODEL", recipe); 232 233 233 234 if (psMetadataLookupBool(NULL, arguments, "-photometry") || 234 235 psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) { 235 psMetadataAddBool( config->arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE,236 psMetadataAddBool(arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, 236 237 "Do photometry on stacked image?", true); 237 238 } … … 239 240 if (psMetadataLookupBool(NULL, arguments, "-variance") || 240 241 psMetadataLookupBool(NULL, recipe, "VARIANCE")) { 241 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "VARIANCE", 0, 242 "Use variance for rejection?", true); 242 psMetadataAddBool(arguments, PS_LIST_TAIL, "VARIANCE", 0, "Use variance for rejection?", true); 243 243 } 244 244 245 245 if (psMetadataLookupBool(NULL, arguments, "-safe") || 246 246 psMetadataLookupBool(NULL, recipe, "SAFE")) { 247 psMetadataAddBool( config->arguments, PS_LIST_TAIL, "SAFE", 0,247 psMetadataAddBool(arguments, PS_LIST_TAIL, "SAFE", 0, 248 248 "Play safe with small number of pixels to combine?", true); 249 249 } … … 251 251 if (psMetadataLookupBool(NULL, arguments, "-renorm") || 252 252 psMetadataLookupBool(NULL, recipe, "RENORM")) { 253 psMetadataAddBool( config->arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise variance maps?", true);253 psMetadataAddBool(arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise variance maps?", true); 254 254 } 255 255 VALUE_ARG_RECIPE_INT("-renorm-width", "RENORM.WIDTH", S32, 0); … … 257 257 VALUE_ARG_RECIPE_STAT("-renorm-stdev", "RENORM.STDEV"); 258 258 259 valueArgRecipeStr(arguments, recipe, "-temp-image", "TEMP.IMAGE", config->arguments);260 valueArgRecipeStr(arguments, recipe, "-temp-mask", "TEMP.MASK", config->arguments);261 valueArgRecipeStr(arguments, recipe, "-temp-weight", "TEMP.WEIGHT", config->arguments);259 valueArgRecipeStr(arguments, recipe, "-temp-image", "TEMP.IMAGE", recipe); 260 valueArgRecipeStr(arguments, recipe, "-temp-mask", "TEMP.MASK", recipe); 261 valueArgRecipeStr(arguments, recipe, "-temp-weight", "TEMP.WEIGHT", recipe); 262 262 263 263 if (psMetadataLookupBool(NULL, arguments, "-temp-delete") || 264 264 psMetadataLookupBool(NULL, recipe, "TEMP.DELETE")) { 265 psMetadataAddBool( config->arguments, PS_LIST_TAIL, "TEMP.DELETE", 0,265 psMetadataAddBool(arguments, PS_LIST_TAIL, "TEMP.DELETE", 0, 266 266 "Delete temporary files on completion?", true); 267 267 } 268 268 269 psTrace("ppStack", 1, "Done reading command-line arguments\n"); 269 psTrace("ppStack", 1, "Done parsing arguments\n"); 270 271 // Dump configuration, now that's it's settled 272 { 273 pmConfigCamerasCull(config); 274 pmConfigRecipesCull(config, "PPSTACK,PPSUB,PPSTATS,PSPHOT,MASKS"); 275 276 const char *outroot = psMetadataLookupStr(NULL, arguments, "OUTPUT"); // Output root name 277 psAssert(outroot, "Should be there, we put it there!"); 278 279 pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PPSTACK.INPUT"); // Input file 280 pmConfigDump(config, input->fpa, outroot); 281 } 282 270 283 return true; 271 284 -
trunk/ppStack/src/ppStackLoop.c
r18591 r18918 203 203 assert(config); 204 204 205 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 206 psAssert(recipe, "We've thrown an error on this before."); 207 205 208 bool mdok; // Status of MD lookup 206 bool tempDelete = psMetadataLookupBool(&mdok, config->arguments, "TEMP.DELETE"); // Delete temporary files?207 const char *tempImage = psMetadataLookupStr(NULL, config->arguments, "TEMP.IMAGE"); // Suffix for temporary images208 const char *tempMask = psMetadataLookupStr(NULL, config->arguments, "TEMP.MASK"); // Suffix for temporary masks209 const char *tempWeight = psMetadataLookupStr(NULL, config->arguments, "TEMP.WEIGHT"); // Suffix for temporary weight (variance)maps209 bool tempDelete = psMetadataLookupBool(&mdok, recipe, "TEMP.DELETE"); // Delete temporary files? 210 const char *tempImage = psMetadataLookupStr(NULL, recipe, "TEMP.IMAGE"); // Suffix for temporary images 211 const char *tempMask = psMetadataLookupStr(NULL, recipe, "TEMP.MASK"); // Suffix for temporary masks 212 const char *tempWeight = psMetadataLookupStr(NULL, recipe, "TEMP.WEIGHT"); // Suffix for temp weight maps 210 213 if (!tempImage || !tempMask || !tempWeight) { 211 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.WEIGHT"); 212 return false; 213 } 214 215 float threshold = psMetadataLookupF32(NULL, config->arguments, "THRESHOLD.MASK"); // Threshold for mask deconvolution 216 float imageRej = psMetadataLookupF32(NULL, config->arguments, "IMAGE.REJ"); // Maximum fraction of image to reject before rejecting entire image 214 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 215 "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.WEIGHT in recipe"); 216 return false; 217 } 218 219 float threshold = psMetadataLookupF32(NULL, recipe, "THRESHOLD.MASK"); // Threshold for mask deconvolution 220 float imageRej = psMetadataLookupF32(NULL, recipe, "IMAGE.REJ"); // Maximum fraction of image to reject 221 // before rejecting entire image 217 222 218 223 const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics … … 238 243 } 239 244 int num = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs 240 int numScans = psMetadataLookupS32(NULL, config->arguments, "ROWS"); // Number of scans to read at once 245 int numScans = psMetadataLookupS32(NULL, recipe, "ROWS"); // Number of scans to read at once 246 241 247 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe 242 int overlap = 2 * psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Overlap by kernel size between consecutive scans 248 int overlap = 2 * psMetadataLookupS32(NULL, ppsub, 249 "KERNEL.SIZE"); // Overlap by kernel size between consecutive scans 243 250 244 251 if (!pmConfigMaskSetBits(NULL, NULL, config)) { … … 770 777 memDump("final"); 771 778 772 if (psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY")) {779 if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) { 773 780 774 781 fileActivation(config, combineFiles, false); -
trunk/ppStack/src/ppStackMatch.c
r18591 r18918 27 27 pmReadout *output = pmReadoutAlloc(NULL); // Output readout, for holding results temporarily 28 28 29 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 30 psAssert(recipe, "We've thrown an error on this before."); 31 29 32 // Look up appropriate values from the ppSub recipe 30 psMetadata * recipe= psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe31 int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size33 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe 34 int size = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size 32 35 33 36 psMaskType maskIn = pmConfigMaskGet("MASK.VALUE", config); // Bits to mask going in to pmSubtractionMatch … … 35 38 36 39 bool mdok; // Status of MD lookup 37 bool renorm = psMetadataLookupBool(&mdok, config->arguments, "RENORM"); // Renormalise variances? 38 psStatsOptions renormMean = psMetadataLookupS32(&mdok, config->arguments, 39 "RENORM.MEAN"); // Statistic for mean 40 psStatsOptions renormStdev = psMetadataLookupS32(&mdok, config->arguments, 41 "RENORM.STDEV"); // Statistic for stdev 42 int renormWidth = psMetadataLookupS32(&mdok, config->arguments, 43 "RENORM.WIDTH"); // Width for renormalisation box 44 float penalty = psMetadataLookupF32(NULL, config->arguments, "PENALTY"); // Penalty for wideness 40 bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise variances? 41 psStatsOptions renormMean = psMetadataLookupS32(&mdok, recipe, "RENORM.MEAN"); // Statistic for mean 42 psStatsOptions renormStdev = psMetadataLookupS32(&mdok, recipe, "RENORM.STDEV"); // Statistic for stdev 43 int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalisation box 44 float penalty = psMetadataLookupF32(NULL, ppsub, "PENALTY"); // Penalty for wideness 45 45 46 46 if (!pmReadoutMaskNonfinite(readout, maskIn)) { … … 53 53 assert(sources); 54 54 55 int order = psMetadataLookupS32(NULL, recipe, "SPATIAL.ORDER"); // Spatial polynomial order56 float regionSize = psMetadataLookupF32(NULL, recipe, "REGION.SIZE"); // Size of iso-kernel regs57 float spacing = psMetadataLookupF32(NULL, recipe, "STAMP.SPACING"); // Typical stamp spacing58 int footprint = psMetadataLookupS32(NULL, recipe, "STAMP.FOOTPRINT"); // Stamp half-size59 float threshold = psMetadataLookupF32(NULL, recipe, "STAMP.THRESHOLD"); // Threshold for stmps60 int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations61 float rej = psMetadataLookupF32(NULL, recipe, "REJ"); // Rejection threshold55 int order = psMetadataLookupS32(NULL, ppsub, "SPATIAL.ORDER"); // Spatial polynomial order 56 float regionSize = psMetadataLookupF32(NULL, ppsub, "REGION.SIZE"); // Size of iso-kernel regs 57 float spacing = psMetadataLookupF32(NULL, ppsub, "STAMP.SPACING"); // Typical stamp spacing 58 int footprint = psMetadataLookupS32(NULL, ppsub, "STAMP.FOOTPRINT"); // Stamp half-size 59 float threshold = psMetadataLookupF32(NULL, ppsub, "STAMP.THRESHOLD"); // Threshold for stmps 60 int iter = psMetadataLookupS32(NULL, ppsub, "ITER"); // Rejection iterations 61 float rej = psMetadataLookupF32(NULL, ppsub, "REJ"); // Rejection threshold 62 62 pmSubtractionKernelsType type = pmSubtractionKernelsTypeFromString( 63 psMetadataLookupStr(NULL, recipe, "KERNEL.TYPE")); // Kernel type64 psVector *widths = psMetadataLookupPtr(NULL, recipe, "ISIS.WIDTHS"); // ISIS Gaussian widths65 psVector *orders = psMetadataLookupPtr(NULL, recipe, "ISIS.ORDERS"); // ISIS Polynomial orders66 int inner = psMetadataLookupS32(NULL, recipe, "INNER"); // Inner radius67 int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order68 int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel69 float badFrac = psMetadataLookupF32(NULL, recipe, "BADFRAC"); // Maximum bad fraction70 bool optimum = psMetadataLookupBool(&mdok, recipe, "OPTIMUM"); // Derive optimum parameters?71 float optMin = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MIN"); // Minimum width for search72 float optMax = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MAX"); // Maximum width for search73 float optStep = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.STEP"); // Step for search74 float optThresh = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.TOL"); // Tolerance for search75 int optOrder = psMetadataLookupS32(&mdok, recipe, "OPTIMUM.ORDER"); // Order for search63 psMetadataLookupStr(NULL, ppsub, "KERNEL.TYPE")); // Kernel type 64 psVector *widths = psMetadataLookupPtr(NULL, ppsub, "ISIS.WIDTHS"); // ISIS Gaussian widths 65 psVector *orders = psMetadataLookupPtr(NULL, ppsub, "ISIS.ORDERS"); // ISIS Polynomial orders 66 int inner = psMetadataLookupS32(NULL, ppsub, "INNER"); // Inner radius 67 int ringsOrder = psMetadataLookupS32(NULL, ppsub, "RINGS.ORDER"); // RINGS polynomial order 68 int binning = psMetadataLookupS32(NULL, ppsub, "SPAM.BINNING"); // Binning for SPAM kernel 69 float badFrac = psMetadataLookupF32(NULL, ppsub, "BADFRAC"); // Maximum bad fraction 70 bool optimum = psMetadataLookupBool(&mdok, ppsub, "OPTIMUM"); // Derive optimum parameters? 71 float optMin = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.MIN"); // Minimum width for search 72 float optMax = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.MAX"); // Maximum width for search 73 float optStep = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.STEP"); // Step for search 74 float optThresh = psMetadataLookupF32(&mdok, ppsub, "OPTIMUM.TOL"); // Tolerance for search 75 int optOrder = psMetadataLookupS32(&mdok, ppsub, "OPTIMUM.ORDER"); // Order for search 76 76 77 77 // These values are specified specifically for stacking -
trunk/ppStack/src/ppStackPSF.c
r16991 r18918 12 12 { 13 13 // Get the recipe values 14 int psfInstances = psMetadataLookupS32(NULL, config->arguments, "PSF.INSTANCES"); // Number of instances for PSF 15 float psfRadius = psMetadataLookupF32(NULL, config->arguments, "PSF.RADIUS"); // Radius for PSF 16 const char *psfModel = psMetadataLookupStr(NULL, config->arguments, "PSF.MODEL"); // Model for PSF 17 int psfOrder = psMetadataLookupS32(NULL, config->arguments, "PSF.ORDER"); // Spatial order for PSF 14 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 15 psAssert(recipe, "We've thrown an error on this before."); 16 17 int psfInstances = psMetadataLookupS32(NULL, recipe, "PSF.INSTANCES"); // Number of instances for PSF 18 float psfRadius = psMetadataLookupF32(NULL, recipe, "PSF.RADIUS"); // Radius for PSF 19 const char *psfModel = psMetadataLookupStr(NULL, recipe, "PSF.MODEL"); // Model for PSF 20 int psfOrder = psMetadataLookupS32(NULL, recipe, "PSF.ORDER"); // Spatial order for PSF 18 21 19 22 // Solve for the target PSF -
trunk/ppStack/src/ppStackReadout.c
r18591 r18918 27 27 static int sectionNum = 0; // Section number; for debugging outputs 28 28 29 30 29 // Get the recipe values 30 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 31 psAssert(recipe, "We've thrown an error on this before."); 32 31 33 bool mdok; // Status of MD lookup 32 int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Rejection iterations33 float combineRej = psMetadataLookupF32(NULL, config->arguments, "COMBINE.REJ"); // Combination threshold34 int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations 35 float combineRej = psMetadataLookupF32(NULL, recipe, "COMBINE.REJ"); // Combination threshold 34 36 psMaskType maskVal = pmConfigMaskGet("BLANK", config); // Value to mask 35 bool useVariance = psMetadataLookupBool(&mdok, config->arguments, "VARIANCE"); // Use variance for rejection? 36 bool safe = psMetadataLookupBool(&mdok, config->arguments, "SAFE"); // Play safe when combining small numbers of pixels? 37 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 38 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels 39 37 40 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe 38 41 int kernelSize = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size 39 40 42 41 43 int num = readouts->n; // Number of inputs … … 137 139 138 140 // Get the recipe values 141 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 142 psAssert(recipe, "We've thrown an error on this before."); 143 139 144 bool mdok; // Status of MD lookup 140 145 psMaskType maskVal = pmConfigMaskGet("BLANK", config); // Value to mask 141 bool useVariance = psMetadataLookupBool(&mdok, config->arguments, "VARIANCE"); // Use variance for rejection?146 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 142 147 143 148 int num = readouts->n; // Number of inputs -
trunk/ppStack/src/ppStackSources.c
r18490 r18918 330 330 331 331 // Read recipe values 332 float radius = psMetadataLookupF32(NULL, config->arguments, "SOURCE.RADIUS"); // Exclusion radius 333 int minOverlap = psMetadataLookupS32(NULL, config->arguments, "SOURCE.MIN"); // Minimum number 334 int iter = psMetadataLookupS32(NULL, config->arguments, "SOURCE.ITER"); // Clipping iterations 335 float rej = psMetadataLookupF32(NULL, config->arguments, "SOURCE.REJ"); // Clipping rejection 332 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 333 psAssert(recipe, "We've thrown an error on this before."); 334 float radius = psMetadataLookupF32(NULL, recipe, "SOURCE.RADIUS"); // Exclusion radius 335 int minOverlap = psMetadataLookupS32(NULL, recipe, "SOURCE.MIN"); // Minimum number 336 int iter = psMetadataLookupS32(NULL, recipe, "SOURCE.ITER"); // Clipping iterations 337 float rej = psMetadataLookupF32(NULL, recipe, "SOURCE.REJ"); // Clipping rejection 336 338 337 339 // Look for overlaps with existing lists … … 370 372 PS_ASSERT_PTR_NON_NULL(config, NULL); 371 373 372 float radius = psMetadataLookupF32(NULL, config->arguments, "SOURCE.RADIUS"); // Exclusion radius 374 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 375 psAssert(recipe, "We've thrown an error on this before."); 376 float radius = psMetadataLookupF32(NULL, recipe, "SOURCE.RADIUS"); // Exclusion radius 373 377 374 378 int numLists = 0; // Number of lists
Note:
See TracChangeset
for help on using the changeset viewer.
