IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2014, 3:54:49 PM (12 years ago)
Author:
bills
Message:

accept arugment -replace in releastool -setrelstacktocalibrated and
replace the calibration regardless of state. Used to correct errors

File:
1 edited

Legend:

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

    r37131 r37165  
    11241124
    11251125    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     1126    PXOPT_LOOKUP_BOOL(replace, config->args, "-replace", false);
    11261127
    11271128    psString query = pxDataGet("releasetool_setrelstackcalibratedfromskycal.sql");
     
    11321133    }
    11331134
     1135    if (replace) {
     1136        // don't cut on relStack.state
     1137        psStringAppend(&query, "\nWHERE ");;
     1138    } else {
     1139        // normal path only update rows in state processed
     1140        psStringAppend(&query, "\nWHERE relStack.state = 'processed'\nAND ");;
     1141    }
     1142       
    11341143    // Add in the where conditions
    11351144    psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    1136     psStringAppend(&query, "\nAND %s", whereClause);
     1145    psStringAppend(&query, "%s", whereClause);
    11371146    psFree(whereClause);
    11381147
     
    12331242
    12341243    PXOPT_COPY_STR(config->args, where, "-surveyName",  "survey.surveyName", "LIKE");
    1235     PXOPT_COPY_S32(config->args, where, "-rel_id",      "relExp.rel_id", "==");
     1244    PXOPT_COPY_S32(config->args, where, "-rel_id",      "relStack.rel_id", "==");
    12361245    pxskycellAddWhere(config, where);
    12371246
Note: See TracChangeset for help on using the changeset viewer.