- Timestamp:
- May 10, 2010, 5:24:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.20100506/src/psphotStackChisqImage.c
r27657 r27909 6 6 7 7 // XXX supply filename or keep PSPHOT.INPUT fixed? 8 bool psphotStackChisqImage (pmConfig *config, const pmFPAview *view )8 bool psphotStackChisqImage (pmConfig *config, const pmFPAview *view, const char *filerule) 9 9 { 10 10 bool status = false; … … 22 22 // loop over the available readouts 23 23 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); 26 26 return false; 27 27 } … … 35 35 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "", num); 36 36 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)) { 39 39 psError(PM_ERR_CONFIG, false, "could not add chisqFPA to config files"); 40 40 return false; … … 48 48 bool psphotStackChisqImageAddReadout(const pmConfig *config, // Configuration 49 49 const pmFPAview *view, 50 const char *filerule, 50 51 pmReadout **chiReadout, 51 char *filename,52 52 int index) 53 53 { … … 55 55 56 56 // find the currently selected readout 57 pmFPAfile *input = pmFPAfileSelectSingle(config->files, file name, index); // File of interest57 pmFPAfile *input = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest 58 58 psAssert (input, "missing file?"); 59 59 … … 111 111 } 112 112 113 bool psphotStackRemoveChisqFromInputs (pmConfig *config ) {113 bool psphotStackRemoveChisqFromInputs (pmConfig *config, const char *filerule) { 114 114 115 115 bool status = false; … … 121 121 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 122 122 123 pmFPAfileRemoveSingle (config->files, "PSPHOT.INPUT", chisqNum);123 pmFPAfileRemoveSingle (config->files, filerule, chisqNum); 124 124 125 125 inputNum --;
Note:
See TracChangeset
for help on using the changeset viewer.
