Changeset 21238
- Timestamp:
- Jan 30, 2009, 12:00:00 PM (17 years ago)
- Location:
- branches/eam_branch_20081230/ppMerge/src
- Files:
-
- 18 edited
-
ppMerge.c (modified) (6 diffs)
-
ppMerge.h (modified) (2 diffs)
-
ppMergeArguments.c (modified) (21 diffs)
-
ppMergeCamera.c (modified) (11 diffs)
-
ppMergeErrorCodes.c.in (modified) (4 diffs)
-
ppMergeErrorCodes.h.in (modified) (1 diff)
-
ppMergeFileGroup.c (modified) (1 diff)
-
ppMergeFiles.c (modified) (1 diff)
-
ppMergeLoop.c (modified) (18 diffs)
-
ppMergeLoop_Threaded.c (modified) (19 diffs)
-
ppMergeMask.c (modified) (20 diffs)
-
ppMergeReadChunk.c (modified) (3 diffs)
-
ppMergeScaleZero.c (modified) (7 diffs)
-
ppMergeScaleZero.h (modified) (2 diffs)
-
ppMergeSetThreads.c (modified) (1 diff)
-
ppMergeThreadLauncher.c (modified) (1 diff)
-
ppMergeVersion.c (modified) (4 diffs)
-
ppMergeVersion.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081230/ppMerge/src/ppMerge.c
r18839 r21238 1 /** @file ppMerge.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.25.20.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 … … 12 24 psTimerStart(TIMERNAME); 13 25 14 psExit exitValue = PS_EXIT_SUCCESS; // Exit value for program26 psExit exitValue = PS_EXIT_SUCCESS; ///< Exit value for program 15 27 16 pmConfig *config = pmConfigRead(&argc, argv, PPMERGE_RECIPE); // Configuration28 pmConfig *config = pmConfigRead(&argc, argv, PPMERGE_RECIPE); ///< Configuration 17 29 if (!config) { 18 30 psErrorStackPrint(stderr, "Error reading configuration."); … … 27 39 } 28 40 29 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame41 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame 30 42 switch (type) { 31 43 case PPMERGE_TYPE_MASK: … … 58 70 59 71 // Output the statistics 60 bool mdok; // Status of MD lookup61 psString statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS.NAME"); // Statistics file name72 bool mdok; ///< Status of MD lookup 73 psString statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS.NAME"); ///< Statistics file name 62 74 if (mdok && statsName && strlen(statsName) > 0) { 63 psString resolved = pmConfigConvertFilename(statsName, config, true, true); // Resolved filename64 FILE *statsFile = fopen(resolved, "w"); // Output statistics file75 psString resolved = pmConfigConvertFilename(statsName, config, true, true); ///< Resolved filename 76 FILE *statsFile = fopen(resolved, "w"); ///< Output statistics file 65 77 if (!statsFile) { 66 78 psError(PS_ERR_IO, true, "Unable to open statistics file %s for writing.", resolved); … … 70 82 } 71 83 psFree(resolved); 72 psMetadata *stats = psMetadataLookupMetadata(&mdok, config->arguments, "STATS.DATA"); // Statistics84 psMetadata *stats = psMetadataLookupMetadata(&mdok, config->arguments, "STATS.DATA"); ///< Statistics 73 85 if (!stats) { 74 86 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find statistics"); … … 76 88 goto die; 77 89 } 78 psString statsOut = psMetadataConfigFormat(stats); // String to write out90 psString statsOut = psMetadataConfigFormat(stats); ///< String to write out 79 91 fprintf(statsFile, "%s", statsOut); 80 92 psFree(statsOut); -
branches/eam_branch_20081230/ppMerge/src/ppMerge.h
r21072 r21238 1 /** @file ppMerge.h 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.12.18.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifndef PP_MERGE_H 2 14 #define PP_MERGE_H … … 13 25 #include <ppStats.h> 14 26 15 #define TIMERNAME "ppMerge" // Name for timer 16 #define PPMERGE_RECIPE "PPMERGE" // Recipe name 17 #define THREADED 1 // Compile with threads? 27 /// @addtogroup ppArith 28 /// @{ 18 29 19 // Type of frame to merge 30 #define TIMERNAME "ppMerge" ///< Name for timer 31 #define PPMERGE_RECIPE "PPMERGE" ///< Recipe name 32 #define THREADED 1 ///< Compile with threads? 33 34 /** 35 * Type of frame to merge 36 */ 20 37 typedef enum { 21 PPMERGE_TYPE_UNKNOWN, // Unknown type22 PPMERGE_TYPE_BIAS, // Bias frame23 PPMERGE_TYPE_DARK, // (Multi-)Dark frame24 PPMERGE_TYPE_MASK, // Mask frame25 PPMERGE_TYPE_SHUTTER, // Shutter frame26 PPMERGE_TYPE_FLAT, // Flat-field frame (dome or sky)27 PPMERGE_TYPE_FRINGE, // Fringe frame38 PPMERGE_TYPE_UNKNOWN, ///< Unknown type 39 PPMERGE_TYPE_BIAS, ///< Bias frame 40 PPMERGE_TYPE_DARK, ///< (Multi-)Dark frame 41 PPMERGE_TYPE_MASK, ///< Mask frame 42 PPMERGE_TYPE_SHUTTER, ///< Shutter frame 43 PPMERGE_TYPE_FLAT, ///< Flat-field frame (dome or sky) 44 PPMERGE_TYPE_FRINGE, ///< Fringe frame 28 45 } ppMergeType; 29 46 30 // Files, for activation 47 /** 48 * Files, for activation 49 */ 31 50 typedef enum { 32 PPMERGE_FILES_ALL, // All files33 PPMERGE_FILES_INPUT, // Input files34 PPMERGE_FILES_OUTPUT // Output files51 PPMERGE_FILES_ALL, ///< All files 52 PPMERGE_FILES_INPUT, ///< Input files 53 PPMERGE_FILES_OUTPUT ///< Output files 35 54 } ppMergeFiles; 36 55 37 // Group of files to read 38 // 39 // Each file contributes a readout, into which is read a chunk from that file 56 /** 57 * \brief Group of files to read 58 * 59 * Each file contributes a readout, into which is read a chunk from that file 60 */ 40 61 typedef struct { 41 psArray *readouts; // Input readouts42 bool read; // Has the scan been read?43 bool busy; // Is the scan being processed?44 int firstScan; // First row of the chunk to be read for this group45 int lastScan; // Last row of the chunk to be read for this group62 psArray *readouts; ///< Input readouts 63 bool read; ///< Has the scan been read? 64 bool busy; ///< Is the scan being processed? 65 int firstScan; ///< First row of the chunk to be read for this group 66 int lastScan; ///< Last row of the chunk to be read for this group 46 67 } ppMergeFileGroup; 47 68 48 // Parse command-line arguments and recipe 49 bool ppMergeArguments(int argc, char *argv[], // Command-line arguments 50 pmConfig *config // Configuration 69 /** 70 * Parse command-line arguments and recipe 71 */ 72 bool ppMergeArguments(int argc, char *argv[], ///< Command-line arguments 73 pmConfig *config ///< Configuration 51 74 ); 52 75 53 // Set up camera files 54 bool ppMergeCamera(pmConfig *config // Configuration 76 /** 77 * Set up camera files 78 */ 79 bool ppMergeCamera(pmConfig *config ///< Configuration 55 80 ); 56 81 57 // Measure scale and zero-points 58 bool ppMergeScaleZero(pmConfig *config // Configuration 82 /** 83 * Measure scale and zero-points 84 */ 85 bool ppMergeScaleZero(pmConfig *config ///< Configuration 59 86 ); 60 87 61 // Main loop to do the merging 62 bool ppMergeLoop(pmConfig *config // Configuration 88 /** 89 * Main loop to do the merging 90 */ 91 bool ppMergeLoop(pmConfig *config ///< Configuration 63 92 ); 64 93 65 // Main loop for masks 66 bool ppMergeMask(pmConfig *config // Configuration 94 /** 95 * Main loop for masks 96 */ 97 bool ppMergeMask(pmConfig *config ///< Configuration 67 98 ); 68 99 69 // Read nominated input file 70 bool ppMergeFileReadInput(pmConfig *config, // Configuration 71 pmReadout *readout, // Readout into which to read 72 int num, // Number of file in sequence 73 int rows // Number of rows to read at once 100 /** 101 * Read nominated input file 102 */ 103 bool ppMergeFileReadInput(pmConfig *config, ///< Configuration 104 pmReadout *readout, ///< Readout into which to read 105 int num, ///< Number of file in sequence 106 int rows ///< Number of rows to read at once 74 107 ); 75 108 76 // Open nominated input file 77 bool ppMergeFileOpenInput(pmConfig *config, // Configuration 78 const pmFPAview *view, // View to open 79 int num // Number of file in sequence 109 /** 110 * Open nominated input file 111 */ 112 bool ppMergeFileOpenInput(pmConfig *config, ///< Configuration 113 const pmFPAview *view, ///< View to open 114 int num ///< Number of file in sequence 80 115 ); 81 116 82 // Set the data level for files specified by name; return an array of the files 83 psArray *ppMergeFileDataLevel(const pmConfig *config, // Configuration 84 const char *name, // Name of files 85 pmFPALevel level // Level for file data level 117 /** 118 * Set the data level for files specified by name; return an array of the files 119 */ 120 psArray *ppMergeFileDataLevel(const pmConfig *config, ///< Configuration 121 const char *name, ///< Name of files 122 pmFPALevel level ///< Level for file data level 86 123 ); 87 124 88 // Activate/deactivate a list of files 89 bool ppMergeFileActivate(const pmConfig *config, // Configuration 90 ppMergeFiles files, // Files to turn on/off 91 bool state // Activation state 125 /** 126 * Activate/deactivate a list of files 127 */ 128 bool ppMergeFileActivate(const pmConfig *config, ///< Configuration 129 ppMergeFiles files, ///< Files to turn on/off 130 bool state ///< Activation state 92 131 ); 93 132 94 // Activate/deactivate a single element for a list; return array of files 95 psArray *ppMergeFileActivateSingle(const pmConfig *config, // Configuration 96 ppMergeFiles files, // Files to turn on/off 97 bool state, // Activation state 98 int num // Number of file in sequence 133 /** 134 * Activate/deactivate a single element for a list; return array of files 135 */ 136 psArray *ppMergeFileActivateSingle(const pmConfig *config, ///< Configuration 137 ppMergeFiles files, ///< Files to turn on/off 138 bool state, ///< Activation state 139 int num ///< Number of file in sequence 99 140 ); 100 141 101 // Return name of output pmFPAfile 102 psString ppMergeOutputFile(const pmConfig *config // Configuration 142 /** 143 * Return name of output pmFPAfile 144 */ 145 psString ppMergeOutputFile(const pmConfig *config ///< Configuration 103 146 ); 104 147 105 148 106 // Allocator for group of files 149 /** 150 * Allocator for group of files 151 */ 107 152 ppMergeFileGroup *ppMergeFileGroupAlloc(void); 108 153 109 // Read chunk into the first available file group 110 ppMergeFileGroup *ppMergeReadChunk(bool *status, // Status of read 111 psArray *fileGroups, // All groups 112 pmConfig *config, // Configuration 113 int numChunk // Chunk number (only for interest) 154 /** 155 * Read chunk into the first available file group 156 */ 157 ppMergeFileGroup *ppMergeReadChunk(bool *status, ///< Status of read 158 psArray *fileGroups, ///< All groups 159 pmConfig *config, ///< Configuration 160 int numChunk ///< Chunk number (only for interest) 114 161 ); 115 162 116 // Set up thread handling 163 /** 164 * Set up thread handling 165 */ 117 166 bool ppMergeSetThreads(void); 118 167 168 ///@} 119 169 #endif -
branches/eam_branch_20081230/ppMerge/src/ppMergeArguments.c
r21087 r21238 1 /** @file ppMergeArguments.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.13.14.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 3 // Print usage information and die 4 static void usage(const char *program, // Name of the program 5 psMetadata *arguments // Command-line arguments 15 /** 16 * Print usage information and die 17 */ 18 static void usage(const char *program, ///< Name of the program 19 psMetadata *arguments ///< Command-line arguments 6 20 ) 7 21 { … … 18 32 } 19 33 20 // Get a float-point value from the command-line or recipe, and add it to the arguments 34 /** 35 * Get a float-point value from the command-line or recipe, and add it to the arguments 36 */ 21 37 #define VALUE_ARG_RECIPE_FLOAT(ARGNAME, RECIPENAME, TYPE) { \ 22 38 ps##TYPE value = psMetadataLookup##TYPE(NULL, arguments, ARGNAME); \ … … 33 49 } 34 50 35 // Get an integer value from the command-line or recipe, and add it to the arguments 51 /** 52 * Get an integer value from the command-line or recipe, and add it to the arguments 53 */ 36 54 #define VALUE_ARG_RECIPE_INT(ARGNAME, RECIPENAME, TYPE, UNSET) { \ 37 55 ps##TYPE value = psMetadataLookup##TYPE(NULL, arguments, ARGNAME); \ … … 48 66 } 49 67 50 // Get a boolean from the command-line or recipe, and add it to the arguments if either is set 68 /** 69 * Get a boolean from the command-line or recipe, and add it to the arguments if either is set 70 */ 51 71 #define VALUE_ARG_RECIPE_BOOL(ARGNAME, RECIPENAME) { \ 52 72 bool value = (psMetadataLookupBool(NULL, arguments, ARGNAME) || \ … … 55 75 } 56 76 57 // Get a statistic name from the command-line or recipe, and add the enum to the arguments 77 /** 78 * Get a statistic name from the command-line or recipe, and add the enum to the arguments 79 */ 58 80 #define VALUE_ARG_RECIPE_STAT(ARGNAME, RECIPENAME) { \ 59 81 const char *stat = psMetadataLookupStr(NULL, arguments, ARGNAME); \ … … 69 91 } 70 92 71 // Get a string from the command-line or recipe, and add to the arguments 93 /** 94 * Get a string from the command-line or recipe, and add to the arguments 95 */ 72 96 #define VALUE_ARG_RECIPE_STR(ARGNAME, RECIPENAME) { \ 73 97 const char *str = psMetadataLookupStr(NULL, arguments, ARGNAME); \ … … 83 107 } 84 108 85 // Get a string from the command-line or recipe, and add the appropriate mask value to the arguments 109 /** 110 * Get a string from the command-line or recipe, and add the appropriate mask value to the arguments 111 */ 86 112 #define VALUE_ARG_RECIPE_MASK(ARGNAME, RECIPENAME) { \ 87 113 const char *str = psMetadataLookupStr(NULL, arguments, ARGNAME); \ … … 98 124 } 99 125 100 // Get a string value from the command-line and add it to the target 101 static bool valueArgStr(psMetadata *arguments, // Command-line arguments 102 const char *argName, // Argument name in the command-line arguments 103 const char *mdName, // Name for value in the metadata 104 psMetadata *target // Target metadata to which to add value 126 /** 127 * Get a string value from the command-line and add it to the target 128 */ 129 static bool valueArgStr(psMetadata *arguments, ///< Command-line arguments 130 const char *argName, ///< Argument name in the command-line arguments 131 const char *mdName, ///< Name for value in the metadata 132 psMetadata *target ///< Target metadata to which to add value 105 133 ) 106 134 { 107 psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest135 psString value = psMetadataLookupStr(NULL, arguments, argName); ///< Value of interest 108 136 if (value && strlen(value) > 0) { 109 137 return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value); … … 116 144 assert(config); 117 145 118 psMetadata *arguments = psMetadataAlloc(); // Command-line arguments146 psMetadata *arguments = psMetadataAlloc(); ///< Command-line arguments 119 147 psMetadataAddStr(arguments, PS_LIST_TAIL, "-type", 0, "Type of calibration frame", NULL); 120 148 psMetadataAddStr(arguments, PS_LIST_TAIL, "-stats", 0, "MDC file to hold statistics ", NULL); … … 136 164 psMetadataAddStr(arguments, PS_LIST_TAIL, "-stdev", 0, "Statistic to use to measure the stdev", NULL); 137 165 138 / / Fringe construction parameters166 /** Fringe construction parameters */ 139 167 psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-num", 0, "Number of fringe regions", 0); 140 168 psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-size", 0, "Half-size of fringe regions", 0); … … 142 170 psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-ysmooth", 0, "Number of smoothing regions in y", 0); 143 171 144 / / Shutter construction parameters172 /** Shutter construction parameters */ 145 173 psMetadataAddS32(arguments, PS_LIST_TAIL, "-shutter-size", 0, "Size for shutter measurement regions", 0); 146 174 psMetadataAddS32(arguments, PS_LIST_TAIL, "-shutter-iter", 0, "Number of iterations for shutter", 0); 147 175 psMetadataAddF32(arguments, PS_LIST_TAIL, "-shutter-rej", 0, "Rejection limit for shutter", NAN); 148 176 149 / / Mask construction parameters177 /** Mask construction parameters */ 150 178 psMetadataAddF32(arguments, PS_LIST_TAIL, "-mask-suspect", 0, "Threshold for suspect pixels (sigma)", NAN); 151 179 psMetadataAddF32(arguments, PS_LIST_TAIL, "-mask-bad", 0, "Threshold for bad pixels (sigma)", NAN); … … 189 217 } 190 218 191 unsigned int numBad = 0; // Number of bad lines192 psMetadata *inputs = psMetadataConfigRead(NULL, &numBad, argv[1], false); // Information about inputs219 unsigned int numBad = 0; ///< Number of bad lines 220 psMetadata *inputs = psMetadataConfigRead(NULL, &numBad, argv[1], false); ///< Information about inputs 193 221 if (!inputs || numBad > 0) { 194 222 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to cleanly read MDC file with inputs."); … … 205 233 206 234 // Set the type of calibration frame 207 const char *typeStr = psMetadataLookupStr(NULL, arguments, "-type"); // Type of calibration208 if ( strlen(typeStr) <= 0) {235 const char *typeStr = psMetadataLookupStr(NULL, arguments, "-type"); ///<Type of calibration 236 if (!typeStr || strlen(typeStr) <= 0) { 209 237 psError(PS_ERR_UNKNOWN, false, "No -type specified."); 210 238 goto ERROR; 211 239 } 212 ppMergeType type = PPMERGE_TYPE_UNKNOWN; // Enumerated type for frame type240 ppMergeType type = PPMERGE_TYPE_UNKNOWN; ///< Enumerated type for frame type 213 241 if (strcasecmp(typeStr, "BIAS") == 0) { 214 242 type = PPMERGE_TYPE_BIAS; … … 258 286 } 259 287 260 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPMERGE_RECIPE); // Recipe for ppSim288 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPMERGE_RECIPE); ///< Recipe for ppSim 261 289 if (!recipe) { 262 290 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPMERGE_RECIPE); … … 264 292 } 265 293 266 / / Standard combination parameters294 /** Standard combination parameters */ 267 295 VALUE_ARG_RECIPE_INT("-rows", "ROWS", S32, 0); 268 296 VALUE_ARG_RECIPE_INT("-sample", "SAMPLE", S32, 0); … … 281 309 VALUE_ARG_RECIPE_STAT("-stdev", "STDEV"); 282 310 283 / / Fringe construction parameters311 /** Fringe construction parameters */ 284 312 VALUE_ARG_RECIPE_INT("-fringe-num", "FRINGE.NUM", S32, 0); 285 313 VALUE_ARG_RECIPE_INT("-fringe-size", "FRINGE.SIZE", S32, 0); … … 287 315 VALUE_ARG_RECIPE_INT("-fringe-ysmooth", "FRINGE.YSMOOTH", S32, 0); 288 316 289 / / Shutter construction parameters317 /** Shutter construction parameters */ 290 318 VALUE_ARG_RECIPE_INT("-shutter-size", "SHUTTER.SIZE", S32, 0); 291 319 292 / / Mask construction parameters320 /** Mask construction parameters */ 293 321 VALUE_ARG_RECIPE_FLOAT("-mask-suspect", "MASK.SUSPECT", F32); 294 322 VALUE_ARG_RECIPE_FLOAT("-mask-bad", "MASK.BAD", F32); … … 300 328 VALUE_ARG_RECIPE_FLOAT("-mask-smooth-scale", "MASK.SMOOTH.SCALE", F32); 301 329 302 const char *maskModeStr = psMetadataLookupStr(NULL, arguments, "-mask-mode"); // Mode to identify bad pix330 const char *maskModeStr = psMetadataLookupStr(NULL, arguments, "-mask-mode"); ///< Mode to identify bad pix 303 331 if (!maskModeStr) { 304 332 maskModeStr = psMetadataLookupStr(NULL, recipe, "MASK.MODE"); … … 318 346 319 347 if (type == PPMERGE_TYPE_DARK) { 320 psMetadata *ordinates = psMetadataLookupMetadata(NULL, recipe, "DARK.ORDINATES"); // Ordinates info321 psArray *translated = psArrayAllocEmpty(psListLength(ordinates->list)); // Translated version322 323 psMetadataIterator *iter = psMetadataIteratorAlloc(ordinates, PS_LIST_HEAD, NULL); // Iterator324 psMetadataItem *item; // Item from iteration348 psMetadata *ordinates = psMetadataLookupMetadata(NULL, recipe, "DARK.ORDINATES"); ///< Ordinates info 349 psArray *translated = psArrayAllocEmpty(psListLength(ordinates->list)); ///< Translated version 350 351 psMetadataIterator *iter = psMetadataIteratorAlloc(ordinates, PS_LIST_HEAD, NULL); ///< Iterator 352 psMetadataItem *item; ///< Item from iteration 325 353 while ((item = psMetadataGetAndIncrement(iter))) { 326 int order = 0; // Polynomial order327 bool scale = false; // Scale values?328 float min = NAN, max = NAN; // Minimum and maximum values for scaling354 int order = 0; ///< Polynomial order 355 bool scale = false; ///< Scale values? 356 float min = NAN, max = NAN; ///< Minimum and maximum values for scaling 329 357 switch (item->type) { 330 358 case PS_TYPE_S32: … … 333 361 case PS_DATA_METADATA: 334 362 order = psMetadataLookupS32(NULL, item->data.md, "ORDER"); 335 bool mdok; // Status of MD lookup363 bool mdok; ///< Status of MD lookup 336 364 scale = psMetadataLookupBool(&mdok, item->data.md, "SCALE"); 337 365 min = psMetadataLookupF32(&mdok, item->data.md, "MIN"); … … 361 389 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "DARK.ORDINATES", 0, 362 390 "Ordinates to fit for dark", translated); 363 psFree(translated); // Drop reference364 365 psString darkNorm = psMetadataLookupStr(NULL, recipe, "DARK.NORM"); // Normalisation concept391 psFree(translated); ///< Drop reference 392 393 psString darkNorm = psMetadataLookupStr(NULL, recipe, "DARK.NORM"); ///<Normalisation concept 366 394 if (darkNorm && strcmp(darkNorm, "NONE") != 0) { 367 395 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "DARK.NORM", 0, -
branches/eam_branch_20081230/ppMerge/src/ppMergeCamera.c
r21072 r21238 1 /** @file ppMergeCamera.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.7.18.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 3 // Define an output file, with its own FPA 4 bool outputFile(pmConfig *config, // Configuration 5 const char *name, // Name of output file 6 pmFPAfileType type, // Type of file 7 const char *description, // Description of file 8 psMetadata *format, // Camera format 9 pmFPAview *view // View for PHU 15 /** 16 * Define an output file, with its own FPA 17 */ 18 bool outputFile(pmConfig *config, ///< Configuration 19 const char *name, ///< Name of output file 20 pmFPAfileType type, ///< Type of file 21 const char *description, ///< Description of file 22 psMetadata *format, ///< Camera format 23 pmFPAview *view ///< View for PHU 10 24 ) 11 25 { … … 15 29 16 30 // Output image 17 pmFPA *fpa = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output31 pmFPA *fpa = pmFPAConstruct(config->camera, config->cameraName); ///< FPA to contain the output 18 32 if (!fpa) { 19 33 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration."); … … 84 98 bool haveWeights = false; // Do we have weight maps? 85 99 86 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame87 psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); // The inputs info88 psMetadataIterator *iter = psMetadataIteratorAlloc(inputs, PS_LIST_HEAD, NULL); // Iterator89 psMetadataItem *item; // Item from iteration90 int numFiles = 0; // Number of files100 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame 101 psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); ///< The inputs info 102 psMetadataIterator *iter = psMetadataIteratorAlloc(inputs, PS_LIST_HEAD, NULL); ///< Iterator 103 psMetadataItem *item; ///< Item from iteration 104 int numFiles = 0; ///< Number of files 91 105 while ((item = psMetadataGetAndIncrement(iter))) { 92 106 if (item->type != PS_DATA_METADATA) { … … 97 111 } 98 112 99 psMetadata *input = item->data.md; // The input metadata of interest100 101 psString image = psMetadataLookupStr(NULL, input, "IMAGE"); // Name of image113 psMetadata *input = item->data.md; ///< The input metadata of interest 114 115 psString image = psMetadataLookupStr(NULL, input, "IMAGE"); ///< Name of image 102 116 if (!image || strlen(image) == 0) { 103 117 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks IMAGE of type STR", item->name); … … 107 121 108 122 bool mdok; 109 psString mask = psMetadataLookupStr(&mdok, input, "MASK"); // Name of mask110 psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); // Name of weight map123 psString mask = psMetadataLookupStr(&mdok, input, "MASK"); ///< Name of mask 124 psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); ///< Name of weight map 111 125 112 126 // Add the image file 113 psArray *imageFiles = psArrayAlloc(1); // Array of filenames for this FPA127 psArray *imageFiles = psArrayAlloc(1); ///< Array of filenames for this FPA 114 128 imageFiles->data[0] = psMemIncrRefCounter(image); 115 129 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "IMAGE.FILENAMES", PS_META_REPLACE, … … 130 144 // Optionally add the mask file 131 145 if (mask && strlen(mask) > 0) { 132 psArray *maskFiles = psArrayAlloc(1); // Array of filenames for this FPA146 psArray *maskFiles = psArrayAlloc(1); ///< Array of filenames for this FPA 133 147 maskFiles->data[0] = psMemIncrRefCounter(mask); 134 148 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "MASK.FILENAMES", PS_META_REPLACE, … … 153 167 if (weight && strlen(weight) > 0) { 154 168 haveWeights = true; 155 psArray *weightFiles = psArrayAlloc(1); // Array of filenames for this FPA169 psArray *weightFiles = psArrayAlloc(1); ///< Array of filenames for this FPA 156 170 weightFiles->data[0] = psMemIncrRefCounter(weight); 157 171 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "WEIGHT.FILENAMES", PS_META_REPLACE, … … 219 233 } 220 234 221 psMetadata *format = NULL; // Camera format222 pmFPAview *phuView = NULL; // View to PHU235 psMetadata *format = NULL; ///< Camera format 236 pmFPAview *phuView = NULL; ///< View to PHU 223 237 for (int i = 0; i < numFiles; i++) { 224 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // File of interest225 pmFPA *fpa = input->fpa; // FPA of interest238 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< File of interest 239 pmFPA *fpa = input->fpa; ///< FPA of interest 226 240 CHECK_LEVEL(fpa->hdu, -1, -1); 227 psArray *chips = fpa->chips; // Array of chips241 psArray *chips = fpa->chips; ///< Array of chips 228 242 for (int j = 0; j < chips->n; j++) { 229 pmChip *chip = chips->data[j]; // Chip of interest243 pmChip *chip = chips->data[j]; ///< Chip of interest 230 244 CHECK_LEVEL(chip->hdu, j, -1); 231 psArray *cells = chip->cells; // Array of cells245 psArray *cells = chip->cells; ///< Array of cells 232 246 for (int k = 0; k < cells->n; k++) { 233 pmCell *cell = cells->data[k]; // Cell of interest247 pmCell *cell = cells->data[k]; ///< Cell of interest 234 248 CHECK_LEVEL(cell->hdu, j, k); 235 249 } … … 245 259 // Otherwise the abundance of metadata in the concepts (esp. for GPC) can overload the memory 246 260 for (int i = 0; i < numFiles; i++) { 247 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // File of interest248 pmFPA *fpa = input->fpa; // FPA of interest249 psArray *chips = fpa->chips; // Array of chips in output261 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< File of interest 262 pmFPA *fpa = input->fpa; ///< FPA of interest 263 psArray *chips = fpa->chips; ///< Array of chips in output 250 264 for (int i = 0; i < chips->n; i++) { 251 pmChip *chip = chips->data[i]; // Chip of interest252 psArray *cells = chip->cells; // Array of cells253 int culled = 0; // Number of culled cells265 pmChip *chip = chips->data[i]; ///< Chip of interest 266 psArray *cells = chip->cells; ///< Array of cells 267 int culled = 0; ///< Number of culled cells 254 268 for (int j = 0; j < cells->n; j++) { 255 269 pmCell *cell = cells->data[j]; 256 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // HDU for cell270 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); ///< HDU for cell 257 271 if (!hdu || hdu->blankPHU) { 258 272 cell->data_exists = false; … … 278 292 // Count the cells 279 293 { 280 int numCells = 0; // Number of cells281 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", 0); // Representative file282 pmFPA *fpa = input->fpa; // FPA for file283 psArray *chips = fpa->chips; // Array of chips294 int numCells = 0; ///< Number of cells 295 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", 0); ///< Representative file 296 pmFPA *fpa = input->fpa; ///< FPA for file 297 psArray *chips = fpa->chips; ///< Array of chips 284 298 for (int i = 0; i < chips->n; i++) { 285 pmChip *chip = chips->data[i]; // Chip of interest286 psArray *cells = chip->cells; // Array of cells299 pmChip *chip = chips->data[i]; ///< Chip of interest 300 psArray *cells = chip->cells; ///< Array of cells 287 301 for (int j = 0; j < cells->n; j++) { 288 pmCell *cell = cells->data[j]; // Cell of interest289 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // HDU that would have data302 pmCell *cell = cells->data[j]; ///< Cell of interest 303 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); ///< HDU that would have data 290 304 if (hdu && !hdu->blankPHU) { 291 305 numCells++; … … 298 312 } 299 313 300 psString outName = ppMergeOutputFile(config); // Name of output file301 302 pmFPAfileType fileType = PM_FPA_FILE_NONE; // Type of output file314 psString outName = ppMergeOutputFile(config); ///< Name of output file 315 316 pmFPAfileType fileType = PM_FPA_FILE_NONE; ///< Type of output file 303 317 switch (type) { 304 318 case PPMERGE_TYPE_BIAS: -
branches/eam_branch_20081230/ppMerge/src/ppMergeErrorCodes.c.in
r11259 r21238 1 /** @file ppMergeErrorCodes.c.in 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.1.54.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 13 #include "pslib.h" 14 #include "ppMergeErrorCodes.h" 15 1 16 /* 2 17 * The line … … 5 20 * will be replaced by values from errorCodes.dat 6 21 */ 7 #include "pslib.h"8 #include "ppMergeErrorCodes.h"9 10 22 void ppMergeErrorRegister(void) 11 23 { … … 14 26 { PPMERGE_ERR_${ErrorCode}, "${ErrorDescription}"}, 15 27 }; 16 static int nerror = PPMERGE_ERR_NERROR - PPMERGE_ERR_BASE; // number of values in enum28 static int nerror = PPMERGE_ERR_NERROR - PPMERGE_ERR_BASE; ///< number of values in enum 17 29 18 30 for (int i = 0; i < nerror; i++) { … … 21 33 *tmp = errors[i]; 22 34 psErrorRegister(tmp, 1); 23 psFree(tmp); / * it's on the internal list */35 psFree(tmp); // it's on the internal list 24 36 } 25 37 nerror = 0; // don't register more than once -
branches/eam_branch_20081230/ppMerge/src/ppMergeErrorCodes.h.in
r11260 r21238 1 /** @file ppMergeErrorCodes.h.in 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.1.54.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #if !defined(PPMERGE_ERROR_CODES_H) 2 14 #define PPMERGE_ERROR_CODES_H -
branches/eam_branch_20081230/ppMerge/src/ppMergeFileGroup.c
r21072 r21238 1 /** @file ppMergeFileGroup.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.2.18.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 # include "ppMerge.h" 2 14 -
branches/eam_branch_20081230/ppMerge/src/ppMergeFiles.c
r21072 r21238 1 /** @file ppMergeFiles.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.6.6.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 3 15 const char *allFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.WEIGHT", 4 16 "PPMERGE.OUTPUT", "PPMERGE.OUTPUT.COUNT", "PPMERGE.OUTPUT.SIGMA", 5 NULL }; // All files17 NULL }; ///< All files 6 18 const char *inputFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.WEIGHT", 7 NULL }; // Input files19 NULL }; ///< Input files 8 20 const char *outputFiles[] = { "PPMERGE.OUTPUT", "PPMERGE.OUTPUT.COUNT", "PPMERGE.OUTPUT.SIGMA", 9 NULL }; // Output files 10 11 // Select file list based on enum 21 NULL }; ///< Output files 22 23 /** 24 * Select file list based on enum 25 */ 12 26 static const char **selectFiles(ppMergeFiles files) 13 27 { -
branches/eam_branch_20081230/ppMerge/src/ppMergeLoop.c
r21087 r21238 1 /** @file ppMergeLoop.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.11.24.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 … … 5 17 assert(config); 6 18 7 psMetadata *arguments = config->arguments; // Arguments8 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame9 int numFiles = psMetadataLookupS32(NULL, arguments, "INPUTS.NUM"); // Number of input files10 bool mdok; // Status of MD lookup11 bool haveMasks = psMetadataLookupBool(&mdok, arguments, "INPUTS.MASKS"); // Do we have masks?12 bool haveWeights = psMetadataLookupBool(&mdok, arguments, "INPUTS.WEIGHTS"); // Do we have weights?13 14 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); // Input images15 psArray *masks = NULL, *weights = NULL; // Input masks and weights19 psMetadata *arguments = config->arguments; ///< Arguments 20 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame 21 int numFiles = psMetadataLookupS32(NULL, arguments, "INPUTS.NUM"); ///< Number of input files 22 bool mdok; ///< Status of MD lookup 23 bool haveMasks = psMetadataLookupBool(&mdok, arguments, "INPUTS.MASKS"); ///< Do we have masks? 24 bool haveWeights = psMetadataLookupBool(&mdok, arguments, "INPUTS.WEIGHTS"); ///< Do we have weights? 25 26 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); ///< Input images 27 psArray *masks = NULL, *weights = NULL; ///< Input masks and weights 16 28 if (haveMasks) { 17 29 masks = ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK", PM_FPA_LEVEL_READOUT); … … 21 33 } 22 34 23 / / General combination parameters24 int rows = psMetadataLookupS32(NULL, arguments, "ROWS"); // Number of rows to read per chunk25 int iter = psMetadataLookupS32(NULL, arguments, "ITER"); // Number of rejection iterations26 float rej = psMetadataLookupF32(NULL, arguments, "REJ"); // Rejection level27 float fraclow = psMetadataLookupF32(NULL, arguments, "FRACLOW"); // Reject fraction of low pixels28 float frachigh = psMetadataLookupF32(NULL, arguments, "FRACHIGH"); // Reject fraction of hi pixels29 int nKeep = psMetadataLookupS32(NULL, arguments, "NKEEP"); // Minimum number of values to keep30 psStatsOptions combineStat = psMetadataLookupS32(NULL, arguments, "COMBINE"); // Combination statistic31 bool useWeights = psMetadataLookupBool(NULL, arguments, "WEIGHTS"); // Use weights?32 33 / / Fringe parameters34 int fringeNum = psMetadataLookupS32(NULL, arguments, "FRINGE.NUM"); // Number of fringe points35 int fringeSize = psMetadataLookupS32(NULL, arguments, "FRINGE.SIZE"); // Size of fringe regions36 int fringeSmoothX = psMetadataLookupS32(NULL, arguments, "FRINGE.XSMOOTH"); // Smoothing regions in x37 int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); // Smoothing regions in y35 /** General combination parameters */ 36 int rows = psMetadataLookupS32(NULL, arguments, "ROWS"); ///< Number of rows to read per chunk 37 int iter = psMetadataLookupS32(NULL, arguments, "ITER"); ///< Number of rejection iterations 38 float rej = psMetadataLookupF32(NULL, arguments, "REJ"); ///< Rejection level 39 float fraclow = psMetadataLookupF32(NULL, arguments, "FRACLOW"); ///< Reject fraction of low pixels 40 float frachigh = psMetadataLookupF32(NULL, arguments, "FRACHIGH"); ///< Reject fraction of hi pixels 41 int nKeep = psMetadataLookupS32(NULL, arguments, "NKEEP"); ///< Minimum number of values to keep 42 psStatsOptions combineStat = psMetadataLookupS32(NULL, arguments, "COMBINE"); ///< Combination statistic 43 bool useWeights = psMetadataLookupBool(NULL, arguments, "WEIGHTS"); ///< Use weights? 44 45 /** Fringe parameters */ 46 int fringeNum = psMetadataLookupS32(NULL, arguments, "FRINGE.NUM"); ///* Number of fringe points 47 int fringeSize = psMetadataLookupS32(NULL, arguments, "FRINGE.SIZE"); ///* Size of fringe regions 48 int fringeSmoothX = psMetadataLookupS32(NULL, arguments, "FRINGE.XSMOOTH"); ///< Smoothing regions in x 49 int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); ///< Smoothing regions in y 38 50 39 51 // set the mask and mark bit values based on the named masks … … 45 57 } 46 58 47 pmCombineParams *combination = pmCombineParamsAlloc(combineStat); // Combination parameters59 pmCombineParams *combination = pmCombineParamsAlloc(combineStat); ///< Combination parameters 48 60 combination->maskVal = maskVal; 49 61 combination->blank = pmConfigMaskGet("BLANK", config); … … 55 67 combination->weights = useWeights; 56 68 57 psMetadata *stats = NULL; // Statistics for output69 psMetadata *stats = NULL; ///< Statistics for output 58 70 if (psMetadataLookup(config->arguments, "STATS.NAME")) { 59 71 stats = psMetadataAlloc(); … … 61 73 } 62 74 63 pmFPAview *view = pmFPAviewAlloc(0); // View to component of interest75 pmFPAview *view = pmFPAviewAlloc(0); ///< View to component of interest 64 76 65 77 // Retrieve data placed on analysis 66 psVector *scales = NULL, *zeros = NULL; // Scale and zeroes for combination67 psArray *shutters = NULL; // Shutter correction data78 psVector *scales = NULL, *zeros = NULL; ///< Scale and zeroes for combination 79 psArray *shutters = NULL; ///< Shutter correction data 68 80 switch (type) { 69 81 case PPMERGE_TYPE_FRINGE: … … 97 109 98 110 // Dark parameters 99 psArray *darkOrdinates = psMetadataLookupPtr(NULL, arguments, "DARK.ORDINATES"); // Dark info100 psString darkNorm = psMetadataLookupStr(&mdok, arguments, "DARK.NORM"); // Dark normalisation111 psArray *darkOrdinates = psMetadataLookupPtr(NULL, arguments, "DARK.ORDINATES"); ///< Dark info 112 psString darkNorm = psMetadataLookupStr(&mdok, arguments, "DARK.NORM"); ///< Dark normalisation 101 113 102 114 … … 105 117 goto ERROR; 106 118 } 107 psString outName = ppMergeOutputFile(config); // Name of output file108 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); // Output file119 psString outName = ppMergeOutputFile(config); ///< Name of output file 120 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); ///< Output file 109 121 psFree(outName); 110 122 assert(output && output->fpa); 111 pmFPA *outFPA = output->fpa; // Output FPA112 int cellNum = 0; // Index of cell123 pmFPA *outFPA = output->fpa; ///< Output FPA 124 int cellNum = 0; ///< Index of cell 113 125 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 114 126 goto ERROR; 115 127 } 116 pmChip *outChip; // Chip of interest128 pmChip *outChip; ///< Chip of interest 117 129 while ((outChip = pmFPAviewNextChip(view, outFPA, 1))) { 118 130 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 119 131 goto ERROR; 120 132 } 121 pmCell *outCell; // Cell of interest133 pmCell *outCell; ///< Cell of interest 122 134 while ((outCell = pmFPAviewNextCell(view, outFPA, 1))) { 123 135 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { … … 125 137 } 126 138 127 pmHDU *hdu = pmHDUGetLowest(outFPA, outChip, outCell); // HDU for cell139 pmHDU *hdu = pmHDUGetLowest(outFPA, outChip, outCell); ///< HDU for cell 128 140 if (!hdu || hdu->blankPHU) { 129 141 // No data here … … 133 145 pmReadout *outRO = pmReadoutAlloc(outCell); 134 146 135 psArray *readouts = psArrayAlloc(numFiles); // Input readouts147 psArray *readouts = psArrayAlloc(numFiles); ///< Input readouts 136 148 for (int i = 0; i < numFiles; i++) { 137 149 // We need to do some of the opening ourselves … … 142 154 143 155 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); 144 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); // Input cell156 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); ///< Input cell 145 157 readouts->data[i] = pmReadoutAlloc(inCell); 146 158 } 147 159 148 float shutterRef = NAN; // Reference shutter correction160 float shutterRef = NAN; ///< Reference shutter correction 149 161 if (type == PPMERGE_TYPE_SHUTTER) { 150 162 shutterRef = pmShutterCorrectionReference(shutters->data[cellNum]); … … 156 168 psTrace("ppStack", 2, "Initial stack of chunk %d....\n", numChunk); 157 169 for (int i = 0; i < numFiles; i++) { 158 pmReadout *inRO = readouts->data[i]; // Input readout170 pmReadout *inRO = readouts->data[i]; ///< Input readout 159 171 160 172 // Read a chunk from a file … … 229 241 230 242 // Get list of cells for concepts averaging 231 psList *inCells = psListAlloc(NULL); // List of cells243 psList *inCells = psListAlloc(NULL); ///< List of cells 232 244 for (int i = 0; i < numFiles; i++) { 233 pmReadout *readout = readouts->data[i]; // Readout of interest245 pmReadout *readout = readouts->data[i]; ///< Readout of interest 234 246 psListAdd(inCells, PS_LIST_TAIL, readout->parent); 235 247 } … … 247 259 { 248 260 pmCell *countsCell = pmFPAfileThisCell(config->files, view, "PPMERGE.OUTPUT.COUNT"); 249 pmReadout *countsRO = pmReadoutAlloc(countsCell); // Readout with count of inputs per pixel261 pmReadout *countsRO = pmReadoutAlloc(countsCell); ///< Readout with count of inputs per pixel 250 262 psImage *counts = psMetadataLookupPtr(NULL, outRO->analysis, PM_READOUT_STACK_ANALYSIS_COUNT); 251 263 countsRO->image = psImageCopy(countsRO->image, counts, PS_TYPE_F32); … … 254 266 psFree(countsRO); 255 267 268 // XXX EAM 2009.01.18 : sigmaCell and countsCell need to have their concepts copied from outCell. 269 // This was causing segfaults for VYSOS5; Why did this ever work for SIMTEST? 270 if (!pmConceptsCopyCell(countsCell, outCell)) { 271 psError(PS_ERR_UNKNOWN, false, "Unable to copy cell concepts."); 272 psFree(outRO); 273 goto ERROR; 274 } 275 256 276 pmCell *sigmaCell = pmFPAfileThisCell(config->files, view, "PPMERGE.OUTPUT.SIGMA"); 257 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); // Readout with stdev per pixel277 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); ///< Readout with stdev per pixel 258 278 psImage *sigma = psMetadataLookupPtr(NULL, outRO->analysis, PM_READOUT_STACK_ANALYSIS_SIGMA); 259 279 sigmaRO->image = psImageCopy(sigmaRO->image, sigma, PS_TYPE_F32); … … 261 281 sigmaRO->data_exists = sigmaCell->data_exists = sigmaCell->parent->data_exists = true; 262 282 psFree(sigmaRO); 283 284 if (!pmConceptsCopyCell(sigmaCell, outCell)) { 285 psError(PS_ERR_UNKNOWN, false, "Unable to copy cell concepts."); 286 psFree(outRO); 287 goto ERROR; 288 } 263 289 } 264 290 … … 283 309 } 284 310 285 psArray *fringes = psArrayAlloc(1); // Array of fringes311 psArray *fringes = psArrayAlloc(1); ///< Array of fringes 286 312 fringes->data[0] = fringe; 287 313 … … 322 348 323 349 // Get list of FPAs for concepts averaging 324 psList *inFPAs = psListAlloc(NULL); // List of FPAs350 psList *inFPAs = psListAlloc(NULL); ///< List of FPAs 325 351 for (int i = 0; i < numFiles; i++) { 326 pmFPAfile *input = inputs->data[i]; // Input file352 pmFPAfile *input = inputs->data[i]; ///< Input file 327 353 psListAdd(inFPAs, PS_LIST_TAIL, input->fpa); 328 354 } -
branches/eam_branch_20081230/ppMerge/src/ppMergeLoop_Threaded.c
r21087 r21238 1 /** @file ppMergeLoop_Threaded.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.5.18.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifdef HAVE_CONFIG_H 2 14 #include <config.h> … … 19 31 assert(config); 20 32 21 psMetadata *arguments = config->arguments; // Arguments22 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame23 int numFiles = psMetadataLookupS32(NULL, arguments, "INPUTS.NUM"); // Number of input files24 bool mdok; // Status of MD lookup33 psMetadata *arguments = config->arguments; ///< Arguments 34 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame 35 int numFiles = psMetadataLookupS32(NULL, arguments, "INPUTS.NUM"); ///< Number of input files 36 bool mdok; ///< Status of MD lookup 25 37 bool haveMasks = psMetadataLookupBool(&mdok, arguments, "INPUTS.MASKS"); // Do we have masks? 26 bool haveWeights = psMetadataLookupBool(&mdok, arguments, "INPUTS.WEIGHTS"); // Do we have weights?27 28 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); // Input images29 psArray *masks = NULL, *weights = NULL; // Input masks and weights38 bool haveWeights = psMetadataLookupBool(&mdok, arguments, "INPUTS.WEIGHTS"); ///< Do we have weights? 39 40 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); ///< Input images 41 psArray *masks = NULL, *weights = NULL; ///< Input masks and weights 30 42 if (haveMasks) { 31 43 masks = ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK", PM_FPA_LEVEL_READOUT); … … 38 50 if (!mdok) nThreads = 0; 39 51 40 / / General combination parameters41 int iter = psMetadataLookupS32(NULL, arguments, "ITER"); // Number of rejection iterations42 float rej = psMetadataLookupF32(NULL, arguments, "REJ"); // Rejection level43 float fraclow = psMetadataLookupF32(NULL, arguments, "FRACLOW"); // Reject fraction of low pixels44 float frachigh = psMetadataLookupF32(NULL, arguments, "FRACHIGH"); // Reject fraction of hi pixels45 int nKeep = psMetadataLookupS32(NULL, arguments, "NKEEP"); // Minimum number of values to keep46 psStatsOptions combineStat = psMetadataLookupS32(NULL, arguments, "COMBINE"); // Combination statistic47 bool useWeights = psMetadataLookupBool(NULL, arguments, "WEIGHTS"); // Use weights?48 49 / / Fringe parameters50 int fringeNum = psMetadataLookupS32(NULL, arguments, "FRINGE.NUM"); // Number of fringe points51 int fringeSize = psMetadataLookupS32(NULL, arguments, "FRINGE.SIZE"); // Size of fringe regions52 int fringeSmoothX = psMetadataLookupS32(NULL, arguments, "FRINGE.XSMOOTH"); // Smoothing regions in x53 int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); // Smoothing regions in y52 /** General combination parameters */ 53 int iter = psMetadataLookupS32(NULL, arguments, "ITER"); ///< Number of rejection iterations 54 float rej = psMetadataLookupF32(NULL, arguments, "REJ"); ///< Rejection level 55 float fraclow = psMetadataLookupF32(NULL, arguments, "FRACLOW"); ///< Reject fraction of low pixels 56 float frachigh = psMetadataLookupF32(NULL, arguments, "FRACHIGH"); ///< Reject fraction of hi pixels 57 int nKeep = psMetadataLookupS32(NULL, arguments, "NKEEP"); ///< Minimum number of values to keep 58 psStatsOptions combineStat = psMetadataLookupS32(NULL, arguments, "COMBINE"); ///< Combination statistic 59 bool useWeights = psMetadataLookupBool(NULL, arguments, "WEIGHTS"); ///< Use weights? 60 61 /** Fringe parameters */ 62 int fringeNum = psMetadataLookupS32(NULL, arguments, "FRINGE.NUM"); ///< Number of fringe points 63 int fringeSize = psMetadataLookupS32(NULL, arguments, "FRINGE.SIZE"); ///< Size of fringe regions 64 int fringeSmoothX = psMetadataLookupS32(NULL, arguments, "FRINGE.XSMOOTH"); ///< Smoothing regions in x 65 int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); ///< Smoothing regions in y 54 66 55 67 // set the mask and mark bit values based on the named masks … … 61 73 } 62 74 63 pmCombineParams *combination = pmCombineParamsAlloc(combineStat); // Combination parameters75 pmCombineParams *combination = pmCombineParamsAlloc(combineStat); ///< Combination parameters 64 76 combination->maskVal = maskVal; 65 77 combination->blank = pmConfigMaskGet("BLANK", config); … … 71 83 combination->weights = useWeights; 72 84 73 psMetadata *stats = NULL; // Statistics for output85 psMetadata *stats = NULL; ///< Statistics for output 74 86 if (psMetadataLookup(config->arguments, "STATS.NAME")) { 75 87 stats = psMetadataAlloc(); … … 80 92 81 93 // Retrieve data placed on analysis 82 psVector *scales = NULL, *zeros = NULL; // Scale and zeroes for combination83 psArray *shutters = NULL; // Shutter correction data94 psVector *scales = NULL, *zeros = NULL; ///< Scale and zeroes for combination 95 psArray *shutters = NULL; ///< Shutter correction data 84 96 switch (type) { 85 97 case PPMERGE_TYPE_FRINGE: … … 113 125 114 126 // Dark parameters 115 psArray *darkOrdinates = psMetadataLookupPtr(NULL, arguments, "DARK.ORDINATES"); // Dark info116 psString darkNorm = psMetadataLookupStr(&mdok, arguments, "DARK.NORM"); // Dark normalisation127 psArray *darkOrdinates = psMetadataLookupPtr(NULL, arguments, "DARK.ORDINATES"); ///< Dark info 128 psString darkNorm = psMetadataLookupStr(&mdok, arguments, "DARK.NORM"); ///< Dark normalisation 117 129 118 130 … … 121 133 goto ERROR; 122 134 } 123 psString outName = ppMergeOutputFile(config); // Name of output file124 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); // Output file135 psString outName = ppMergeOutputFile(config); ///< Name of output file 136 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); ///< Output file 125 137 psFree(outName); 126 138 assert(output && output->fpa); 127 pmFPA *outFPA = output->fpa; // Output FPA128 int cellNum = 0; // Index of cell139 pmFPA *outFPA = output->fpa; ///< Output FPA 140 int cellNum = 0; ///< Index of cell 129 141 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 130 142 goto ERROR; 131 143 } 132 pmChip *outChip; // Chip of interest144 pmChip *outChip; ///< Chip of interest 133 145 while ((outChip = pmFPAviewNextChip(view, outFPA, 1))) { 134 146 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 135 147 goto ERROR; 136 148 } 137 pmCell *outCell; // Cell of interest149 pmCell *outCell; ///< Cell of interest 138 150 while ((outCell = pmFPAviewNextCell(view, outFPA, 1))) { 139 151 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { … … 141 153 } 142 154 143 pmHDU *hdu = pmHDUGetLowest(outFPA, outChip, outCell); // HDU for cell155 pmHDU *hdu = pmHDUGetLowest(outFPA, outChip, outCell); ///< HDU for cell 144 156 if (!hdu || hdu->blankPHU) { 145 157 // No data here … … 147 159 } 148 160 149 float shutterRef = NAN; // Reference shutter correction161 float shutterRef = NAN; ///< Reference shutter correction 150 162 pmReadout *pattern = NULL; 151 163 if (type == PPMERGE_TYPE_SHUTTER) { … … 169 181 // Generate readouts for each input file in each file group 170 182 for (int i = 0; i < fileGroups->n; i++) { 171 psArray *readouts = psArrayAlloc(numFiles); // Input readouts183 psArray *readouts = psArrayAlloc(numFiles); ///< Input readouts 172 184 for (int j = 0; j < numFiles; j++) { 173 185 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", j); 174 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); // Input cell186 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); ///< Input cell 175 187 readouts->data[j] = pmReadoutAlloc(inCell); 176 188 } … … 234 246 case PPMERGE_TYPE_FLAT: 235 247 case PPMERGE_TYPE_FRINGE: { 236 psThreadJob *job = psThreadJobAlloc("PPMERGE_READOUT_COMBINE"); // Job to start248 psThreadJob *job = psThreadJobAlloc("PPMERGE_READOUT_COMBINE"); ///< Job to start 237 249 238 250 // Construct the arguments for this job … … 250 262 } 251 263 case PPMERGE_TYPE_DARK: { 252 psThreadJob *job = psThreadJobAlloc ("PPMERGE_DARK_COMBINE"); // Job to start264 psThreadJob *job = psThreadJobAlloc ("PPMERGE_DARK_COMBINE"); ///< Job to start 253 265 254 266 // construct the arguments for this job … … 311 323 for (int i = 0; i < numFiles; i++) { 312 324 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); 313 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); // Input cell325 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); ///< Input cell 314 326 psListAdd(inCells, PS_LIST_TAIL, inCell); 315 327 } … … 325 337 { 326 338 pmCell *countsCell = pmFPAfileThisCell(config->files, view, "PPMERGE.OUTPUT.COUNT"); 327 pmReadout *countsRO = pmReadoutAlloc(countsCell); // Readout with count of inputs per pixel339 pmReadout *countsRO = pmReadoutAlloc(countsCell); ///< Readout with count of inputs per pixel 328 340 psImage *counts = psMetadataLookupPtr(NULL, outRO->analysis, PM_READOUT_STACK_ANALYSIS_COUNT); 329 341 countsRO->image = psImageCopy(countsRO->image, counts, PS_TYPE_F32); … … 332 344 psFree(countsRO); 333 345 346 // XXX EAM 2009.01.18 : sigmaCell and countsCell need to have their concepts copied from outCell. 347 // This was causing segfaults for VYSOS5; Why did this ever work for SIMTEST? 348 if (!pmConceptsCopyCell(countsCell, outCell)) { 349 psError(PS_ERR_UNKNOWN, false, "Unable to copy cell concepts."); 350 psFree(outRO); 351 goto ERROR; 352 } 353 334 354 pmCell *sigmaCell = pmFPAfileThisCell(config->files, view, "PPMERGE.OUTPUT.SIGMA"); 335 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); // Readout with stdev per pixel355 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); ///< Readout with stdev per pixel 336 356 psImage *sigma = psMetadataLookupPtr(NULL, outRO->analysis, PM_READOUT_STACK_ANALYSIS_SIGMA); 337 357 sigmaRO->image = psImageCopy(sigmaRO->image, sigma, PS_TYPE_F32); … … 339 359 sigmaRO->data_exists = sigmaCell->data_exists = sigmaCell->parent->data_exists = true; 340 360 psFree(sigmaRO); 361 362 if (!pmConceptsCopyCell(sigmaCell, outCell)) { 363 psError(PS_ERR_UNKNOWN, false, "Unable to copy cell concepts."); 364 psFree(outRO); 365 goto ERROR; 366 } 341 367 } 342 368 … … 361 387 } 362 388 363 psArray *fringes = psArrayAlloc(1); // Array of fringes389 psArray *fringes = psArrayAlloc(1); ///< Array of fringes 364 390 fringes->data[0] = fringe; 365 391 … … 400 426 401 427 // Get list of FPAs for concepts averaging 402 psList *inFPAs = psListAlloc(NULL); // List of FPAs428 psList *inFPAs = psListAlloc(NULL); ///< List of FPAs 403 429 for (int i = 0; i < numFiles; i++) { 404 pmFPAfile *input = inputs->data[i]; // Input file430 pmFPAfile *input = inputs->data[i]; ///< Input file 405 431 psListAdd(inFPAs, PS_LIST_TAIL, input->fpa); 406 432 } -
branches/eam_branch_20081230/ppMerge/src/ppMergeMask.c
r21087 r21238 1 /** @file ppMergeMask.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.15.24.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 3 static bool mergeMask(pmConfig *config, // Configuration4 const pmFPAview *view, // View to chip5 bool writeOut, // Write output?6 psRandom *rng, // Random number generator7 psMetadata *stats // Statistics output15 static bool mergeMask(pmConfig *config, ///< Configuration 16 const pmFPAview *view, ///< View to chip 17 bool writeOut, ///< Write output? 18 psRandom *rng, ///< Random number generator 19 psMetadata *stats ///< Statistics output 8 20 ) 9 21 { … … 12 24 assert(view->chip != -1 && view->cell == -1 && view->readout == -1); 13 25 14 bool mdok; // Status of MD lookup15 int numFiles = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of input files16 psStatsOptions meanStat = psMetadataLookupS32(NULL, config->arguments, "MEAN"); // Statistic for mean17 psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); // Statistic for stdev18 int sample = psMetadataLookupS32(NULL, config->arguments, "SAMPLE"); // Size of sample for statistics19 bool chipStats = psMetadataLookupBool(&mdok, config->arguments, "MASK.CHIPSTATS"); // Statistics on chip?20 float maskSuspect = psMetadataLookupF32(NULL, config->arguments, "MASK.SUSPECT"); // Threshold for suspect pixels21 float maskBad = psMetadataLookupF32(NULL, config->arguments, "MASK.BAD"); // Threshold for bad pixels22 pmMaskIdentifyMode maskMode = psMetadataLookupS32(NULL, config->arguments, "MASK.MODE"); // Mode for identifying bad pixels23 int maskGrow = psMetadataLookupS32(NULL, config->arguments, "MASK.GROW"); // Radius to grow mask24 25 bool smoothSuspect = psMetadataLookupBool(&mdok, config->arguments, "MASK.SMOOTH.SUSPECT"); // Radius to grow mask26 float smoothScale = psMetadataLookupF32(&mdok, config->arguments, "MASK.SMOOTH.SCALE"); // Radius to grow mask26 bool mdok; ///< Status of MD lookup 27 int numFiles = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); ///< Number of input files 28 psStatsOptions meanStat = psMetadataLookupS32(NULL, config->arguments, "MEAN"); ///< Statistic for mean 29 psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); ///< Statistic for stdev 30 int sample = psMetadataLookupS32(NULL, config->arguments, "SAMPLE"); ///< Size of sample for statistics 31 bool chipStats = psMetadataLookupBool(&mdok, config->arguments, "MASK.CHIPSTATS"); ///< Statistics on chip? 32 float maskSuspect = psMetadataLookupF32(NULL, config->arguments, "MASK.SUSPECT"); ///< Threshold for suspect pixels 33 float maskBad = psMetadataLookupF32(NULL, config->arguments, "MASK.BAD"); ///< Threshold for bad pixels 34 pmMaskIdentifyMode maskMode = psMetadataLookupS32(NULL, config->arguments, "MASK.MODE"); ///< Mode for identifying bad pixels 35 int maskGrow = psMetadataLookupS32(NULL, config->arguments, "MASK.GROW"); ///< Radius to grow mask 36 37 bool smoothSuspect = psMetadataLookupBool(&mdok, config->arguments, "MASK.SMOOTH.SUSPECT"); ///< Radius to grow mask 38 float smoothScale = psMetadataLookupF32(&mdok, config->arguments, "MASK.SMOOTH.SCALE"); ///< Radius to grow mask 27 39 28 40 psImageMaskType markVal; … … 40 52 } 41 53 42 psStats *statistics = psStatsAlloc(meanStat | stdevStat); // Statistics for background43 44 psString outName = ppMergeOutputFile(config); // Name of output file45 pmChip *outChip = pmFPAfileThisChip(config->files, view, outName); // Output chip54 psStats *statistics = psStatsAlloc(meanStat | stdevStat); ///< Statistics for background 55 56 psString outName = ppMergeOutputFile(config); ///< Name of output file 57 pmChip *outChip = pmFPAfileThisChip(config->files, view, outName); ///< Output chip 46 58 psFree(outName); 47 59 … … 58 70 59 71 // For each input file, get the statistics, which can be calculated at the chip or cell levels 60 psVector *values = psVectorAlloc(sample, PS_TYPE_F32); // Pixel values for statistics61 pmFPAview *inView = pmFPAviewAlloc(0); // View for input72 psVector *values = psVectorAlloc(sample, PS_TYPE_F32); ///< Pixel values for statistics 73 pmFPAview *inView = pmFPAviewAlloc(0); ///< View for input 62 74 for (int i = 0; i < numFiles; i++) { 63 75 pmFPAfileActivate(config->files, false, NULL); 64 psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); // Input files65 pmFPAfile *input = files->data[0]; // Input file76 psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); ///< Input files 77 pmFPAfile *input = files->data[0]; ///< Input file 66 78 psFree(files); 67 pmFPA *inFPA = input->fpa; // Input FPA79 pmFPA *inFPA = input->fpa; ///< Input FPA 68 80 *inView = *view; 69 81 70 int valueIndex = 0; // Index for vector of pixel values71 72 pmCell *inCell; // Input cell82 int valueIndex = 0; ///< Index for vector of pixel values 83 84 pmCell *inCell; ///< Input cell 73 85 while ((inCell = pmFPAviewNextCell(inView, inFPA, 1))) { 74 86 75 87 // the output FPA structure carries the information about which cells to process 76 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); // Output cell88 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); ///< Output cell 77 89 if (!outCell->process) continue; 78 90 79 pmHDU *hdu = pmHDUFromCell(inCell); // HDU for cell91 pmHDU *hdu = pmHDUFromCell(inCell); ///< HDU for cell 80 92 if (!hdu || hdu->blankPHU) { 81 93 // No data here … … 106 118 pmReadout *readout; 107 119 if (inCell->readouts && inCell->readouts->n == 1) { 108 readout = psMemIncrRefCounter(inCell->readouts->data[0]); // Input readout120 readout = psMemIncrRefCounter(inCell->readouts->data[0]); ///< Input readout 109 121 } else { 110 122 readout = pmReadoutAlloc(inCell); … … 118 130 } 119 131 120 pmReadout *outRO = NULL; // Output readout132 pmReadout *outRO = NULL; ///< Output readout 121 133 if (outCell->readouts && outCell->readouts->n == 1) { 122 134 outRO = psMemIncrRefCounter(outCell->readouts->data[0]); … … 124 136 outRO = pmReadoutAlloc(outCell); 125 137 } 126 psImage *outMask = outRO->mask; // Output mask image (for iterative generation of mask)127 128 psImage *image = readout->image, *mask = readout->mask; // Image and mask129 int numCols = readout->image->numCols, numRows = readout->image->numRows; // Image size130 int numPix = numCols * numRows; // Number of pixels131 int num = PS_MIN(numPix, sample / numCells); // Number of values to add138 psImage *outMask = outRO->mask; ///< Output mask image (for iterative generation of mask) 139 140 psImage *image = readout->image, *mask = readout->mask; ///< Image and mask 141 int numCols = readout->image->numCols, numRows = readout->image->numRows; ///< Image size 142 int numPix = numCols * numRows; ///< Number of pixels 143 int num = PS_MIN(numPix, sample / numCells); ///< Number of values to add 132 144 if (!chipStats) { 133 145 valueIndex = 0; … … 187 199 188 200 // the output FPA structure carries the information about which cells to process 189 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); // Output cell201 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); ///< Output cell 190 202 if (!outCell->process) continue; 191 203 192 pmHDU *hdu = pmHDUFromCell(inCell); // HDU for cell204 pmHDU *hdu = pmHDUFromCell(inCell); ///< HDU for cell 193 205 if (!hdu || hdu->blankPHU) continue; 194 206 195 pmReadout *readout = inCell->readouts->data[0]; // Readout of interest207 pmReadout *readout = inCell->readouts->data[0]; ///< Readout of interest 196 208 197 209 inView->readout = 0; … … 225 237 ppMergeFileActivate(config, PPMERGE_FILES_OUTPUT, true); 226 238 } 227 pmFPA *outFPA = outChip->parent; // Output FPA228 pmCell *outCell; // Output cell229 pmFPAview *outView = pmFPAviewAlloc(0); // View into output FPA239 pmFPA *outFPA = outChip->parent; ///< Output FPA 240 pmCell *outCell; ///< Output cell 241 pmFPAview *outView = pmFPAviewAlloc(0); ///< View into output FPA 230 242 *outView = *view; 231 243 while ((outCell = pmFPAviewNextCell(outView, outFPA, 1))) { … … 234 246 if (!outCell->process) continue; 235 247 236 pmHDU *hdu = pmHDUFromCell(outCell); // HDU for cell248 pmHDU *hdu = pmHDUFromCell(outCell); ///< HDU for cell 237 249 if (!hdu || hdu->blankPHU) continue; 238 250 … … 240 252 241 253 assert(outCell->readouts && outCell->readouts->n == 1); 242 pmReadout *outRO = outCell->readouts->data[0]; // Output readout254 pmReadout *outRO = outCell->readouts->data[0]; ///< Output readout 243 255 244 256 if (smoothSuspect) { 245 257 // XXX test output of suspect pixel image 246 psImage *suspects = psMetadataLookupPtr(NULL, outRO->analysis, PM_MASK_ANALYSIS_SUSPECT); // Suspect img258 psImage *suspects = psMetadataLookupPtr(NULL, outRO->analysis, PM_MASK_ANALYSIS_SUSPECT); ///< Suspect img 247 259 assert (suspects); 248 psImageSmooth (suspects, smoothScale, 3); // extend smoothing region to 3-sigma260 psImageSmooth (suspects, smoothScale, 3); ///< extend smoothing region to 3-sigma 249 261 } 250 262 … … 259 271 // The counts image is fairly useless, but it preserves the model 260 272 pmCell *countsCell = pmFPAfileThisCell(config->files, outView, "PPMERGE.OUTPUT.COUNT"); 261 pmReadout *countsRO = pmReadoutAlloc(countsCell); // Readout with count of inputs per pixel273 pmReadout *countsRO = pmReadoutAlloc(countsCell); ///< Readout with count of inputs per pixel 262 274 countsRO->image = psImageAlloc(outRO->mask->numCols, outRO->mask->numRows, PS_TYPE_F32); 263 275 psImageInit(countsRO->image, numFiles); … … 266 278 267 279 pmCell *sigmaCell = pmFPAfileThisCell(config->files, outView, "PPMERGE.OUTPUT.SIGMA"); 268 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); // Readout with suspect image280 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); ///< Readout with suspect image 269 281 psImage *suspect = psMetadataLookupPtr(NULL, outRO->analysis, PM_MASK_ANALYSIS_SUSPECT); 270 282 sigmaRO->image = psImageCopy(sigmaRO->image, suspect, PS_TYPE_F32); … … 275 287 276 288 if (maskGrow > 0) { 277 psImage *grown = psImageGrowMask(NULL, outRO->mask, maskValOut, maskGrow, maskValOut); // Grown mask289 psImage *grown = psImageGrowMask(NULL, outRO->mask, maskValOut, maskGrow, maskValOut); ///< Grown mask 278 290 psFree(outRO->mask); 279 291 outRO->mask = grown; … … 289 301 290 302 // Average concepts 291 psList *cells = psListAlloc(NULL); // List of cells, for concept averaging303 psList *cells = psListAlloc(NULL); ///< List of cells, for concept averaging 292 304 for (int i = 0; i < numFiles; i++) { 293 pmFPAfile *inFile = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // Input file294 pmCell *inCell = pmFPAviewThisCell(outView, inFile->fpa); // Input cell305 pmFPAfile *inFile = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< Input file 306 pmCell *inCell = pmFPAviewThisCell(outView, inFile->fpa); ///< Input cell 295 307 psListAdd(cells, PS_LIST_TAIL, inCell); 296 308 } … … 340 352 assert(config); 341 353 342 bool mdok; // Status of MD lookup343 int numFiles = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs344 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks?345 bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); // Do we have weights?346 int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Number of rejection iterations354 bool mdok; ///< Status of MD lookup 355 int numFiles = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); ///< Number of inputs 356 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); ///< Do we have masks? 357 bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); ///< Do we have weights? 358 int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); ///< Number of rejection iterations 347 359 348 360 PS_ASSERT_INT_POSITIVE(iter, false); 349 361 350 pmFPAview *view = pmFPAviewAlloc(0); // View to component of interest351 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator352 353 psMetadata *stats = NULL; // Statistics for output362 pmFPAview *view = pmFPAviewAlloc(0); ///< View to component of interest 363 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); ///< Random number generator 364 365 psMetadata *stats = NULL; ///< Statistics for output 354 366 if (psMetadataLookup(config->arguments, "STATS.NAME")) { 355 367 stats = psMetadataAlloc(); … … 357 369 } 358 370 359 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); // Input images371 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); ///< Input images 360 372 psFree(inputs); 361 373 if (haveMasks) { … … 380 392 // for the input masks. 381 393 382 psString outName = ppMergeOutputFile(config); // Name of output file383 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); // Output file394 psString outName = ppMergeOutputFile(config); ///< Name of output file 395 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); ///< Output file 384 396 psFree(outName); 385 397 assert(output && output->fpa); 386 pmFPA *outFPA = output->fpa; // Output FPA398 pmFPA *outFPA = output->fpa; ///< Output FPA 387 399 388 400 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 389 401 goto PPMERGE_MASK_ERROR; 390 402 } 391 pmChip *outChip; // Chip of interest403 pmChip *outChip; ///< Chip of interest 392 404 while ((outChip = pmFPAviewNextChip(view, outFPA, 1))) { 393 405 … … 408 420 psList *inChips = psListAlloc(NULL); 409 421 for (int i=0; i < numFiles; i++) { 410 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // Input file422 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< Input file 411 423 pmChip *chip = pmFPAviewThisChip(view, file->fpa); 412 424 psListAdd(inChips, PS_LIST_TAIL, chip); … … 427 439 } 428 440 429 psList *fpaList = psListAlloc(NULL);// List of FPAs for concept averaging441 psList *fpaList = psListAlloc(NULL);///< List of FPAs for concept averaging 430 442 for (int i = 0; i < numFiles; i++) { 431 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // Input file443 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< Input file 432 444 psListAdd(fpaList, PS_LIST_TAIL, file->fpa); 433 445 } -
branches/eam_branch_20081230/ppMerge/src/ppMergeReadChunk.c
r21072 r21238 1 /** @file ppMergeReadChunk.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.4.18.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 # include "ppMerge.h" 2 14 3 #define THREAD_WAIT 10000 // Microseconds to wait if thread is not available15 #define THREAD_WAIT 10000 ///< Microseconds to wait if thread is not available 4 16 5 17 ppMergeFileGroup *ppMergeReadChunk(bool *status, psArray *fileGroups, pmConfig *config, int numChunk) … … 8 20 9 21 bool mdok; 10 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks?11 bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS");// Do we have weights?12 int rows = psMetadataLookupS32(NULL, config->arguments, "ROWS"); // Number of rows to read per chunk22 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); ///< Do we have masks? 23 bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS");///< Do we have weights? 24 int rows = psMetadataLookupS32(NULL, config->arguments, "ROWS"); ///< Number of rows to read per chunk 13 25 14 26 // select an available fileGroup … … 36 48 psTrace("ppStack", 2, "Reading data for chunk %d into fileGroup %d....n", numChunk, j); 37 49 for (int i = 0; i < readouts->n; i++) { 38 pmReadout *inRO = readouts->data[i]; // Input readout50 pmReadout *inRO = readouts->data[i]; ///< Input readout 39 51 40 52 // override the recorded last scan -
branches/eam_branch_20081230/ppMerge/src/ppMergeScaleZero.c
r21087 r21238 1 /** @file ppMergeScaleZero.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.27.18.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "ppMerge.h" 2 14 3 // Get the scale and zero for each chip of each input 15 /** 16 * Get the scale and zero for each chip of each input 17 */ 4 18 bool ppMergeScaleZero(pmConfig *config) 5 19 { 6 20 assert(config); 7 21 8 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame9 int numInputs = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs10 int numCells = psMetadataLookupS32(NULL, config->arguments, "INPUTS.CELLS"); // Number of cells11 psStatsOptions meanStat = psMetadataLookupS32(NULL, config->arguments, "MEAN"); // Statistic for mean12 psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); // Statistic for stdev13 int shutterSize = psMetadataLookupS32(NULL, config->arguments, "SHUTTER.SIZE"); // Size of shutter region14 15 psVector *gains = NULL; // Gains for each cell16 psArray *shutters = NULL; // Shutter data for each cell17 psStats *stats = NULL; // Statistics for background18 psImage *background = NULL; // Background measurements per cell per file22 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame 23 int numInputs = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); ///< Number of inputs 24 int numCells = psMetadataLookupS32(NULL, config->arguments, "INPUTS.CELLS"); ///< Number of cells 25 psStatsOptions meanStat = psMetadataLookupS32(NULL, config->arguments, "MEAN"); ///< Statistic for mean 26 psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); ///< Statistic for stdev 27 int shutterSize = psMetadataLookupS32(NULL, config->arguments, "SHUTTER.SIZE"); ///< Size of shutter region 28 29 psVector *gains = NULL; ///< Gains for each cell 30 psArray *shutters = NULL; ///< Shutter data for each cell 31 psStats *stats = NULL; ///< Statistics for background 32 psImage *background = NULL; ///< Background measurements per cell per file 19 33 20 34 switch (type) { … … 37 51 break; 38 52 } 39 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator40 pmFPAview *view = NULL; // View into FPA53 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); ///< Random number generator 54 pmFPAview *view = NULL; ///< View into FPA 41 55 42 56 for (int i = 0; i < numInputs; i++) { 43 57 pmFPAfileActivate(config->files, false, NULL); 44 psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); // Activated files45 pmFPAfile *input = files->data[0]; // Representative file; should be the image (not mask or weight)46 pmFPA *fpa = input->fpa; // FPA of interest47 view = pmFPAviewAlloc(0); // View to component of interest48 int cellNum = 0; // Index for cell58 psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); ///< Activated files 59 pmFPAfile *input = files->data[0]; ///< Representative file; should be the image (not mask or weight) 60 pmFPA *fpa = input->fpa; ///< FPA of interest 61 view = pmFPAviewAlloc(0); ///< View to component of interest 62 int cellNum = 0; ///< Index for cell 49 63 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 50 64 goto ERROR; 51 65 } 52 pmChip *chip; // Chip of interest66 pmChip *chip; ///< Chip of interest 53 67 while ((chip = pmFPAviewNextChip(view, fpa, 1))) { 54 68 if (!chip->file_exists) { … … 59 73 } 60 74 61 pmCell *cell; // Cell of interest75 pmCell *cell; ///< Cell of interest 62 76 while ((cell = pmFPAviewNextCell(view, fpa, 1))) { 63 77 if (!cell->file_exists) { … … 78 92 goto ERROR; 79 93 } 80 pmReadout *readout = cell->readouts->data[0]; // Readout of interest81 82 psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask94 pmReadout *readout = cell->readouts->data[0]; ///< Readout of interest 95 96 psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); ///< Value to mask 83 97 84 98 switch (type) { … … 86 100 case PPMERGE_TYPE_FRINGE: { 87 101 // Extract the gain 88 float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); // Cell gain102 float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); ///< Cell gain 89 103 if (!isfinite(gain)) { 90 104 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 110 124 } 111 125 case PPMERGE_TYPE_SHUTTER: { 112 pmShutterCorrectionData *shutter = shutters->data[cellNum]; // Shutter correction data126 pmShutterCorrectionData *shutter = shutters->data[cellNum]; ///< Shutter correction data 113 127 if (!shutter) { 114 128 shutter = pmShutterCorrectionDataAlloc(readout->image->numCols, … … 174 188 } 175 189 } 176 psVector *fluxes = NULL; // Solution to fluxes190 psVector *fluxes = NULL; ///< Solution to fluxes 177 191 if (!pmFlatNormalize(&fluxes, &gains, background)) { 178 192 psError(PS_ERR_UNKNOWN, false, "Normalisation failed to converge --- continuing anyway."); -
branches/eam_branch_20081230/ppMerge/src/ppMergeScaleZero.h
r13873 r21238 1 /** @file ppMergeScaleZero.h 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.3.48.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifndef PP_MERGE_SCALE_ZERO_H 2 14 #define PP_MERGE_SCALE_ZERO_H … … 8 20 #include "ppMergeOptions.h" 9 21 10 // Get the scale and zero for each chip of each input 11 bool ppMergeScaleZero(psImage **scales, // The scales for each integration/cell 12 psImage **zeros, // The zeroes for each integration/cell 13 psArray **shutter,// The shutter correction data for each cell 14 ppMergeData *data,// The data 15 const ppMergeOptions *options, // The options 16 const pmConfig *config // The configuration 22 /** 23 * Get the scale and zero for each chip of each input 24 */ 25 bool ppMergeScaleZero(psImage **scales, ///< The scales for each integration/cell 26 psImage **zeros, ///< The zeroes for each integration/cell 27 psArray **shutter,///< The shutter correction data for each cell 28 ppMergeData *data,///< The data 29 const ppMergeOptions *options, ///< The options 30 const pmConfig *config ///< The configuration 17 31 ); 18 32 -
branches/eam_branch_20081230/ppMerge/src/ppMergeSetThreads.c
r21087 r21238 1 /** @file ppMergeSetThreads.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.5.16.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 # include "ppMerge.h" 2 14 -
branches/eam_branch_20081230/ppMerge/src/ppMergeThreadLauncher.c
r21087 r21238 1 /** @file ppMergeThreadLauncher.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.2.20.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 # include "ppMerge.h" 2 14 3 // each thread runs this function, starting a new job when it finished with an old one 4 // it is called with a (void *) pointer to its own thread pointer 15 /** 16 * each thread runs this function, starting a new job when it finished with an old one 17 * it is called with a (void *) pointer to its own thread pointer 18 */ 5 19 void *ppMergeThreadLauncher (void *data) { 6 20 -
branches/eam_branch_20081230/ppMerge/src/ppMergeVersion.c
r10294 r21238 1 /** @file ppMergeVersion.c 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.1.54.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifdef HAVE_CONFIG_H 2 14 #include <config.h> … … 10 22 #include "ppMergeVersion.h" 11 23 12 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name24 static const char *cvsTag = "$Name: not supported by cvs2svn $";///< CVS tag name 13 25 14 26 psString ppMergeVersion(void) 15 27 { 16 psString version = NULL; // Version, to return28 psString version = NULL; ///< Version, to return 17 29 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 18 30 return version; … … 21 33 psString ppMergeVersionLong(void) 22 34 { 23 psString version = ppMergeVersion(); // Version, to return24 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag35 psString version = ppMergeVersion(); ///< Version, to return 36 psString tag = psStringStripCVS(cvsTag, "Name"); ///< CVS tag 25 37 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 26 38 psFree(tag); … … 33 45 PS_ASSERT_METADATA_NON_NULL(metadata,); 34 46 35 psString pslib = psLibVersionLong();// psLib version36 psString psmodules = psModulesVersionLong(); // psModules version37 psString ppStats = ppStatsVersionLong(); // ppStats version38 psString ppMerge = ppMergeVersionLong(); // ppMerge version47 psString pslib = psLibVersionLong();///< psLib version 48 psString psmodules = psModulesVersionLong(); ///< psModules version 49 psString ppStats = ppStatsVersionLong(); ///< ppStats version 50 psString ppMerge = ppMergeVersionLong(); ///< ppMerge version 39 51 40 psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now41 psString timeString = psTimeToISO(time); // The time in an ISO string52 psTime *time = psTimeGetNow(PS_TIME_TAI); ///< The time now 53 psString timeString = psTimeToISO(time); ///< The time in an ISO string 42 54 psFree(time); 43 psString head = NULL; // Head string55 psString head = NULL; ///< Head string 44 56 psStringAppend(&head, "ppMerge processing at %s. Component information:", timeString); 45 57 psFree(timeString); -
branches/eam_branch_20081230/ppMerge/src/ppMergeVersion.h
r10294 r21238 1 /** @file ppMergeVersion.h 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.1.54.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 22:00:00 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifndef PP_MERGE_VERSION_H 2 14 #define PP_MERGE_VERSION_H 3 15 4 /// Return short version information 16 /** 17 * Return short version information 18 */ 5 19 psString ppMergeVersion(void); 6 20 7 /// Return long version information 21 /** 22 * Return long version information 23 */ 8 24 psString ppMergeVersionLong(void); 9 25 10 /// Update the metadata with version information for all dependencies 26 /** 27 * Update the metadata with version information for all dependencies 28 */ 11 29 void ppMergeVersionMetadata(psMetadata *metadata ///< Metadata to update with version information 12 30 );
Note:
See TracChangeset
for help on using the changeset viewer.
