IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 27, 2008, 5:02:40 PM (18 years ago)
Author:
jhoblitt
Message:

add stacktool -definebyquery select options

File:
1 edited

Legend:

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

    r16688 r16697  
    103103    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
    104104
     105    psMetadata *where = psMetadataAlloc();
     106    PXOPT_COPY_STR(config->args, where, "-select_exp_type", "exp_type", "==");
     107    // map -inst -> camera
     108    PXOPT_COPY_STR(config->args, where, "-select_inst", "camera", "==");
     109    PXOPT_COPY_STR(config->args, where, "-select_telescope", "telescope", "==");
     110    PXOPT_COPY_STR(config->args, where, "-select_filter", "filter", "==");
     111    PXOPT_COPY_STR(config->args, where, "-select_uri", "uri", "==");
     112    PXOPT_COPY_TIME(config->args, where, "-select_dateobs_begin", "dateobs", ">=");
     113    PXOPT_COPY_TIME(config->args, where, "-select_dateobs_end", "dateobs", "<");
     114    PXOPT_COPY_F32(config->args, where, "-select_airmass_min", "airmass", ">=");
     115    PXOPT_COPY_F32(config->args, where, "-select_airmass_max", "airmass", "<=");
     116    PXOPT_COPY_F32(config->args, where, "-select_sat_pixel_frac_max", "sat_pixel_frac", "<=");
     117    PXOPT_COPY_F32(config->args, where, "-select_exp_time_min", "exp_time", ">=");
     118    PXOPT_COPY_F32(config->args, where, "-select_exp_time_max", "exp_time", "<=");
     119    PXOPT_COPY_F32(config->args, where, "-select_ccd_temp_min", "ccd_temp", ">=");
     120    PXOPT_COPY_F32(config->args, where, "-select_ccd_temp_max", "ccd_temp", "<=");
     121    PXOPT_COPY_F32(config->args, where, "-select_posang_min", "posang", ">=");
     122    PXOPT_COPY_F32(config->args, where, "-select_posang_max", "posang", "<=");
     123    PXOPT_COPY_F32(config->args, where, "-select_solang_min", "solang", ">=");
     124    PXOPT_COPY_F32(config->args, where, "-select_solang_max", "solang", "<=");
     125
     126    if (!psListLength(where->list)) {
     127        psFree(where);
     128        where = NULL;
     129    }
    105130
    106131    psString query = pxDataGet("stacktool_find_complete_warps.sql");
     
    110135    }
    111136
    112     if (config->where) {
    113         psString whereClause = psDBGenerateWhereConditionSQL(config->where, NULL);
     137    if (where) {
     138        psString whereClause = psDBGenerateWhereConditionSQL(where, "rawExp");
    114139        psStringAppend(&query, " AND %s", whereClause);
    115140        psFree(whereClause);
Note: See TracChangeset for help on using the changeset viewer.