IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2011, 11:52:31 AM (15 years ago)
Author:
eugene
Message:

some reorganization: create ppStackUpdateHeader, ppStackStats, ppStackJPEG functions to clean up ppStackLoop; plug some leaks; cleanup include sections; create ppStackCleanup for end of processing (renamed old ppStackCleanup to ppStackCleanupFiles); move jpeg creation from ppStackCleanupFiles to ppStackJPEG; same for stats; adjust kernel auto-scaling to take place after we have measured the source sizes; update headers with stack_id, skycell_id, tess_id (optional)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackArguments.c

    r28617 r30620  
    1 #ifdef HAVE_CONFIG_H
    2 #include <config.h>
    3 #endif
    4 
    5 #include <stdio.h>
    6 #include <string.h>
    7 #include <pslib.h>
    8 #include <psmodules.h>
    9 
    101#include "ppStack.h"
    112
     
    189180    psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL);
    190181    psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-variance", 0, "Suffix for temporary variance maps", NULL);
    191     psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0,
    192                       "Delete temporary files on completion?", false);
     182    psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0, "Delete temporary files on completion?", false);
    193183    psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads to use", 0);
    194184    psMetadataAddBool(arguments, PS_LIST_TAIL, "-visual", 0, "visualisation", false);
    195185
     186    psMetadataAddStr(arguments, PS_LIST_TAIL, "-stack_id",   0, "stack ID",        NULL);
     187    psMetadataAddStr(arguments, PS_LIST_TAIL, "-skycell_id", 0, "skycell ID",      NULL);
     188    psMetadataAddStr(arguments, PS_LIST_TAIL, "-tess_id",    0, "tessellation ID", NULL);
     189
    196190    if (argc == 1) {
    197191        usage(argv[0], arguments, config);
     192    }
     193
     194    // stack-type : used to define the stack for PSPS
     195    if ((argNum = psArgumentGet (argc, argv, "-stack-type"))) {
     196        if (argc <= argNum+1) {
     197            psErrorStackPrint(stderr, "Expected to see an argument for -stack-type");
     198            exit(PS_EXIT_CONFIG_ERROR);
     199        }
     200        psArgumentRemove (argNum, &argc, argv);
     201        if (strcasecmp(argv[argNum], "NIGHTLY") && strcasecmp(argv[argNum], "DEEP") && strcasecmp(argv[argNum], "BEST_IQ")) {
     202            psErrorStackPrint(stderr, "Invalid option for -stack-type %s (must be one of NIGHTLY_STACK, DEEP_STACK, IQ_STACK)", argv[argNum]);
     203            exit(PS_EXIT_CONFIG_ERROR);
     204        }
     205        psMetadataAddStr (arguments, PS_LIST_TAIL, "STACK_TYPE", PS_META_REPLACE, "Stack Type", argv[argNum]);
     206        psArgumentRemove (argNum, &argc, argv);
     207    } else {
     208        psMetadataAddStr (arguments, PS_LIST_TAIL, "STACK_TYPE", PS_META_REPLACE, "Stack Type", "DEEP_STACK");
    198209    }
    199210
Note: See TracChangeset for help on using the changeset viewer.