IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2009, 2:15:48 PM (17 years ago)
Author:
bills
Message:

For the lookup modes add arguments to lookup by ra, decl

File:
1 edited

Legend:

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

    r25704 r25775  
    692692    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    693693
    694     PXOPT_LOOKUP_U64(magicked, config->args,        "-magicked", false, false);
    695     PXOPT_LOOKUP_BOOL(destreaked, config->args,     "-destreaked", false);
    696     PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false);
    697 
     694
     695    psString where2 = NULL;
     696    pxmagicAddWhere(config, &where2, "diffSkyfile");
     697    pxspaceAddWhere(config, &where2, template ? "rawTemplate" : "rawInput");
    698698    psString query = pxDataGet("difftool_skyfile.sql");
    699699    if (!query) {
     
    706706        psStringAppend(&query, " WHERE %s", whereClause);
    707707        psFree(whereClause);
    708     } else if (!all) {
     708    } else if (all) {
     709        if (where2) {
     710            psStringAppend(&query, " WHERE diffRun.diff_id is not null %s", where2);
     711        }
     712    } else {
    709713        psError(PXTOOLS_ERR_DATA, true, "search parameters or -all are required");
     714        return false;
    710715    }
    711716    psFree(where);
    712 
    713     if (not_destreaked) {
    714         if (destreaked) {
    715             psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense");
    716             return false;
    717         }
    718         if (magicked) {
    719             psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense");
    720             return false;
    721         }
    722         psStringAppend(&query, " AND diffSkyfile.magicked = 0");
    723     }
    724     if (destreaked) {
    725         psStringAppend(&query, " AND diffSkyfile.magicked != 0");
    726     }
    727 
    728717
    729718    // treat limit == 0 as "no limit"
Note: See TracChangeset for help on using the changeset viewer.