IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6150


Ignore:
Timestamp:
Jan 21, 2006, 5:35:57 PM (20 years ago)
Author:
jhoblitt
Message:

make -inst optional
add -exp_id -class -class_id -url
misc. option cleanup

Location:
trunk/ippTools/src
Files:
4 edited

Legend:

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

    r6139 r6150  
    154154static bool doneMode(p2Config *config)
    155155{
     156  // get exp_id/class/class_id/url from the CLI
     157  // add the completed imfile to the p2DoneImfile tables
     158  // remove corresponding entries from the p2PendingImfile table
     159  // check to see if any p2PendingExps have no associated p2PendingImfiles
     160  //    if so move the p2PendingExp(s) to p2DoneExp
     161
    156162    psArray *pendingFrames = p2searchPendingFrames(config);
    157163    if (!pendingFrames) {
  • trunk/ippTools/src/chiptoolConfig.c

    r6133 r6150  
    11#include <pmConfig.h>
    22
    3 # include "p2tools.h"
     3#include "p2tools.h"
    44
    5 bool p2searchConfig (p2Config *config, int argc, char **argv) {
     5bool p2searchConfig(p2Config *config, int argc, char **argv) {
    66    PS_ASSERT_PTR_NON_NULL(config, false);
    77
     
    1111    config->recipe = NULL;          // Recipe configuration
    1212    config->camera_name = NULL;     // Camera name
     13    config->filter = NULL;          // Filter name
    1314
    1415    if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) {
     
    4647        config->mode = P2_MODE_PENDING;
    4748    }
     49    /*
    4850    if ((N = psArgumentGet (argc, argv, "-update"))) {
    4951        psArgumentRemove (N, &argc, argv);
     
    5355        config->mode = P2_MODE_UPDATE;
    5456    }
     57    */
    5558    if ((N = psArgumentGet (argc, argv, "-done"))) {
    5659        psArgumentRemove (N, &argc, argv);
     
    5861            psAbort (argv[0], "only one mode selection is allowed");
    5962        }
    60         config->mode = P2_MODE_UPDATE;
     63        config->mode = P2_MODE_DONE;
    6164    }
    6265   
     
    6568    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-define",  0, "examine raw image table, add to pending image table", "");
    6669    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-pending", 0, "examine pending image table, write ppImage output", "");
    67     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-update",  0, "update pending image table", "");
    68     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-time",    0, "define time range of interest", "");
     70//    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-update",  0, "update pending image table", "");
     71    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-done",  0, "mov image from pending to done table", "");
     72//    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-time",    0, "define time range of interest", "");
    6973    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-inst",  0, "define camera of interest", "");
    7074    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-filter",  0, "define filter of interest", "");
     75    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-exp_id",  0, "define exposure ID", "");
     76    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-class",  0, "define class", "");
     77    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-class_id",  0, "define class ID", "");
     78    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-url",  0, "define URL", "");
    7179
    7280    if (config->mode == P2_MODE_NONE) {
     
    8088        printf("\nPan-STARRS Phase 2 Search Tool\n\n");
    8189        printf("Usage: %s [mode] [options]\n\n", argv[0]);
    82         printf(" [mode] : -quick | -define | -pending | -update\n\n");
     90        printf(" [mode] : -quick | -define | -pending | -donee\n\n");
    8391        psArgumentHelp(config->arguments);
    8492        psFree(config->arguments);
     
    8997    config->camera_name = psMetadataLookupStr(&status, config->arguments,
    9098        "-inst");
     99    // XXX why is "" being returned when -inst is missing?
     100    if (strcmp(config->camera_name, "") == 0) {
     101        config->camera_name = NULL;
     102    }
     103    config->exp_id = psMetadataLookupStr(&status, config->arguments, "-exp_id");
     104    config->class = psMetadataLookupStr(&status, config->arguments, "-class");
     105    config->class_id = psMetadataLookupStr(&status, config->arguments,
     106        "-class_id");
     107    config->url = psMetadataLookupStr(&status, config->arguments, "-url");
     108
    91109    // add the input and output images to the arguments list
    92110    //psMetadataAddStr (config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[1]);
  • trunk/ippTools/src/p2searchRawFrames.c

    r6133 r6150  
    66
    77    // build 'where' structure
    8     psMetadata *where = psMetadataAlloc ();
     8    psMetadata *where = NULL;
     9   
     10    if (config->camera_name || config->filter) {
     11        where = psMetadataAlloc();
     12    }
    913
    1014//    psMetadataAddS32  (where, PS_LIST_TAIL, "TYPE",  0, "==", P2_TYPE_OBJECT);
    1115
     16    config->camera_name = NULL;
    1217    if (config->camera_name != NULL) {
    1318        psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==",
  • trunk/ippTools/src/pxtools.h

    r6134 r6150  
    2020    P2_MODE_DEFINE,                     // grab from raw, create pending
    2121    P2_MODE_PENDING,                    // grab from pending, output for ppImage
    22     P2_MODE_UPDATE,                     // set the current state
     22//    P2_MODE_UPDATE,                   // set the current state
    2323    P2_MODE_DONE,                       // set the current state
    2424    P2_MODE_CREATE,                     // set the current state
     
    4040    psMetadata *recipe;
    4141    psMetadata *arguments;
     42    char *exp_id;
     43    char *class;
     44    char *class_id;
     45    char *url;
    4246} p2Config;
    4347
Note: See TracChangeset for help on using the changeset viewer.