IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7369


Ignore:
Timestamp:
Jun 6, 2006, 1:45:35 PM (20 years ago)
Author:
jhoblitt
Message:

stub out -residexp

Location:
trunk/ippTools/src
Files:
3 edited

Legend:

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

    r7367 r7369  
    2626static bool residMode(pxConfig *config);
    2727static bool addresidexpMode(pxConfig *config);
     28static bool residexpMode(pxConfig *config);
    2829
    2930static detInputExpRow *rawDetrenTodetInputExpRow(rawDetrendExpRow *rawExp, psS32 det_id);
     
    107108        case DETTOOL_MODE_ADDRESIDEXP:
    108109            if (addresidexpMode(config)) {
     110                goto FAIL;
     111            }
     112            break;
     113        case DETTOOL_MODE_RESIDEXP:
     114            if (residexpMode(config)) {
    109115                goto FAIL;
    110116            }
     
    15981604    return true;
    15991605}
     1606
     1607static bool residexpMode(pxConfig *config)
     1608{
     1609    PS_ASSERT_PTR_NON_NULL(config, false);
     1610    return true;
     1611}
  • trunk/ippTools/src/dettool.h

    r7363 r7369  
    2020    DETTOOL_MODE_ADDRESID,
    2121    DETTOOL_MODE_RESID,
    22     DETTOOL_MODE_ADDRESIDEXP
     22    DETTOOL_MODE_ADDRESIDEXP,
     23    DETTOOL_MODE_RESIDEXP
    2324} dettoolMode;
    2425
  • trunk/ippTools/src/dettoolConfig.c

    r7367 r7369  
    188188    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-iter",  0,
    189189        "search for iteration number", NULL);
     190    psMetadataAddStr(addresidArgs, PS_LIST_TAIL, "-exp_id",  0,
     191        "define detrend ID (required)", NULL);
    190192    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-class_id",  0,
    191193        "search for class ID", NULL);
     
    209211    psMetadataAddBool(addresidexpArgs, PS_LIST_TAIL, "-accept",  0,
    210212        "define as having acceptable residuals", false);
     213
     214    // -residexp
     215    psMetadata *residexpArgs = psMetadataAlloc();
     216    psMetadataAddStr(residexpArgs, PS_LIST_TAIL, "-det_id",  0,
     217        "search for detrend ID (required)", NULL);
     218    psMetadataAddStr(residexpArgs, PS_LIST_TAIL, "-iter",  0,
     219        "search for iteration number", NULL);
     220    psMetadataAddStr(residexpArgs, PS_LIST_TAIL, "-class_id",  0,
     221        "search for class ID", NULL);
     222    psMetadataAddStr(residexpArgs, PS_LIST_TAIL, "-stats",  0,
     223        "search for stats", NULL);
     224    psMetadataAddStr(residexpArgs, PS_LIST_TAIL, "-recipe",  0,
     225        "search for recipe", NULL);
     226    psMetadataAddBool(residexpArgs, PS_LIST_TAIL, "-accept",  0,
     227        "search for acceptable residuals", false);
    211228
    212229#define PXTOOL_MODE(option, modeval, argset) \
     
    245262    PXTOOL_MODE("-resid",           DETTOOL_MODE_RESID,         residArgs);
    246263    PXTOOL_MODE("-addresidexp",     DETTOOL_MODE_ADDRESIDEXP,  addresidexpArgs);
     264    PXTOOL_MODE("-residexp",        DETTOOL_MODE_RESIDEXP,     residexpArgs);
    247265
    248266    bool argErr = false;
     
    258276        printf("\nPan-STARRS Detrend Tool\n");
    259277        printf("Usage: %s <mode> [<options>]\n\n", argv[0]);
    260         printf(" <mode> : [-define|-raw|-addprocessed|-processed|-addstacked|-stacked|-stackedframe|-addnormalized|-normalized|-normalizedframe|-addresid|-resid|-addresidexp]\n\n");
     278        printf(" <mode> : [-define|-raw|-addprocessed|-processed|-addstacked|-stacked|-stackedframe|-addnormalized|-normalized|-normalizedframe|-addresid|-resid|-addresidexp|-residexp]\n\n");
    261279        fprintf (stdout, "-define ");
    262280        psArgumentHelp(defineArgs);
     
    304322        psArgumentHelp(addresidexpArgs);
    305323        psFree(addresidexpArgs);
     324        fprintf (stdout, "-residexp ");
     325        psArgumentHelp(residexpArgs);
     326        psFree(residexpArgs);
    306327
    307328        exit(EXIT_FAILURE);
     
    321342    psFree(residArgs);
    322343    psFree(addresidexpArgs);
     344    psFree(residexpArgs);
    323345
    324346    // setup search criterion
     
    338360    int n = 0;
    339361    bool status = false;
     362    bool boolean = false;
    340363
    341364    addWhereStr(det_id);
     
    367390        }
    368391    }
     392    if ((boolean = psMetadataLookupBool(&status, config->args, "-accept"))) {
     393        if (!psMetadataAddBool(config->where, PS_LIST_TAIL, "accept", 0, "==", boolean)) {
     394            psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
     395            exit(EXIT_FAILURE);
     396        }
     397    }
    369398}
    370399
Note: See TracChangeset for help on using the changeset viewer.