IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2009, 5:20:29 PM (17 years ago)
Author:
watersc1
Message:

Finished up my edits to the detrend cleanup, and some changes to my
copy of burntool and the pslib astrometry. Detrend cleanup has not
been tested yet. That's up next.

Location:
branches/czw_branch/cleanup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup

  • branches/czw_branch/cleanup/ippTools/src/disttool.c

    r24460 r24951  
    189189    PXOPT_COPY_S64(config->args, where, "-exp_id",    "rawExp.exp_id",           "==");
    190190    PXOPT_COPY_S64(config->args, where, "-chip_id",   "chipRun.chip_id",         "==");
    191     PXOPT_COPY_STR(config->args, where, "-obs_mode",  "rawExp.obs_mode",         "==");
    192191
    193192    PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
     
    204203            psFree(where);
    205204            return false;
     205        }
     206
     207        // for raw stage we select by chipRun.label because raw labels typically aren't set
     208        if (label) {
     209            psStringAppend(&query, " AND (chipRun.label = '%s')", label);
    206210        }
    207211    } else if (!strcmp(stage, "chip")) {
     
    374378        psS64 stage_id = psMetadataLookupS64(NULL, md, "stage_id");
    375379        psS64 target_id = psMetadataLookupS64(NULL, md, "target_id");
     380        psString target_label = psMetadataLookupStr(NULL, md, "label");
    376381        bool clean = psMetadataLookupBool(NULL, md, "clean");
    377382
     
    379384        psStringAppend(&outroot, "%s/%s/%s", workdir, run_tag, stage);
    380385
     386        if (set_label == NULL) {
     387            set_label = target_label;
     388        }
    381389        distRunRow *row = distRunRowAlloc(
    382390                0,      // dist_id
     
    857865    psMetadata *where = psMetadataAlloc();
    858866    PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "==");
    859     pxAddLabelSearchArgs (config, where, "-label", "label", "==");
     867    pxAddLabelSearchArgs (config, where, "-label", "distRun.label", "==");
    860868
    861869    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    12651273
    12661274    // required
    1267     PXOPT_LOOKUP_STR(obs_mode, config->args, "-obs_mode", true, false);
     1275    PXOPT_LOOKUP_STR(label, config->args, "-label", true, false);
     1276    PXOPT_LOOKUP_STR(filter, config->args, "-filter", true, false);
    12681277    PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false);
    12691278
     
    12751284    distTargetRow *row = distTargetRowAlloc(
    12761285            0,          // target_id
    1277             obs_mode,
     1286            label,
     1287            filter,
    12781288            stage,
    12791289            clean,
     
    13111321    psMetadata *where = psMetadataAlloc();
    13121322    PXOPT_COPY_S64(config->args, where, "-target_id", "target_id", "==");
    1313     PXOPT_COPY_STR(config->args, where, "-obs_mode", "obs_mode", "==");
     1323    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     1324    PXOPT_COPY_STR(config->args, where, "-filter", "filter", "==");
    13141325    PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");
    13151326
     
    13461357    psMetadata *where = psMetadataAlloc();
    13471358    PXOPT_COPY_S64(config->args, where, "-target_id", "target_id", "==");
    1348     PXOPT_COPY_STR(config->args, where, "-obs_mode", "obs_mode", "==");
     1359    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     1360    PXOPT_COPY_STR(config->args, where, "-filter", "filter", "==");
    13491361    PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");
    13501362    PXOPT_COPY_STR(config->args, where, "-state", "state", "==");
     
    13681380        psFree(whereClause);
    13691381        if (clean) {
    1370             psStringAppend(&query, " (AND clean)");
     1382            psStringAppend(&query, " AND (clean)");
    13711383        } else if (full) {
    1372             psStringAppend(&query, " (AND !clean)");
     1384            psStringAppend(&query, " AND (!clean)");
    13731385        }
    13741386    } else if (clean) {
Note: See TracChangeset for help on using the changeset viewer.