Changeset 7369
- Timestamp:
- Jun 6, 2006, 1:45:35 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r7367 r7369 26 26 static bool residMode(pxConfig *config); 27 27 static bool addresidexpMode(pxConfig *config); 28 static bool residexpMode(pxConfig *config); 28 29 29 30 static detInputExpRow *rawDetrenTodetInputExpRow(rawDetrendExpRow *rawExp, psS32 det_id); … … 107 108 case DETTOOL_MODE_ADDRESIDEXP: 108 109 if (addresidexpMode(config)) { 110 goto FAIL; 111 } 112 break; 113 case DETTOOL_MODE_RESIDEXP: 114 if (residexpMode(config)) { 109 115 goto FAIL; 110 116 } … … 1598 1604 return true; 1599 1605 } 1606 1607 static bool residexpMode(pxConfig *config) 1608 { 1609 PS_ASSERT_PTR_NON_NULL(config, false); 1610 return true; 1611 } -
trunk/ippTools/src/dettool.h
r7363 r7369 20 20 DETTOOL_MODE_ADDRESID, 21 21 DETTOOL_MODE_RESID, 22 DETTOOL_MODE_ADDRESIDEXP 22 DETTOOL_MODE_ADDRESIDEXP, 23 DETTOOL_MODE_RESIDEXP 23 24 } dettoolMode; 24 25 -
trunk/ippTools/src/dettoolConfig.c
r7367 r7369 188 188 psMetadataAddStr(residArgs, PS_LIST_TAIL, "-iter", 0, 189 189 "search for iteration number", NULL); 190 psMetadataAddStr(addresidArgs, PS_LIST_TAIL, "-exp_id", 0, 191 "define detrend ID (required)", NULL); 190 192 psMetadataAddStr(residArgs, PS_LIST_TAIL, "-class_id", 0, 191 193 "search for class ID", NULL); … … 209 211 psMetadataAddBool(addresidexpArgs, PS_LIST_TAIL, "-accept", 0, 210 212 "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); 211 228 212 229 #define PXTOOL_MODE(option, modeval, argset) \ … … 245 262 PXTOOL_MODE("-resid", DETTOOL_MODE_RESID, residArgs); 246 263 PXTOOL_MODE("-addresidexp", DETTOOL_MODE_ADDRESIDEXP, addresidexpArgs); 264 PXTOOL_MODE("-residexp", DETTOOL_MODE_RESIDEXP, residexpArgs); 247 265 248 266 bool argErr = false; … … 258 276 printf("\nPan-STARRS Detrend Tool\n"); 259 277 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"); 261 279 fprintf (stdout, "-define "); 262 280 psArgumentHelp(defineArgs); … … 304 322 psArgumentHelp(addresidexpArgs); 305 323 psFree(addresidexpArgs); 324 fprintf (stdout, "-residexp "); 325 psArgumentHelp(residexpArgs); 326 psFree(residexpArgs); 306 327 307 328 exit(EXIT_FAILURE); … … 321 342 psFree(residArgs); 322 343 psFree(addresidexpArgs); 344 psFree(residexpArgs); 323 345 324 346 // setup search criterion … … 338 360 int n = 0; 339 361 bool status = false; 362 bool boolean = false; 340 363 341 364 addWhereStr(det_id); … … 367 390 } 368 391 } 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 } 369 398 } 370 399
Note:
See TracChangeset
for help on using the changeset viewer.
