IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 15, 2005, 10:09:03 AM (20 years ago)
Author:
gusciora
Message:

SubtractBias was recoded. Significant mods to removeBadPixels.
Additional mods to other files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r5435 r5516  
    33 *  @author PAP, IfA
    44 *
    5  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2005-10-20 23:06:24 $
     5 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2005-11-15 20:09:03 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1111#include <stdio.h>
    1212#include <string.h>
    13 #include <assert.h>
    1413#include "pslib.h"
    15 //#include "psAdditionals.h"
    1614#include "pmConfig.h"
    1715
    1816#define PS_SITE "PS_SITE"               // Name of the environment variable containing the site config file
    19 #define PS_DEFAULT_SITE "ipprc.config"     // Default site config file
    20 
    21 
     17#define PS_DEFAULT_SITE "ipprc.config"  // Default site config file
    2218
    2319/** readConfig
     
    3228    const char *description)            // Description of file
    3329{
    34     int numBadLines = 0;  // Number of bad lines in config file
     30    int numBadLines = 0;
     31
    3532    psLogMsg(__func__, PS_LOG_INFO, "Loading %s configuration from file %s\n",
    3633             description, name);
     
    5653must take precedence override the values set here.  This must be, somehow,
    5754coded.
     55 
     56XXX: Must load camera and recipe configuration if specified in the command line.
    5857 *****************************************************************************/
    5958bool pmConfigRead(
     
    119118    // file and store in psMetadata struct site.
    120119    //
     120
    121121    if (!readConfig(site, siteName, "site")) {
    122122        return false;
     
    249249    }
    250250
     251    //
     252    // Allow command line options to override defaults for logging.
     253    // XXX: Is it appropriate to use the ArgVerbosity function for this?
     254    //   A: it removes the options from the command line.
     255    //   B: will the pmConfigRead function always be called on initialization.
     256    //
     257    psS32 saveLogLevel = psLogGetLevel();
     258    psArgumentVerbosity(argc, argv);
     259    // XXX: substitute the string for the default log level for "2".
     260    if (2 == psLogGetLevel()) {
     261        psLogSetLevel(saveLogLevel);
     262    }
    251263    return(true);
    252264}
     
    266278    // Apply the rules
    267279    psMetadataIterator *ruleIter = psMetadataIteratorAlloc(rule, PS_LIST_HEAD, NULL); // Rule iterator
    268     psMetadataItem *ruleItem = NULL; // Item from the metadata
    269     bool match = true;   // Does it match?
     280    psMetadataItem *ruleItem = NULL;    // Item from the metadata
     281    bool match = true;                  // Does it match?
    270282    while ((ruleItem = psMetadataGetAndIncrement(ruleIter)) && match) {
    271283        // Check for the existence of the rule
     
    389401    const char *recipeName)
    390402{
    391     assert(camera);
    392     assert(recipeName);
    393 
    394     psMetadata *recipe = NULL; // Recipe to read
    395     bool mdok = true;   // Status of MD lookup
     403    PS_ASSERT_PTR_NON_NULL(camera, false);
     404    PS_ASSERT_PTR_NON_NULL(recipeName, false);
     405
     406    psMetadata *recipe = NULL;          // Recipe to read
     407    bool mdok = true;                   // Status of MD lookup
    396408    psMetadata *recipes = psMetadataLookupMD(&mdok, camera, "RECIPES"); // The list of recipes
    397409    if (! mdok || ! recipes) {
Note: See TracChangeset for help on using the changeset viewer.