IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29379


Ignore:
Timestamp:
Oct 12, 2010, 2:24:48 PM (16 years ago)
Author:
bills
Message:

pass stage to ppstamp. If stage is diff use a different file rule.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/recipes/filerules-mef.mdc

    r28541 r29379  
    295295                                                                                     
    296296PPSTAMP.OUTPUT          OUTPUT {OUTPUT}.fits                     IMAGE     COMP_IMG   FPA        TRUE      NONE
     297PPSTAMP.OUTPUT.DIFF     OUTPUT {OUTPUT}.fits                     IMAGE     COMP_SUB   FPA        TRUE      NONE
    297298PPSTAMP.OUTPUT.MASK     OUTPUT {OUTPUT}.mk.fits                  MASK      COMP_MASK  FPA        TRUE      NONE
    298299PPSTAMP.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits                  VARIANCE  COMP_WT    FPA        TRUE      NONE
  • trunk/ippconfig/recipes/filerules-simple.mdc

    r28541 r29379  
    261261                                             
    262262PPSTAMP.OUTPUT               OUTPUT {OUTPUT}.fits                 IMAGE           COMP_IMG   FPA        TRUE      NONE
     263PPSTAMP.OUTPUT.DIFF          OUTPUT {OUTPUT}.fits                 IMAGE           COMP_SUB   FPA        TRUE      NONE
    263264PPSTAMP.OUTPUT.MASK          OUTPUT {OUTPUT}.mk.fits              MASK            COMP_MASK  FPA        TRUE      NONE
    264265PPSTAMP.OUTPUT.VARIANCE      OUTPUT {OUTPUT}.wt.fits              VARIANCE        COMP_WT    FPA        TRUE      NONE
  • trunk/ippconfig/recipes/filerules-split.mdc

    r28961 r29379  
    280280
    281281PPSTAMP.OUTPUT               OUTPUT {OUTPUT}.fits                     IMAGE           COMP_IMG   FPA        TRUE      NONE
     282PPSTAMP.OUTPUT.DIFF          OUTPUT {OUTPUT}.fits                     IMAGE           COMP_SUB   FPA        TRUE      NONE
    282283PPSTAMP.OUTPUT.MASK          OUTPUT {OUTPUT}.mk.fits                  MASK            COMP_MASK  FPA        TRUE      NONE
    283284PPSTAMP.OUTPUT.VARIANCE      OUTPUT {OUTPUT}.wt.fits                  VARIANCE        COMP_WT    FPA        TRUE      NONE
  • trunk/pstamp/src/ppstamp.c

    r25197 r29379  
    2222
    2323    // define the active I/O files
    24     if (!ppstampParseCamera(config)) {
     24    if (!ppstampParseCamera(config, options)) {
    2525        psErrorStackPrint(stderr, "Unable to parse camera.");
    2626        ppstampCleanup(config, options);
  • trunk/pstamp/src/ppstamp.h

    r25709 r29379  
    1818
    1919// Determine what type of camera, and initialise
    20 bool ppstampParseCamera(pmConfig *config);
     20bool ppstampParseCamera(pmConfig *config, ppstampOptions *options);
    2121
    2222int ppstampMakeStamp(pmConfig *config, ppstampOptions *);
  • trunk/pstamp/src/ppstampArguments.c

    r24966 r29379  
    7878        psArgumentRemove(argnum, &argc, argv);
    7979    }
     80    if ((argnum = psArgumentGet(argc, argv, "-stage"))) {
     81        psArgumentRemove(argnum, &argc, argv);
     82        options->stage = psStringCopy(argv[argnum]);
     83        psArgumentRemove(argnum, &argc, argv);
     84    }
    8085
    8186    pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM", "-astrom", "-astromlist");
  • trunk/pstamp/src/ppstampMakeStamp.c

    r28882 r29379  
    233233    int status = false;
    234234
    235     pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, "PPSTAMP.OUTPUT");
     235    pmFPAfile *output;
     236    if (!options->stage || (strcmp(options->stage, "diff") != 0)) {
     237        output = psMetadataLookupPtr(NULL, config->files, "PPSTAMP.OUTPUT");
     238    } else {
     239        output = psMetadataLookupPtr(NULL, config->files, "PPSTAMP.OUTPUT.DIFF");
     240    }
    236241    if (!output) {
    237242        psError(PS_ERR_UNKNOWN, false, "Can't find output data\n");
  • trunk/pstamp/src/ppstampOptions.h

    r16132 r29379  
    1010    psString    chipName;
    1111    psString    cellName;
     12    psString    stage;
    1213    //
    1314    // Calculated Values
  • trunk/pstamp/src/ppstampParseCamera.c

    r24966 r29379  
    88
    99// Set up the ppstamp output Image file
    10 bool setupOutput(pmConfig *config, pmFPAfile *input, bool doMask, bool doWeight)
     10bool setupOutput(pmConfig *config, pmFPAfile *input, psString stage, bool doMask, bool doWeight)
    1111{
    12     pmFPAfile *output = pmFPAfileDefineSkycell(config, NULL, "PPSTAMP.OUTPUT");
     12    pmFPAfile *output;
     13   
     14    if (!stage || (strcmp(stage, "diff") != 0)) {
     15        output = pmFPAfileDefineSkycell(config, NULL, "PPSTAMP.OUTPUT");
     16    } else {
     17        // need special filerule for diff stage image to allow for negative values
     18        output = pmFPAfileDefineSkycell(config, NULL, "PPSTAMP.OUTPUT.DIFF");
     19    }
     20    if (!output) {
     21        psError(PS_ERR_UNKNOWN, false, "Unable to setup output.");
     22        return false;
     23    }
     24
    1325    output->save = true;
    1426
     
    2941// something else that I'm missing?
    3042
    31 bool ppstampParseCamera(pmConfig *config)
     43bool ppstampParseCamera(pmConfig *config, ppstampOptions *options)
    3244{
    3345    bool status = false;
     
    8395
    8496    // Set up the output target
    85     if (!setupOutput(config, input, doMask, doWeight)) {
     97    if (!setupOutput(config, input, options->stage, doMask, doWeight)) {
    8698        psError(PS_ERR_UNKNOWN, false, "Unable to setup output.");
    8799        return false;
Note: See TracChangeset for help on using the changeset viewer.