Index: trunk/ppMerge/src/ppMergeArguments.c
===================================================================
--- trunk/ppMerge/src/ppMergeArguments.c	(revision 21183)
+++ trunk/ppMerge/src/ppMergeArguments.c	(revision 21244)
@@ -1,7 +1,21 @@
+/** @file ppMergeArguments.c
+ *
+ *  @brief
+ *
+ *  @ingroup ppMerge
+ *
+ *  @author IfA
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-01 21:43:05 $
+ *  Copyright 2009 Institute for Astronomy, University of Hawaii
+ */
+
 #include "ppMerge.h"
 
-// Print usage information and die
-static void usage(const char *program,  // Name of the program
-                  psMetadata *arguments // Command-line arguments
+/**
+ * Print usage information and die
+ */
+static void usage(const char *program,  ///< Name of the program
+                  psMetadata *arguments ///< Command-line arguments
     )
 {
@@ -18,5 +32,7 @@
 }
 
-// Get a float-point value from the command-line or recipe, and add it to the arguments
+/**
+ * Get a float-point value from the command-line or recipe, and add it to the arguments
+ */
 #define VALUE_ARG_RECIPE_FLOAT(ARGNAME, RECIPENAME, TYPE) { \
     ps##TYPE value = psMetadataLookup##TYPE(NULL, arguments, ARGNAME); \
@@ -33,5 +49,7 @@
 }
 
-// Get an integer value from the command-line or recipe, and add it to the arguments
+/**
+ * Get an integer value from the command-line or recipe, and add it to the arguments
+ */
 #define VALUE_ARG_RECIPE_INT(ARGNAME, RECIPENAME, TYPE, UNSET) { \
     ps##TYPE value = psMetadataLookup##TYPE(NULL, arguments, ARGNAME); \
@@ -48,5 +66,7 @@
 }
 
-// Get a boolean from the command-line or recipe, and add it to the arguments if either is set
+/**
+ * Get a boolean from the command-line or recipe, and add it to the arguments if either is set
+ */
 #define VALUE_ARG_RECIPE_BOOL(ARGNAME, RECIPENAME) { \
     bool value = (psMetadataLookupBool(NULL, arguments, ARGNAME) || \
@@ -55,5 +75,7 @@
 }
 
-// Get a statistic name from the command-line or recipe, and add the enum to the arguments
+/**
+ * Get a statistic name from the command-line or recipe, and add the enum to the arguments
+ */
 #define VALUE_ARG_RECIPE_STAT(ARGNAME, RECIPENAME) { \
     const char *stat = psMetadataLookupStr(NULL, arguments, ARGNAME); \
@@ -69,5 +91,7 @@
 }
 
-// Get a string from the command-line or recipe, and add to the arguments
+/**
+ * Get a string from the command-line or recipe, and add to the arguments
+ */
 #define VALUE_ARG_RECIPE_STR(ARGNAME, RECIPENAME) { \
     const char *str = psMetadataLookupStr(NULL, arguments, ARGNAME); \
@@ -83,5 +107,7 @@
 }
 
-// Get a string from the command-line or recipe, and add the appropriate mask value to the arguments
+/**
+ * Get a string from the command-line or recipe, and add the appropriate mask value to the arguments
+ */
 #define VALUE_ARG_RECIPE_MASK(ARGNAME, RECIPENAME) { \
     const char *str = psMetadataLookupStr(NULL, arguments, ARGNAME); \
@@ -98,12 +124,14 @@
 }
 
