IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 10, 2010, 5:24:37 PM (16 years ago)
Author:
eugene
Message:

functions called by the psphotReadoutXXX functions now take a filerule so psphotStack can select the correct targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psphot.20100506/src/psphotStackChisqImage.c

    r27657 r27909  
    66
    77// XXX supply filename or keep PSPHOT.INPUT fixed?
    8 bool psphotStackChisqImage (pmConfig *config, const pmFPAview *view)
     8bool psphotStackChisqImage (pmConfig *config, const pmFPAview *view, const char *filerule)
    99{
    1010    bool status = false;
     
    2222    // loop over the available readouts
    2323    for (int i = 0; i < num; i++) {
    24         if (!psphotStackChisqImageAddReadout(config, view, &chiReadout, "PSPHOT.INPUT", i)) {
    25             psError (PSPHOT_ERR_CONFIG, false, "failed to model background for PSPHOT.INPUT entry %d", i);
     24        if (!psphotStackChisqImageAddReadout(config, view, filerule, &chiReadout, i)) {
     25            psError (PSPHOT_ERR_CONFIG, false, "failed to model background for %s entry %d", filerule, i);
    2626            return false;
    2727        }
     
    3535    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "", num);
    3636
    37     // need to save the resulting image somewhere (PSPHOT.INPUT?)
    38     if (!psMetadataAddPtr(config->files, PS_LIST_TAIL, "PSPHOT.INPUT", PS_DATA_UNKNOWN | PS_META_DUPLICATE_OK, "", chisqFile)) {
     37    // save the resulting image
     38    if (!psMetadataAddPtr(config->files, PS_LIST_TAIL, filerule, PS_DATA_UNKNOWN | PS_META_DUPLICATE_OK, "", chisqFile)) {
    3939        psError(PM_ERR_CONFIG, false, "could not add chisqFPA to config files");
    4040        return false;
     
    4848bool psphotStackChisqImageAddReadout(const pmConfig *config, // Configuration
    4949                                     const pmFPAview *view,
     50                                     const char *filerule,
    5051                                     pmReadout **chiReadout,
    51                                      char *filename,
    5252                                     int index)
    5353{
     
    5555
    5656    // find the currently selected readout
    57     pmFPAfile *input = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
     57    pmFPAfile *input = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest
    5858    psAssert (input, "missing file?");
    5959
     
    111111}
    112112
    113 bool psphotStackRemoveChisqFromInputs (pmConfig *config) {
     113bool psphotStackRemoveChisqFromInputs (pmConfig *config, const char *filerule) {
    114114
    115115    bool status = false;
     
    121121    psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
    122122
    123     pmFPAfileRemoveSingle (config->files, "PSPHOT.INPUT", chisqNum);
     123    pmFPAfileRemoveSingle (config->files, filerule, chisqNum);
    124124
    125125    inputNum --;
Note: See TracChangeset for help on using the changeset viewer.