IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21244 for trunk/ppArith


Ignore:
Timestamp:
Feb 1, 2009, 11:43:05 AM (17 years ago)
Author:
eugene
Message:

merging Doxygen templates added by Bill G

Location:
trunk/ppArith/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppArith/src/ppArith.c

    r15571 r21244  
     1/** @file ppArith.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1123int main(int argc, char *argv[])
    1224{
    13     psExit exitValue = PS_EXIT_SUCCESS; // Exit value
     25    psExit exitValue = PS_EXIT_SUCCESS; ///< Exit value
    1426    psTimerStart("ppArith");
    1527    psLibInit(NULL);
    1628
    17     pmConfig *config = pmConfigRead(&argc, argv, PPARITH_RECIPE); // Configuration
     29    pmConfig *config = pmConfigRead(&argc, argv, PPARITH_RECIPE); ///< Configuration
    1830    if (!config) {
    1931        psErrorStackPrint(stderr, "Error reading configuration.");
  • trunk/ppArith/src/ppArith.h

    r15571 r21244  
     1/** @file ppArith.h
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
     13
    114#ifndef PP_ARITH_H
    215#define PP_ARITH_H
    316
    4 #define PPARITH_RECIPE "PPARITH"            /// Name of the recipe to use
     17/// @addtogroup ppArith
     18/// @{
     19#define PPARITH_RECIPE "PPARITH"            ///< Name of the recipe to use
    520
    6 /// Parse the arguments
    7 bool ppArithArguments(int argc, char *argv[], ///< Command-line arguments
    8                       pmConfig *config    ///< Configuration
     21/**
     22 * Parse the arguments
     23 */
     24bool ppArithArguments(int argc, char *argv[], ///< Command-line arguments
     25                      pmConfig *config    ///< Configuration
    926    );
    1027
    11 /// Parse the camera input
    12 bool ppArithCamera(pmConfig *config       ///< Configuration
     28/**
     29 * Parse the camera input
     30 */
     31bool ppArithCamera(pmConfig *config       ///< Configuration
    1332    );
    1433
    15 /// Loop over the FPA hierarchy
    16 bool ppArithLoop(pmConfig *config         ///< Configuration
     34/**
     35 * Loop over the FPA hierarchy
     36 */
     37bool ppArithLoop(pmConfig *config         ///< Configuration
    1738    );
    1839
    19 /// Perform arithmetic on the readout
    20 bool ppArithReadout(pmReadout *output,  ///< Output readout
    21                     const pmReadout *input1, ///< Input readout
    22                     const pmReadout *input2, ///< Input readout
    23                     const pmConfig *config, ///< Configuration
    24                     const pmFPAview *view ///< View of readout on which to operate
     40/**
     41 * Perform arithmetic on the readout
     42 */
     43bool ppArithReadout(pmReadout *output,  ///< Output readout
     44                    const pmReadout *input1, ///< Input readout
     45                    const pmReadout *input2, ///< Input readout
     46                    const pmConfig *config, ///< Configuration
     47                    const pmFPAview *view ///< View of readout on which to operate
    2548    );
    2649
    27 /// Put the program version information into a metadata
     50/**
     51 * Put the program version information into a metadata
     52 */
    2853void ppArithVersionMetadata(psMetadata *metadata ///< Metadata to populate
    2954    );
    3055
     56///@}
    3157
    3258#endif
  • trunk/ppArith/src/ppArithArguments.c

    r16189 r21244  
     1/** @file ppArithArguments.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1022#include "ppArith.h"
    1123
    12 // Print usage information and die
    13 static void usage(const char *program,  // Name of the program
    14                   psMetadata *arguments, // Command-line arguments
    15                   pmConfig *config      // Configuration
     24/**
     25 * Print usage information and die
     26 */
     27static void usage(const char *program,  ///< Name of the program
     28                  psMetadata *arguments, ///< Command-line arguments
     29                  pmConfig *config      ///< Configuration
    1630    )
    1731{
     
    2842}
    2943
    30 // Get a string value from the command-line and add it to the target
    31 static bool valueArgStr(psMetadata *arguments, // Command-line arguments
    32                         const char *argName, // Argument name in the command-line arguments
    33                         const char *mdName, // Name for value in the metadata
    34                         psMetadata *target // Target metadata to which to add value
     44/**
     45 * Get a string value from the command-line and add it to the target
     46 */
     47static bool valueArgStr(psMetadata *arguments, ///< Command-line arguments
     48                        const char *argName, ///< Argument name in the command-line arguments
     49                        const char *mdName, ///< Name for value in the metadata
     50                        psMetadata *target ///< Target metadata to which to add value
    3551                        )
    3652{
    37     psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest
     53    psString value = psMetadataLookupStr(NULL, arguments, argName); ///< Value of interest
    3854    if (value && strlen(value) > 0) {
    3955        return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
     
    4258}
    4359
    44 // Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc
    45 static void fileList(const char *file, // The symbolic name for the file
    46                      const char *name, // The name of the file
    47                      const char *comment, // Description of the file
    48                      pmConfig *config // Configuration
     60/**
     61 * Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc
     62 */
     63static void fileList(const char *file, ///< The symbolic name for the file
     64                     const char *name, ///< The name of the file
     65                     const char *comment, ///< Description of the file
     66                     pmConfig *config ///< Configuration
    4967    )
    5068{
    51     psArray *files = psArrayAlloc(1); // Array with file names
     69    psArray *files = psArrayAlloc(1); ///< Array with file names
    5270    files->data[0] = psStringCopy(name);
    5371    psMetadataAddArray(config->arguments, PS_LIST_TAIL, file, 0, comment, files);
     
    6078    assert(config);
    6179
    62     psMetadata *arguments = psMetadataAlloc(); // Command-line arguments
     80    psMetadata *arguments = psMetadataAlloc(); ///< Command-line arguments
    6381    psMetadataAddStr(arguments, PS_LIST_TAIL, "-file1", 0, "First image", NULL);
    6482    psMetadataAddStr(arguments, PS_LIST_TAIL, "-op", 0, "Operation to perform", NULL);
     
    7391    bool isMask = psMetadataLookupBool(NULL, arguments, "-mask"); // Are we dealing with masks?
    7492    psMetadataAddBool(config->arguments, PS_LIST_TAIL, "MASK", 0, "Produce a mask image?", isMask);
    75     const char *inFilerule = isMask ? "PPARITH.INPUT.MASK" : "PPARITH.INPUT.IMAGE"; // Input file rule
    76     const char *outFilerule = isMask ? "PPARITH.OUTPUT.MASK" : "PPARITH.OUTPUT.IMAGE"; // Output file rule
     93    const char *inFilerule = isMask ? "PPARITH.INPUT.MASK" : "PPARITH.INPUT.IMAGE"; ///< Input file rule
     94    const char *outFilerule = isMask ? "PPARITH.OUTPUT.MASK" : "PPARITH.OUTPUT.IMAGE"; ///< Output file rule
    7795    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "FILERULE.INPUT", 0,
    7896                     "File rule for input", inFilerule);
     
    8098                     "File rule for output", outFilerule);
    8199
    82     bool status = false;                // Status for file definition
     100    bool status = false;                ///< Status for file definition
    83101
    84102    // First file
    85     const char *name1 = psMetadataLookupStr(NULL, arguments, "-file1"); // Name of first image
     103    const char *name1 = psMetadataLookupStr(NULL, arguments, "-file1"); ///< Name of first image
    86104    if (!name1 || strlen(name1) == 0) {
    87105        psError(PS_ERR_UNEXPECTED_NULL, true, "No input image specified.");
     
    100118
    101119    // Second file is optional (won't be one for unary operations)
    102     const char *name2 = psMetadataLookupStr(NULL, arguments, "-file2"); // Name of second image
     120    const char *name2 = psMetadataLookupStr(NULL, arguments, "-file2"); ///< Name of second image
    103121    if (name2 && strlen(name2) > 0) {
    104122        fileList("INPUT2", name2, "Name of the second input image", config);
  • trunk/ppArith/src/ppArithLoop.c

    r18070 r21244  
     1/** @file ppArithLoop.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1628    PS_ASSERT_PTR_NON_NULL(config, false);
    1729
    18     bool mdok;                          // Status of MD lookup
    19     const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics
    20     psMetadata *stats = NULL;           // Container for statistics
    21     FILE *statsFile = NULL;             // File stream for statistics
     30    bool mdok;                          ///< Status of MD lookup
     31    const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); ///< Filename for statistics
     32    psMetadata *stats = NULL;           ///< Container for statistics
     33    FILE *statsFile = NULL;             ///< File stream for statistics
    2234    if (statsName && strlen(statsName) > 0) {
    23         psString resolved = pmConfigConvertFilename(statsName, config, true, true); // Resolved filename
     35        psString resolved = pmConfigConvertFilename(statsName, config, true, true); ///< Resolved filename
    2436        statsFile = fopen(resolved, "w");
    2537        if (!statsFile) {
     
    3345    }
    3446
    35     const char *outName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.OUTPUT"); // Output filerule
    36     pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); // Output file
     47    const char *outName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.OUTPUT"); ///< Output filerule
     48    pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); ///< Output file
    3749    assert(output);                     // We added it earlier
    3850
    39     const char *inName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.INPUT"); // Input filerule
    40     pmFPAfile *input1 = NULL, *input2 = NULL; // Input files
    41     psString fileRegex = NULL;          // Regular expression to find input files
     51    const char *inName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.INPUT"); ///< Input filerule
     52    pmFPAfile *input1 = NULL, *input2 = NULL; ///< Input files
     53    psString fileRegex = NULL;   ///< Regular expression to find input files
    4254    psStringAppend(&fileRegex, "^%s$", inName);
    43     psMetadataIterator *iter = psMetadataIteratorAlloc(config->files, PS_LIST_HEAD, fileRegex); // Iterator
    44     psMetadataItem *item = psMetadataGetAndIncrement(iter); // Item from iteration
     55    psMetadataIterator *iter = psMetadataIteratorAlloc(config->files, PS_LIST_HEAD, fileRegex); ///< Iterator
     56    psMetadataItem *item = psMetadataGetAndIncrement(iter); ///< Item from iteration
    4557    input1 = item->data.V;
    4658    assert(input1);                     // It should be there!
     
    5163    psFree(iter);
    5264
    53     pmFPAview *view = pmFPAviewAlloc(0); // Pointer into FPA hierarchy
    54     pmHDU *lastHDU = NULL;              // Last HDU that was updated
     65    pmFPAview *view = pmFPAviewAlloc(0); ///< Pointer into FPA hierarchy
     66    pmHDU *lastHDU = NULL;              ///< Last HDU that was updated
    5567
    5668    // Iterate over the FPA hierarchy
     
    5971    }
    6072
    61     pmChip *outChip;                    // Output chip of interest
     73    pmChip *outChip;                    ///< Output chip of interest
    6274    while ((outChip = pmFPAviewNextChip(view, output->fpa, 1)) != NULL) {
    63         pmChip *inChip1 = pmFPAviewThisChip(view, input1->fpa); // Input chip of interest
    64         pmChip *inChip2 = input2 ? pmFPAviewThisChip(view, input2->fpa) : NULL; // Input chip of interest
     75        pmChip *inChip1 = pmFPAviewThisChip(view, input1->fpa); ///< Input chip of interest
     76        pmChip *inChip2 = input2 ? pmFPAviewThisChip(view, input2->fpa) : NULL; ///< Input chip of interest
    6577        if (inChip2 && ((!inChip1->file_exists && inChip2->file_exists) ||
    6678                        (inChip1->file_exists && !inChip2->file_exists))) {
     
    7890        }
    7991
    80         pmCell *outCell;                // Cell of interest
     92        pmCell *outCell;                ///< Cell of interest
    8193        while ((outCell = pmFPAviewNextCell(view, output->fpa, 1)) != NULL) {
    82             pmCell *inCell1 = pmFPAviewThisCell(view, input1->fpa); // Input cell of interest
    83             pmCell *inCell2 = input2 ? pmFPAviewThisCell(view, input2->fpa) : NULL; // Input cell of interest
     94            pmCell *inCell1 = pmFPAviewThisCell(view, input1->fpa); ///< Input cell of interest
     95            pmCell *inCell2 = input2 ? pmFPAviewThisCell(view, input2->fpa) : NULL; ///< Input cell of interest
    8496            if (inCell2 && ((!inCell1->file_exists && inCell2->file_exists) ||
    8597                            (inCell1->file_exists && !inCell2->file_exists))) {
     
    105117            }
    106118
    107             pmReadout *outRO;           // Readout of interest
     119            pmReadout *outRO;           ///< Readout of interest
    108120            while ((outRO = pmFPAviewNextReadout(view, output->fpa, 1))) {
    109121                if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    110122                    return false;
    111123                }
    112                 pmReadout *inRO1 = pmFPAviewThisReadout(view, input1->fpa);// Input readout of interest
     124                pmReadout *inRO1 = pmFPAviewThisReadout(view, input1->fpa);///< Input readout of interest
    113125                pmReadout *inRO2 = input2 ? pmFPAviewThisReadout(view, input2->fpa) :
    114                     NULL;// Input readout of interest
     126                    NULL;///< Input readout of interest
    115127
    116128                if (inRO2 && ((!inRO1->data_exists && inRO2->data_exists) ||
  • trunk/ppArith/src/ppArithReadout.c

    r21183 r21244  
     1/** @file ppArithReadout.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1729    PS_ASSERT_PTR_NON_NULL(view, false);
    1830
    19     bool mdok;                          // Status of MD lookup
     31    bool mdok;                          ///< Status of MD lookup
    2032    bool isMask = psMetadataLookupBool(&mdok, config->arguments, "MASK");
    2133
    22     psImage *inImage1;  // Input image 1
    23     psImage *outImage;  // Output image
     34    psImage *inImage1;  ///< Input image 1
     35    psImage *outImage;  ///< Output image
    2436    if (isMask) {
    2537        inImage1 = input1->mask;
     
    4254    PS_ASSERT_IMAGE_NON_NULL(inImage1, false);
    4355
    44     psImage *inImage2 = NULL;           // Input image 2
     56    psImage *inImage2 = NULL;           ///< Input image 2
    4557    if (input2) {
    4658        inImage2 = isMask ? input2->mask : input2->image;
     
    6173
    6274    // Look up appropriate values
    63     const char *op = psMetadataLookupStr(NULL, config->arguments, "OPERATION"); // Operation to perform
     75    const char *op = psMetadataLookupStr(NULL, config->arguments, "OPERATION"); ///< Operation to perform
    6476
    6577    if (input2) {
  • trunk/ppArith/src/ppArithVersion.c

    r15571 r21244  
     1/** @file ppArithVersion.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1022#include "ppArith.h"
    1123
    12 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name
     24static const char *cvsTag = "$Name: not supported by cvs2svn $";///< CVS tag name
    1325
    1426psString ppArithVersion(void)
    1527{
    16     psString version = NULL;            // Version, to return
     28    psString version = NULL;            ///< Version, to return
    1729    psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION);
    1830    return version;
     
    2133psString ppArithVersionLong(void)
    2234{
    23     psString version = ppArithVersion(); // Version, to return
    24     psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag
     35    psString version = ppArithVersion(); ///< Version, to return
     36    psString tag = psStringStripCVS(cvsTag, "Name"); ///< CVS tag
    2537    psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__);
    2638    psFree(tag);
     
    3345    PS_ASSERT_METADATA_NON_NULL(metadata,);
    3446
    35     psString pslib = psLibVersionLong();// psLib version
    36     psString psmodules = psModulesVersionLong(); // psModules version
    37     psString ppStats = ppStatsVersionLong(); // ppStats version
    38     psString ppArith = ppArithVersionLong(); // ppArith version
     47    psString pslib = psLibVersionLong();///< psLib version
     48    psString psmodules = psModulesVersionLong(); ///< psModules version
     49    psString ppStats = ppStatsVersionLong(); ///< ppStats version
     50    psString ppArith = ppArithVersionLong(); ///< ppArith version
    3951
    40     psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now
    41     psString timeString = psTimeToISO(time); // The time in an ISO string
     52    psTime *time = psTimeGetNow(PS_TIME_TAI); ///< The time now
     53    psString timeString = psTimeToISO(time); ///< The time in an ISO string
    4254    psFree(time);
    43     psString head = NULL;               // Head string
     55    psString head = NULL;               ///< Head string
    4456    psStringAppend(&head, "ppArith processing at %s. Component information:", timeString);
    4557    psFree(timeString);
Note: See TracChangeset for help on using the changeset viewer.