Changeset 28013 for trunk/psphot/src/psphotStackChisqImage.c
- Timestamp:
- May 18, 2010, 4:11:53 PM (16 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotStackChisqImage.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
-
Property svn:mergeinfo
set to
/branches/eam_branches/psphot.20100506 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/psphot/src/psphotStackChisqImage.c
r27657 r28013 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 *ruleDet, const char *ruleCnv) 9 9 { 10 10 bool status = false; … … 21 21 22 22 // loop over the available readouts 23 // generate the chisq image from the 'detection' images 23 24 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);25 if (!psphotStackChisqImageAddReadout(config, view, ruleDet, &chiReadout, i)) { 26 psError (PSPHOT_ERR_CONFIG, false, "failed to model background for %s entry %d", ruleDet, i); 26 27 return false; 27 28 } … … 35 36 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "", num); 36 37 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)) { 38 // save the resulting image in the 'detection' set 39 if (!psMetadataAddPtr(config->files, PS_LIST_TAIL, ruleDet, PS_DATA_UNKNOWN | PS_META_DUPLICATE_OK, "", chisqFile)) { 40 psError(PM_ERR_CONFIG, false, "could not add chisqFPA to config files"); 41 return false; 42 } 43 44 // save the resulting image in the 'convolved' set 45 if (!psMetadataAddPtr(config->files, PS_LIST_TAIL, ruleCnv, PS_DATA_UNKNOWN | PS_META_DUPLICATE_OK, "", chisqFile)) { 39 46 psError(PM_ERR_CONFIG, false, "could not add chisqFPA to config files"); 40 47 return false; … … 48 55 bool psphotStackChisqImageAddReadout(const pmConfig *config, // Configuration 49 56 const pmFPAview *view, 57 const char *filerule, 50 58 pmReadout **chiReadout, 51 char *filename,52 59 int index) 53 60 { … … 55 62 56 63 // find the currently selected readout 57 pmFPAfile *input = pmFPAfileSelectSingle(config->files, file name, index); // File of interest64 pmFPAfile *input = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest 58 65 psAssert (input, "missing file?"); 59 66 … … 111 118 } 112 119 113 bool psphotStackRemoveChisqFromInputs (pmConfig *config ) {120 bool psphotStackRemoveChisqFromInputs (pmConfig *config, const char *filerule) { 114 121 115 122 bool status = false; … … 121 128 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 122 129 123 pmFPAfileRemoveSingle (config->files, "PSPHOT.INPUT", chisqNum);130 pmFPAfileRemoveSingle (config->files, filerule, chisqNum); 124 131 125 132 inputNum --;
Note:
See TracChangeset
for help on using the changeset viewer.