-// Get a string value from the command-line and add it to the target
-static bool valueArgStr(psMetadata *arguments, // Command-line arguments
-                        const char *argName, // Argument name in the command-line arguments
-                        const char *mdName, // Name for value in the metadata
-                        psMetadata *target // Target metadata to which to add value
+/**
+ * Get a string value from the command-line and add it to the target
+ */
+static bool valueArgStr(psMetadata *arguments, ///< Command-line arguments
+                        const char *argName, ///< Argument name in the command-line arguments
+                        const char *mdName, ///< Name for value in the metadata
+                        psMetadata *target ///< Target metadata to which to add value
                         )
 {
-    psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest
+    psString value = psMetadataLookupStr(NULL, arguments, argName); ///< Value of interest
     if (value && strlen(value) > 0) {
         return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
@@ -116,5 +144,5 @@
     assert(config);
 
-    psMetadata *arguments = psMetadataAlloc(); // Command-line arguments
+    psMetadata *arguments = psMetadataAlloc(); ///< Command-line arguments
     psMetadataAddStr(arguments, PS_LIST_TAIL, "-type", 0, "Type of calibration frame", NULL);
     psMetadataAddStr(arguments, PS_LIST_TAIL, "-stats", 0, "MDC file to hold statistics ", NULL);
@@ -136,5 +164,5 @@
     psMetadataAddStr(arguments, PS_LIST_TAIL, "-stdev",    0, "Statistic to use to measure the stdev", NULL);
 
-    // Fringe construction parameters
+    /** Fringe construction parameters */
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-num",     0, "Number of fringe regions", 0);
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-size",    0, "Half-size of fringe regions", 0);
@@ -142,10 +170,10 @@
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-ysmooth", 0, "Number of smoothing regions in y", 0);
 
-    // Shutter construction parameters
+    /** Shutter construction parameters */
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-shutter-size", 0, "Size for shutter measurement regions", 0);
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-shutter-iter", 0, "Number of iterations for shutter", 0);
     psMetadataAddF32(arguments, PS_LIST_TAIL, "-shutter-rej",  0, "Rejection limit for shutter", NAN);
 
-    // Mask construction parameters
+    /** Mask construction parameters */
     psMetadataAddF32(arguments, PS_LIST_TAIL, "-mask-suspect",  0, "Threshold for suspect pixels (sigma)", NAN);
     psMetadataAddF32(arguments, PS_LIST_TAIL, "-mask-bad",      0, "Threshold for bad pixels (sigma)", NAN);
@@ -189,6 +217,6 @@
     }
 
-    unsigned int numBad = 0;                     // Number of bad lines
-    psMetadata *inputs = psMetadataConfigRead(NULL, &numBad, argv[1], false); // Information about inputs
+    unsigned int numBad = 0;                     ///< Number of bad lines
+    psMetadata *inputs = psMetadataConfigRead(NULL, &numBad, argv[1], false); ///< Information about inputs
     if (!inputs || numBad > 0) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to cleanly read MDC file with inputs.");
@@ -205,10 +233,10 @@
 
     // Set the type of calibration frame
-    const char *typeStr = psMetadataLookupStr(NULL, arguments, "-type"); // Type of calibration
+    const char *typeStr = psMetadataLookupStr(NULL, arguments, "-type"); ///< Type of calibration
     if (!typeStr || strlen(typeStr) <= 0) {
       psError(PS_ERR_UNKNOWN, false, "No -type specified.");
       goto ERROR;
     }
-    ppMergeType type = PPMERGE_TYPE_UNKNOWN; // Enumerated type for frame type
+    ppMergeType type = PPMERGE_TYPE_UNKNOWN; ///< Enumerated type for frame type
     if (strcasecmp(typeStr, "BIAS") == 0) {
       type = PPMERGE_TYPE_BIAS;
@@ -258,5 +286,5 @@
     }
 
-    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPMERGE_RECIPE); // Recipe for ppSim
+    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPMERGE_RECIPE); ///< Recipe for ppSim
     if (!recipe) {
         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPMERGE_RECIPE);
@@ -264,5 +292,5 @@
     }
 
-    // Standard combination parameters
+    /** Standard combination parameters */
     VALUE_ARG_RECIPE_INT("-rows",       "ROWS",     S32, 0);
     VALUE_ARG_RECIPE_INT("-sample",     "SAMPLE",   S32, 0);
@@ -281,5 +309,5 @@
     VALUE_ARG_RECIPE_STAT("-stdev",     "STDEV");
 
