IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6122


Ignore:
Timestamp:
Jan 20, 2006, 11:18:03 PM (20 years ago)
Author:
jhoblitt
Message:

add -inst option to set the camera name
ignore -camera

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/chiptoolConfig.c

    r6108 r6122  
    77    // Parse the configurations (re-org a la ppImage)
    88    config->site = NULL;            // Site configuration
    9     config->camera = NULL;          // Camera configuration
     9    config->camera = NULL;          // Camera configuration (unused)
    1010    config->recipe = NULL;          // Recipe configuration
     11    config->camera_name = NULL;     // Camera name
     12
    1113    if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) {
    1214        psErrorStackPrint(stderr, "Can't find site configuration!\n");
    1315        exit(EXIT_FAILURE);
    14     }
    15 
    16     bool status;
    17     config->camera_name = psMetadataLookupStr(&status, config->camera, "name");
    18     if (!config->camera_name) {
    19         // die
    2016    }
    2117
     
    6359        config->mode = P2_MODE_UPDATE;
    6460    }
    65 
     61   
    6662    // paul's argument parsing convention requires: -key value
    6763    psMetadataAddBool(config->arguments, PS_LIST_TAIL, "-quick",   0, "examine raw image table, write ppImage output", false);
     
    7066    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-update",  0, "update pending image table", "");
    7167    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-time",    0, "define time range of interest", "");
    72     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-camera",  0, "define camera of interest", "");
     68    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-inst",  0, "define camera of interest", "");
    7369    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-filter",  0, "define filter of interest", "");
    7470
     
    8985    }
    9086
     87    bool status;
     88    config->camera_name = psMetadataLookupStr(&status, config->arguments,
     89        "-inst");
    9190    // add the input and output images to the arguments list
    9291    //psMetadataAddStr (config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[1]);
  • trunk/ippTools/src/p2searchRawFrames.c

    r6090 r6122  
    99//    psMetadataAddS32  (where, PS_LIST_TAIL, "TYPE",  0, "==", P2_TYPE_OBJECT);
    1010
    11     if (config->camera != NULL) {
    12         psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==", config->camera_name);
     11    if (config->camera_name != NULL) {
     12        psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==",
     13            config->camera_name);
    1314    }
    1415    if (config->filter != NULL) {
    15         psMetadataAddStr(where, PS_LIST_TAIL, "filter", 0, "==", config->filter);
     16        psMetadataAddStr(where, PS_LIST_TAIL, "filter", 0, "==",
     17            config->filter);
    1618    }
    1719    // psMetadataConfig does not support times yet
     
    2729    psFree (where);
    2830    if (!exposures) {
    29         psError(PS_ERR_UNKNOWN, false, "database access failed");
     31        psError(PS_ERR_UNKNOWN, false, "no rawScienceExp rows found");
    3032
    3133        return NULL;
Note: See TracChangeset for help on using the changeset viewer.