IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10439


Ignore:
Timestamp:
Dec 4, 2006, 11:51:33 AM (19 years ago)
Author:
eugene
Message:

updated to new pmConfigRead, added PSPHOT_RECIPE and PSASTRO_RECIPE, new option lookup

Location:
trunk/ppImage/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppFocusArguments.c

    r8751 r10439  
    1818
    1919    // load the site-wide configuration information
    20     pmConfig *config = pmConfigRead(&argc, argv);
     20    pmConfig *config = pmConfigRead(&argc, argv, RECIPE_NAME);
    2121    if (config == NULL) {
    2222        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    2424    }
    2525
     26    // save the following additional recipe values based on command-line options
     27    // these options override the PPIMAGE recipe values loaded from recipe files
     28    psMetadata *options = pmConfigRecipeOptions (config, RECIPE_NAME);
     29
    2630    // save these recipe options until we have loaded the options
    27     psMetadata *options = psMetadataAlloc ();
    28     psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
     31    // psMetadata *options = psMetadataAlloc ();
     32    // psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
    2933
    3034    // the following options override the PPIMAGE recipe options
  • trunk/ppImage/src/ppFocusParseCamera.c

    r8751 r10439  
    1717        return NULL;
    1818    }
    19 
    20     // add recipe options supplied on command line
    21     psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, RECIPE_NAME);
    22     psMetadata *arglist = psMetadataLookupPtr (&status, config->arguments, "PPIMAGE.OPTIONS");
    23     psMetadataCopy (recipe, arglist);
    2419
    2520    // parse the options from the metadata format to the ppImageOptions structure
  • trunk/ppImage/src/ppImageArguments.c

    r10209 r10439  
    3434
    3535    // load the site-wide configuration information
    36     pmConfig *config = pmConfigRead(&argc, argv);
     36    pmConfig *config = pmConfigRead(&argc, argv, RECIPE_NAME);
    3737    if (config == NULL) {
    3838        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    4040    }
    4141
     42    // save the following additional recipe values based on command-line options
     43    // these options override the PPIMAGE recipe values loaded from recipe files
     44    psMetadata *options = pmConfigRecipeOptions (config, RECIPE_NAME);
     45
    4246    // save these recipe options until we have loaded the options
    43     psMetadata *options = psMetadataAlloc ();
    44     psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
     47    // psMetadata *options = psMetadataAlloc ();
     48    // psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
    4549
    4650    if ((argnum = psArgumentGet(argc, argv, "-stat"))) {
  • trunk/ppImage/src/ppImageAstrom.c

    r9648 r10439  
    1111    // select recipe options supplied on command line
    1212    // XXX move these options to the "PSASTRO" recipe?
    13     psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, RECIPE_NAME);
     13    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE);
    1414
    1515    // find or define a pmFPAfile PSPHOT.INPUT
  • trunk/ppImage/src/ppImageLoop.c

    r10366 r10439  
    1717
    1818    bool mdok;                      // Status of MD lookup
    19     psMetadata *extraOpts = psMetadataLookupMetadata(&mdok, config->arguments,
    20                                                      "PPIMAGE.OPTIONS"); // Extra options
    21     const char *statsName = psMetadataLookupStr(&mdok, extraOpts, "STATS"); // Filename for statistics
     19    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, RECIPE_NAME);
     20    const char *statsName = psMetadataLookupStr(&mdok, recipe, "STATS"); // Filename for statistics
    2221    psMetadata *stats = NULL;           // Container for statistics
    2322    FILE *statsFile = NULL;             // File stream for statistics
  • trunk/ppImage/src/ppImageParseCamera.c

    r10215 r10439  
    3535    // add recipe options supplied on command line
    3636    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, RECIPE_NAME);
    37     psMetadata *arglist = psMetadataLookupPtr (&status, config->arguments, "PPIMAGE.OPTIONS");
    38     psMetadataCopy (recipe, arglist);
    3937
    4038    // parse the options from the metadata format to the ppImageOptions structure
  • trunk/ppImage/src/ppImagePhotom.c

    r9660 r10439  
    1414
    1515    // select recipe options supplied on command line
    16     psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, "PSPHOT");
     16    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
    1717
    1818    // set default recipe values here
  • trunk/ppImage/src/ppTest.c

    r9539 r10439  
    1717// ppImageConfig.c
    1818//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    19     pmConfig *config = pmConfigRead(&argc, argv);
     19    pmConfig *config = pmConfigRead(&argc, argv, "PPIMAGE");
    2020    if (! config) {
    2121        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    7373    }
    7474    // Determine the correct recipe to use
    75     if (! config->recipes && !pmConfigReadRecipes(config)) {
     75    if (! config->recipes && !pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CAMERA | PM_RECIPE_SOURCE_CL)) {
    7676        // There's no point in continuing if we can't work out what recipes to use
    7777        psErrorStackPrint(stderr, "Can't find recipe configuration!\n");
Note: See TracChangeset for help on using the changeset viewer.