-    // Fringe construction parameters
+    /** Fringe construction parameters */
     VALUE_ARG_RECIPE_INT("-fringe-num",     "FRINGE.NUM",     S32, 0);
     VALUE_ARG_RECIPE_INT("-fringe-size",    "FRINGE.SIZE",    S32, 0);
@@ -287,8 +315,8 @@
     VALUE_ARG_RECIPE_INT("-fringe-ysmooth", "FRINGE.YSMOOTH", S32, 0);
 
-    // Shutter construction parameters
+    /** Shutter construction parameters */
     VALUE_ARG_RECIPE_INT("-shutter-size",  "SHUTTER.SIZE", S32, 0);
 
-    // Mask construction parameters
+    /** Mask construction parameters */
     VALUE_ARG_RECIPE_FLOAT("-mask-suspect", "MASK.SUSPECT", F32);
     VALUE_ARG_RECIPE_FLOAT("-mask-bad",     "MASK.BAD",     F32);
@@ -300,5 +328,5 @@
     VALUE_ARG_RECIPE_FLOAT("-mask-smooth-scale", "MASK.SMOOTH.SCALE", F32);
 
-    const char *maskModeStr = psMetadataLookupStr(NULL, arguments, "-mask-mode"); // Mode to identify bad pix
+    const char *maskModeStr = psMetadataLookupStr(NULL, arguments, "-mask-mode"); ///< Mode to identify bad pix
     if (!maskModeStr) {
         maskModeStr = psMetadataLookupStr(NULL, recipe, "MASK.MODE");
@@ -318,13 +346,13 @@
 
     if (type == PPMERGE_TYPE_DARK) {
-        psMetadata *ordinates = psMetadataLookupMetadata(NULL, recipe, "DARK.ORDINATES"); // Ordinates info
-        psArray *translated = psArrayAllocEmpty(psListLength(ordinates->list)); // Translated version
-
-        psMetadataIterator *iter = psMetadataIteratorAlloc(ordinates, PS_LIST_HEAD, NULL); // Iterator
-        psMetadataItem *item;           // Item from iteration
+        psMetadata *ordinates = psMetadataLookupMetadata(NULL, recipe, "DARK.ORDINATES"); ///< Ordinates info
+        psArray *translated = psArrayAllocEmpty(psListLength(ordinates->list)); ///< Translated version
+
+        psMetadataIterator *iter = psMetadataIteratorAlloc(ordinates, PS_LIST_HEAD, NULL); ///< Iterator
+        psMetadataItem *item;           ///< Item from iteration
         while ((item = psMetadataGetAndIncrement(iter))) {
-            int order = 0;              // Polynomial order
-            bool scale = false;         // Scale values?
-            float min = NAN, max = NAN; // Minimum and maximum values for scaling
+            int order = 0;              ///< Polynomial order
+            bool scale = false;         ///< Scale values?
+            float min = NAN, max = NAN; ///< Minimum and maximum values for scaling
             switch (item->type) {
               case PS_TYPE_S32:
@@ -333,5 +361,5 @@
               case PS_DATA_METADATA:
                 order = psMetadataLookupS32(NULL, item->data.md, "ORDER");
-                bool mdok;                  // Status of MD lookup
+                bool mdok;                  ///< Status of MD lookup
                 scale = psMetadataLookupBool(&mdok, item->data.md, "SCALE");
                 min = psMetadataLookupF32(&mdok, item->data.md, "MIN");
@@ -361,7 +389,7 @@
         psMetadataAddArray(config->arguments, PS_LIST_TAIL, "DARK.ORDINATES", 0,
                            "Ordinates to fit for dark", translated);
-        psFree(translated);             // Drop reference
-
-        psString darkNorm = psMetadataLookupStr(NULL, recipe, "DARK.NORM"); // Normalisation concept
+        psFree(translated);             ///< Drop reference
+
+        psString darkNorm = psMetadataLookupStr(NULL, recipe, "DARK.NORM"); ///<Normalisation concept
         if (darkNorm && strcmp(darkNorm, "NONE") != 0) {
             psMetadataAddStr(config->arguments, PS_LIST_TAIL, "DARK.NORM", 0,
