Changeset 8286
- Timestamp:
- Aug 10, 2006, 6:26:13 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r8279 r8286 10 10 11 11 static bool pendingMode(pxConfig *config); 12 static bool defineMode(pxConfig *config); 12 static bool definebyexpMode(pxConfig *config); 13 static bool definebyqueryMode(pxConfig *config); 13 14 static bool runsMode(pxConfig *config); 14 static bool selectrunMode(pxConfig *config);15 static bool selectMode(pxConfig *config);16 15 static bool inputMode(pxConfig *config); 17 16 static bool rawMode(pxConfig *config); 18 static bool addprocMode(pxConfig *config); 19 static bool procMode(pxConfig *config); 20 static bool addstacMode(pxConfig *config); 21 static bool stacMode(pxConfig *config); 22 static bool stacframeMode(pxConfig *config); 17 //static bool selectrunMode(pxConfig *config); 18 //static bool selectMode(pxConfig *config); 19 static bool addprocessedMode(pxConfig *config); 20 static bool tostackMode(pxConfig *config); 21 static bool processedMode(pxConfig *config); 22 static bool addstackedMode(pxConfig *config); 23 static bool stackedMode(pxConfig *config); 24 static bool stacframeMode(pxConfig *config); // needed? 25 static bool tonormalizeMode(pxConfig *config); 26 static bool addnormstatMode(pxConfig *config); 27 static bool normstatMode(pxConfig *config); 23 28 static bool addnormalizedMode(pxConfig *config); 24 static bool normalizedMode(pxConfig *config); 25 static bool normalizedframeMode(pxConfig *config); 26 static bool addresidMode(pxConfig *config); 27 static bool residMode(pxConfig *config); 29 static bool toresidMode(pxConfig *config); 30 static bool addresidimfileMode(pxConfig *config); 31 static bool normalizedMode(pxConfig *config); // needed? 32 static bool toresidexpMode(pxConfig *config); 33 static bool normalizedframeMode(pxConfig *config);// neede? 34 static bool residimfileMode(pxConfig *config); 28 35 static bool addresidexpMode(pxConfig *config); 29 36 static bool residexpMode(pxConfig *config); … … 53 60 54 61 switch (config->mode) { 55 MODECASE(DETTOOL_MODE_PENDING, pendingMode); 56 MODECASE(DETTOOL_MODE_DEFINE, defineMode); 57 MODECASE(DETTOOL_MODE_RUNS, runsMode); 58 MODECASE(DETTOOL_MODE_SELECTRUN, selectrunMode); 59 MODECASE(DETTOOL_MODE_SELECT, selectMode); 60 MODECASE(DETTOOL_MODE_INPUT, inputMode); 61 MODECASE(DETTOOL_MODE_RAW, rawMode); 62 MODECASE(DETTOOL_MODE_ADDPROCESSED, addprocMode); 63 MODECASE(DETTOOL_MODE_PROCESSED, procMode); 64 MODECASE(DETTOOL_MODE_ADDSTACKED, addstacMode); 65 MODECASE(DETTOOL_MODE_STACKED, stacMode); 66 MODECASE(DETTOOL_MODE_STACKEDFRAME, stacframeMode); 67 MODECASE(DETTOOL_MODE_ADDNORMALIZED, addnormalizedMode); 68 MODECASE(DETTOOL_MODE_NORMALIZED, normalizedMode); 69 MODECASE(DETTOOL_MODE_NORMALIZEDFRAME, normalizedframeMode); 70 MODECASE(DETTOOL_MODE_ADDRESID, addresidMode); 71 MODECASE(DETTOOL_MODE_RESID, residMode); 72 MODECASE(DETTOOL_MODE_ADDRESIDEXP, addresidexpMode); 73 MODECASE(DETTOOL_MODE_RESIDEXP, residexpMode); 62 MODECASE(DETTOOL_MODE_PENDING, pendingMode); 63 MODECASE(DETTOOL_MODE_DEFINEBYEXP, definebyexpMode); 64 MODECASE(DETTOOL_MODE_DEFINEBYQUERY, definebyqueryMode); 65 MODECASE(DETTOOL_MODE_RUNS, runsMode); 66 MODECASE(DETTOOL_MODE_INPUT, inputMode); 67 MODECASE(DETTOOL_MODE_RAW, rawMode); 68 // MODECASE(DETTOOL_MODE_SELECTRUN, selectrunMode); 69 // MODECASE(DETTOOL_MODE_SELECT, selectMode); 70 MODECASE(DETTOOL_MODE_ADDPROCESSED, addprocessedMode); 71 MODECASE(DETTOOL_MODE_TOSTACK, tostackMode); 72 MODECASE(DETTOOL_MODE_PROCESSED, processedMode); 73 MODECASE(DETTOOL_MODE_ADDSTACKED, addstackedMode); 74 MODECASE(DETTOOL_MODE_STACKED, stackedMode); 75 MODECASE(DETTOOL_MODE_STACKEDFRAME, stacframeMode); // needed? 76 MODECASE(DETTOOL_MODE_TONORMALIZE, tonormalizeMode); 77 MODECASE(DETTOOL_MODE_ADDNORMSTAT, addnormstatMode); 78 MODECASE(DETTOOL_MODE_NORMSTAT, normstatMode); 79 MODECASE(DETTOOL_MODE_ADDNORMALIZED, addnormalizedMode); 80 MODECASE(DETTOOL_MODE_NORMALIZED, normalizedMode); 81 MODECASE(DETTOOL_MODE_TORESID, toresidMode); 82 MODECASE(DETTOOL_MODE_ADDRESIDIMFILE, addresidimfileMode); 83 MODECASE(DETTOOL_MODE_TORESIDEXP, toresidexpMode); 84 MODECASE(DETTOOL_MODE_NORMALIZEDFRAME, normalizedframeMode); // needed? 85 MODECASE(DETTOOL_MODE_RESIDIMFILE, residimfileMode); 86 MODECASE(DETTOOL_MODE_ADDRESIDEXP, addresidexpMode); 87 MODECASE(DETTOOL_MODE_RESIDEXP, residexpMode); 74 88 MODECASE(DETTOOL_MODE_DECLAREMASTERFRAME, declaremasterframeMode); 75 MODECASE(DETTOOL_MODE_MASTERFRAME, masterframeMode);76 MODECASE(DETTOOL_MODE_MASTER, masterMode);77 MODECASE(DETTOOL_MODE_RERUN, rerunMode);89 MODECASE(DETTOOL_MODE_MASTERFRAME, masterframeMode); 90 MODECASE(DETTOOL_MODE_MASTER, masterMode); 91 MODECASE(DETTOOL_MODE_RERUN, rerunMode); 78 92 default: 79 93 psAbort(argv[0], "invalid option (this should not happen)"); 80 94 } 81 82 psFree(config); 83 pmConfigDone(); 95 psFree(config); pmConfigDone(); 84 96 psLibFinalize(); 85 97 … … 136 148 } 137 149 138 static bool define Mode(pxConfig *config)150 static bool definebyexpMode(pxConfig *config) 139 151 { 140 152 bool status = false; … … 262 274 printf("%ld\n", det_id); 263 275 276 return true; 277 } 278 279 static bool definebyqueryMode(pxConfig *config) 280 { 264 281 return true; 265 282 } … … 347 364 } 348 365 366 #if 0 349 367 static bool selectrunMode(pxConfig *config) 350 368 { … … 466 484 return true; 467 485 } 486 487 #endif 488 468 489 static detInputExpRow *rawDetrenTodetInputExpRow(rawDetrendExpRow *rawExp, psS32 det_id, psS32 iteration) 469 490 { … … 620 641 } 621 642 622 static bool addproc Mode(pxConfig *config)643 static bool addprocessedMode(pxConfig *config) 623 644 { 624 645 PS_ASSERT_PTR_NON_NULL(config, false); … … 710 731 } 711 732 712 static bool procMode(pxConfig *config) 733 static bool tostackMode(pxConfig *config) 734 { 735 return true; 736 } 737 738 static bool processedMode(pxConfig *config) 713 739 { 714 740 PS_ASSERT_PTR_NON_NULL(config, false); … … 967 993 } 968 994 969 static bool addstac Mode(pxConfig *config)995 static bool addstackedMode(pxConfig *config) 970 996 { 971 997 PS_ASSERT_PTR_NON_NULL(config, false); … … 1066 1092 } 1067 1093 1068 static bool stac Mode(pxConfig *config)1094 static bool stackedMode(pxConfig *config) 1069 1095 { 1070 1096 PS_ASSERT_PTR_NON_NULL(config, false); … … 1224 1250 } 1225 1251 1252 static bool tonormalizeMode(pxConfig *config) 1253 { 1254 return true; 1255 } 1256 1257 static bool addnormstatMode(pxConfig *config) 1258 { 1259 return true; 1260 } 1261 1262 static bool normstatMode(pxConfig *config) 1263 { 1264 return true; 1265 } 1266 1226 1267 static psArray *validDetInputClassIds(pxConfig *config, const char *det_id) 1227 1268 { … … 1415 1456 psFree(masterImfile); 1416 1457 1458 return true; 1459 } 1460 1461 static bool toresidMode(pxConfig *config) 1462 { 1417 1463 return true; 1418 1464 } … … 1497 1543 } 1498 1544 1545 static bool toresidexpMode(pxConfig *config) 1546 { 1547 return true; 1548 } 1549 1499 1550 static bool normalizedframeMode(pxConfig *config) 1500 1551 { … … 1580 1631 } 1581 1632 1582 static bool addresid Mode(pxConfig *config)1633 static bool addresidimfileMode(pxConfig *config) 1583 1634 { 1584 1635 PS_ASSERT_PTR_NON_NULL(config, false); … … 1720 1771 } 1721 1772 1722 static bool resid Mode(pxConfig *config)1773 static bool residimfileMode(pxConfig *config) 1723 1774 { 1724 1775 PS_ASSERT_PTR_NON_NULL(config, false); -
trunk/ippTools/src/dettool.h
r8175 r8286 7 7 DETTOOL_MODE_NONE = 0x0, 8 8 DETTOOL_MODE_PENDING, 9 DETTOOL_MODE_DEFINE, 9 DETTOOL_MODE_DEFINEBYEXP, 10 DETTOOL_MODE_DEFINEBYQUERY, 10 11 DETTOOL_MODE_RUNS, 11 DETTOOL_MODE_SELECTRUN,12 DETTOOL_MODE_SELECT,13 12 DETTOOL_MODE_INPUT, 14 13 DETTOOL_MODE_RAW, 14 // DETTOOL_MODE_SELECTRUN, 15 // DETTOOL_MODE_SELECT, 15 16 DETTOOL_MODE_ADDPROCESSED, 17 DETTOOL_MODE_TOSTACK, 16 18 DETTOOL_MODE_PROCESSED, 17 19 DETTOOL_MODE_ADDSTACKED, 18 20 DETTOOL_MODE_STACKED, 19 21 DETTOOL_MODE_STACKEDFRAME, 22 DETTOOL_MODE_TONORMALIZE, 23 DETTOOL_MODE_ADDNORMSTAT, 24 DETTOOL_MODE_NORMSTAT, 20 25 DETTOOL_MODE_ADDNORMALIZED, 21 26 DETTOOL_MODE_NORMALIZED, 27 DETTOOL_MODE_TORESID, 28 DETTOOL_MODE_ADDRESIDIMFILE, 29 DETTOOL_MODE_TORESIDEXP, 22 30 DETTOOL_MODE_NORMALIZEDFRAME, 23 DETTOOL_MODE_ADDRESID, 24 DETTOOL_MODE_RESID, 31 DETTOOL_MODE_RESIDIMFILE, 25 32 DETTOOL_MODE_ADDRESIDEXP, 26 33 DETTOOL_MODE_RESIDEXP, -
trunk/ippTools/src/dettoolConfig.c
r8218 r8286 38 38 "use the simple output format", false); 39 39 40 // -define 41 psMetadata *defineArgs = psMetadataAlloc(); 42 psMetadataAddStr(defineArgs, PS_LIST_TAIL, "-exp_id", PS_META_DUPLICATE_OK, 43 "include this exposure (multiple OK, required)", NULL); 44 psMetadataAddStr(defineArgs, PS_LIST_TAIL, "-det_type", 0, 45 "define the type of detrend run (required)", NULL); 40 // -definebyexp 41 psMetadata *definebyexpArgs = psMetadataAlloc(); 42 psMetadataAddStr(definebyexpArgs, PS_LIST_TAIL, "-exp_id", 43 PS_META_DUPLICATE_OK, 44 "include this exposure (multiple OK, required)", NULL); 45 psMetadataAddStr(definebyexpArgs, PS_LIST_TAIL, "-det_type", 0, 46 "define the type of detrend run (required)", NULL); 46 47 47 48 // -runs … … 52 53 "use the simple output format", false); 53 54 55 #if 0 54 56 // XXX temporary 55 57 // -selectrun … … 71 73 psMetadataAddStr(selectArgs, PS_LIST_TAIL, "-classID", 0, 72 74 "defined class ID (required)", NULL); 75 #endif 73 76 74 77 // -input … … 204 207 "use the simple output format", false); 205 208 206 // -addresid 207 psMetadata *addresid Args = psMetadataAlloc();208 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-det_id", 0,209 "define detrend ID (required)", NULL); 210 psMetadataAddS32(addresid Args, PS_LIST_TAIL, "-iteration", 0,209 // -addresidimfile 210 psMetadata *addresidimfileArgs = psMetadataAlloc(); 211 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-det_id", 0, 212 "define detrend ID (required)", NULL); 213 psMetadataAddS32(addresidimfileArgs, PS_LIST_TAIL, "-iteration", 0, 211 214 "define iteration number", 0); 212 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-exp_id", 0,213 "define detrend ID (required)", NULL); 214 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-class_id", 0,215 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-exp_id", 0, 216 "define detrend ID (required)", NULL); 217 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-class_id", 0, 215 218 "define class ID (required)", NULL); 216 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-recip", 0,219 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-recip", 0, 217 220 "define recipe (required)", NULL); 218 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-uri", 0,221 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-uri", 0, 219 222 "define resid file URI (required)", NULL); 220 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-b1_uri", 0,223 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-b1_uri", 0, 221 224 "define banana 1", NULL); 222 psMetadataAddStr(addresid Args, PS_LIST_TAIL, "-b2_uri", 0,225 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-b2_uri", 0, 223 226 "define banana 2", NULL); 224 227 225 // -resid 226 psMetadata *resid Args = psMetadataAlloc();227 psMetadataAddStr(resid Args, PS_LIST_TAIL, "-det_id", 0,228 // -residimfile 229 psMetadata *residimfileArgs = psMetadataAlloc(); 230 psMetadataAddStr(residimfileArgs, PS_LIST_TAIL, "-det_id", 0, 228 231 "search for detrend ID (required)", NULL); 229 psMetadataAddS32(resid Args, PS_LIST_TAIL, "-iteration", 0,232 psMetadataAddS32(residimfileArgs, PS_LIST_TAIL, "-iteration", 0, 230 233 "search for iteration number", 0); 231 psMetadataAddStr(resid Args, PS_LIST_TAIL, "-exp_id", 0,232 "define detrend ID (required)", NULL); 233 psMetadataAddStr(resid Args, PS_LIST_TAIL, "-class_id", 0,234 "search for class ID", NULL); 235 psMetadataAddStr(resid Args, PS_LIST_TAIL, "-recip", 0,234 psMetadataAddStr(residimfileArgs, PS_LIST_TAIL, "-exp_id", 0, 235 "define detrend ID (required)", NULL); 236 psMetadataAddStr(residimfileArgs, PS_LIST_TAIL, "-class_id", 0, 237 "search for class ID", NULL); 238 psMetadataAddStr(residimfileArgs, PS_LIST_TAIL, "-recip", 0, 236 239 "search for recipe", NULL); 237 psMetadataAddBool(resid Args, PS_LIST_TAIL, "-simple", 0,240 psMetadataAddBool(residimfileArgs, PS_LIST_TAIL, "-simple", 0, 238 241 "use the simple output format", false); 239 242 … … 313 316 // find which mode we're running under 314 317 PXTOOL_MODE("-pending", DETTOOL_MODE_PENDING, pendingArgs); 315 PXTOOL_MODE("-define ", DETTOOL_MODE_DEFINE, defineArgs);318 PXTOOL_MODE("-definebyexp", DETTOOL_MODE_DEFINEBYEXP, definebyexpArgs); 316 319 PXTOOL_MODE("-raw", DETTOOL_MODE_RAW, rawArgs); 317 320 PXTOOL_MODE("-runs", DETTOOL_MODE_RUNS, runsArgs); 318 PXTOOL_MODE("-selectrun", DETTOOL_MODE_SELECTRUN, selectrunArgs);319 PXTOOL_MODE("-select", DETTOOL_MODE_SELECT, selectArgs);321 // PXTOOL_MODE("-selectrun", DETTOOL_MODE_SELECTRUN, selectrunArgs); 322 // PXTOOL_MODE("-select", DETTOOL_MODE_SELECT, selectArgs); 320 323 PXTOOL_MODE("-input", DETTOOL_MODE_INPUT, inputArgs); 321 324 PXTOOL_MODE("-addprocessed", DETTOOL_MODE_ADDPROCESSED, addprocArgs); … … 327 330 PXTOOL_MODE("-normalized", DETTOOL_MODE_NORMALIZED, normalizedArgs); 328 331 PXTOOL_MODE("-normalizedframe", DETTOOL_MODE_NORMALIZEDFRAME,normalizedframeArgs); 329 PXTOOL_MODE("-addresid ", DETTOOL_MODE_ADDRESID, addresidArgs);330 PXTOOL_MODE("-resid ", DETTOOL_MODE_RESID, residArgs);332 PXTOOL_MODE("-addresidimfile", DETTOOL_MODE_ADDRESIDIMFILE, addresidimfileArgs); 333 PXTOOL_MODE("-residimfile", DETTOOL_MODE_RESIDIMFILE, residimfileArgs); 331 334 PXTOOL_MODE("-addresidexp", DETTOOL_MODE_ADDRESIDEXP, addresidexpArgs); 332 335 PXTOOL_MODE("-residexp", DETTOOL_MODE_RESIDEXP, residexpArgs); … … 348 351 printf("\nPan-STARRS Detrend Tool\n"); 349 352 printf("Usage: %s <mode> [<options>]\n\n", argv[0]); 350 printf(" <mode> : [-pending|-define |-runs|-selectrun|-select|-raw|-addprocessed|-processed|-addstacked|-stacked|-stackedframe|-addnormalized|-normalized|-normalizedframe|-addresid|-resid|-addresidexp|-residexp|-declaremasterframe|-masterframe|-master|-rerun]\n\n");353 printf(" <mode> : [-pending|-definebyexp|-runs|-selectrun|-select|-raw|-addprocessed|-processed|-addstacked|-stacked|-stackedframe|-addnormalized|-normalized|-normalizedframe|-addresidimfile|-residimfile|-addresidexp|-residexp|-declaremasterframe|-masterframe|-master|-rerun]\n\n"); 351 354 fprintf (stdout, "-pending "); 352 355 psArgumentHelp(pendingArgs); 353 356 psFree(pendingArgs); 354 fprintf (stdout, "-define ");355 psArgumentHelp(define Args);356 psFree(define Args);357 fprintf (stdout, "-definebyexp "); 358 psArgumentHelp(definebyexpArgs); 359 psFree(definebyexpArgs); 357 360 fprintf (stdout, "-runs "); 358 361 psArgumentHelp(runsArgs); 359 362 psFree(runsArgs); 363 #if 0 360 364 fprintf (stdout, "-selectrun "); 361 365 psArgumentHelp(selectrunArgs); … … 364 368 psArgumentHelp(selectArgs); 365 369 psFree(selectArgs); 370 #endif 366 371 fprintf (stdout, "-input "); 367 372 psArgumentHelp(inputArgs); … … 395 400 psFree(normalizedframeArgs); 396 401 fprintf (stdout, "-addresid "); 397 psArgumentHelp(addresid Args);398 psFree(addresid Args);399 fprintf (stdout, "-resid ");400 psArgumentHelp(resid Args);401 psFree(resid Args);402 psArgumentHelp(addresidimfileArgs); 403 psFree(addresidimfileArgs); 404 fprintf (stdout, "-residimfile "); 405 psArgumentHelp(residimfileArgs); 406 psFree(residimfileArgs); 402 407 fprintf (stdout, "-addresidexp "); 403 408 psArgumentHelp(addresidexpArgs); … … 423 428 424 429 psFree(pendingArgs); 425 psFree(define Args);430 psFree(definebyexpArgs); 426 431 psFree(runsArgs); 427 psFree(selectrunArgs);428 psFree(selectArgs);432 // psFree(selectrunArgs); 433 // psFree(selectArgs); 429 434 psFree(inputArgs); 430 435 psFree(rawArgs); … … 437 442 psFree(normalizedArgs); 438 443 psFree(normalizedframeArgs); 439 psFree(addresid Args);440 psFree(resid Args);444 psFree(addresidimfileArgs); 445 psFree(residimfileArgs); 441 446 psFree(addresidexpArgs); 442 447 psFree(residexpArgs);
Note:
See TracChangeset
for help on using the changeset viewer.
