IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28001 for trunk


Ignore:
Timestamp:
May 18, 2010, 12:10:07 PM (16 years ago)
Author:
eugene
Message:

adding -comment, -obs_mode, -pretend options to -definebyquery

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r27834 r28001  
    248248    PXOPT_COPY_F64(config->args,   where, "-posang_max",         "rawExp.posang",         "<");
    249249    PXOPT_COPY_STR(config->args,   where, "-object",             "rawExp.object",         "==");
     250    PXOPT_COPY_STR(config->args,   where, "-comment",            "rawExp.comment",        "LIKE");
     251    PXOPT_COPY_STR(config->args,   where, "-obs_mode",           "rawExp.obs_mode",       "LIKE");
    250252    PXOPT_COPY_F32(config->args,   where, "-sun_angle_min",      "rawExp.sun_angle",      ">=");
    251253    PXOPT_COPY_F32(config->args,   where, "-sun_angle_max",      "rawExp.sun_angle",      "<");
     
    273275    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
    274276    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     277    PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false);
    275278
    276279    // check mode
     
    310313    if (!psArrayLength(output)) {
    311314        psTrace("warptool", PS_LOG_INFO, "no rows found");
     315        psFree(output);
     316        return true;
     317    }
     318
     319    if (pretend) {
     320        // negative simple so the default is true
     321        if (!ippdbPrintMetadatas(stdout, output, "rawExp", !simple)) {
     322            psError(PS_ERR_UNKNOWN, false, "failed to print array");
     323            psFree(output);
     324            return false;
     325        }
    312326        psFree(output);
    313327        return true;
  • trunk/ippTools/src/warptoolConfig.c

    r27737 r28001  
    8989    psMetadataAddF64(definebyqueryArgs, PS_LIST_TAIL, "-posang_max",         0, "search by max rotator position angle", NAN);
    9090    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-object",             0, "search by exposure object", NULL);
    91     psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-sun_angle_min",         0, "search by min solar angle", NAN);
    92     psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-sun_angle_max",         0, "search by max solar angle", NAN);
     91    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-comment",            0, "search by comment field (LIKE comparison)", NULL);
     92    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-obs_mode",           0, "search by observation mode", NULL);
     93    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-sun_angle_min",      0, "search by min solar angle", NAN);
     94    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-sun_angle_max",      0, "search by max solar angle", NAN);
    9395    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-reduction",          0, "search by fakeRun reduction class", NULL);
    9496    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search on fakeRun label", NULL);
     
    106108    psMetadataAddTime(definebyqueryArgs, PS_LIST_TAIL, "-registered",  0,            "time detrend run was registered", now);
    107109    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple",  0,            "use the simple output format", false);
     110    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend",  0,            "do not actually modify the database", false);
    108111
    109112    // -definerun
Note: See TracChangeset for help on using the changeset viewer.