IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 3, 2011, 2:25:17 PM (15 years ago)
Author:
watersc1
Message:

difftool: add the ability to specify both the input_warp_id and the template_warp_id. This allows us to explicitly say "subtract this one from that one."
stacktool: fix stackAssociation listing to supply the information, even if stackSumSkyfile isn't populated yet.
laptool: LAP now works cleanly from -definesequence through the final stack stage for runs that do not require a quickstack.

Location:
branches/czw_branch/20110406/ippTools/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20110406/ippTools/src/difftool.c

    r31253 r31428  
    16251625    PXOPT_COPY_S64(config->args, selectWhere, "-exp_id", "inputRawExp.exp_id", "==");
    16261626    PXOPT_COPY_S64(config->args, selectWhere, "-template_exp_id", "templateRawExp.exp_id", "==");
     1627    PXOPT_COPY_S64(config->args, selectWhere, "-template_warp_id", "templateWarpRun.warp_id", "==");
    16271628    PXOPT_COPY_STR(config->args, selectWhere, "-filter", "inputRawExp.filter", "==");
    16281629    PXOPT_COPY_STR(config->args, selectWhere, "-obs_mode", "inputRawExp.obs_mode", "==");
  • branches/czw_branch/20110406/ippTools/src/difftoolConfig.c

    r31253 r31428  
    278278    psMetadataAddBool(definewarpwarpArgs, PS_LIST_TAIL, "-not-bothways",  0, "only do the single-direction subtraction?", false);
    279279    psMetadataAddS64(definewarpwarpArgs, PS_LIST_TAIL,  "-template_exp_id",  0,  "search by template exposure ID", 0);
     280    psMetadataAddS64(definewarpwarpArgs, PS_LIST_TAIL,  "-template_warp_id",  0,  "search by template warp ID", 0);
    280281    psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-filter", 0, "search by filter", NULL);
    281282    psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-distance", 0, "limit distance between input and template (deg)", NAN);
  • branches/czw_branch/20110406/ippTools/src/laptool.c

    r31417 r31428  
    295295    return(false);
    296296  }
    297   psStringAppend(&query, " %s", whereClause);
     297
     298  if (whereClause) {
     299    psStringSubstitute(&query,whereClause,"@WHERE@");
     300  }
    298301  psFree(where);
    299302
     
    467470      }
    468471      else {
    469         return(false);
     472        return(true); // We shouldn't really fail if we didn't change anything. Maybe there's nothing to change.
    470473      }
    471474    }
    472     return(true);
    473   }
    474   else {
    475     return(false);
    476   }
     475
     476  }
     477
     478  return(true);
    477479}
    478480
     
    496498  if (psListLength(where->list)) {
    497499    psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    498     psStringAppend(&query, " WHERE %s", whereClause);
     500    psStringAppend(&query, "\n AND %s", whereClause);
    499501    psFree(whereClause);
    500502  }
    501 
     503  psStringAppend(&query, " ORDER BY rawExp.dateobs ");
     504 
    502505  if (limit) {
    503506    psString limitString = psDBGenerateLimitSQL(limit);
    504     psStringAppend(&query, " %s", limitString);
     507    psStringAppend(&query, "\n %s", limitString);
    505508    psFree(limitString);
    506509  }
    507   psStringAppend(&query, " ORDER BY rawExp.dateobs ");
     510
    508511 
    509512  if (!p_psDBRunQuery(config->dbh, query)) {
     
    615618
    616619  psMetadata *where = psMetadataAlloc();
    617   PXOPT_COPY_S64(config->args, where, "-lap_id", "lap_id", "==");
     620  PXOPT_COPY_S64(config->args, where, "-lap_id", "lapRun.lap_id", "==");
    618621 
    619622  psString query = pxDataGet("laptool_stacks.sql");
Note: See TracChangeset for help on using the changeset viewer.