Changeset 21374 for trunk/ppSub/src/ppSubCamera.c
- Timestamp:
- Feb 5, 2009, 5:20:02 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubCamera.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubCamera.c
r21360 r21374 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-06 0 1:37:17$8 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-06 03:20:02 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 39 39 } 40 40 41 // Input weightmap42 pmFPAfile *input Weight = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.WEIGHT", "INPUT.WEIGHT");43 if (!status) { 44 psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT. WEIGHT");41 // Input variance map 42 pmFPAfile *inputVariance = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.VARIANCE", "INPUT.VARIANCE"); 43 if (!status) { 44 psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.VARIANCE"); 45 45 return NULL; 46 46 } 47 if (input Weight && inputWeight->type != PM_FPA_FILE_WEIGHT) {48 psError(PS_ERR_IO, true, "PPSUB.INPUT. WEIGHT is not of type WEIGHT");47 if (inputVariance && inputVariance->type != PM_FPA_FILE_VARIANCE) { 48 psError(PS_ERR_IO, true, "PPSUB.INPUT.VARIANCE is not of type VARIANCE"); 49 49 return false; 50 50 } … … 73 73 } 74 74 75 // Reference weightmap76 pmFPAfile *ref Weight = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.WEIGHT", "REF.WEIGHT");77 if (!status) { 78 psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF. WEIGHT");75 // Reference variance map 76 pmFPAfile *refVariance = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.VARIANCE", "REF.VARIANCE"); 77 if (!status) { 78 psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.VARIANCE"); 79 79 return NULL; 80 80 } 81 if (ref Weight && refWeight->type != PM_FPA_FILE_WEIGHT) {82 psError(PS_ERR_IO, true, "PPSUB.REF. WEIGHT is not of type WEIGHT");81 if (refVariance && refVariance->type != PM_FPA_FILE_VARIANCE) { 82 psError(PS_ERR_IO, true, "PPSUB.REF.VARIANCE is not of type VARIANCE"); 83 83 return false; 84 84 } … … 108 108 outMask->save = true; 109 109 110 // Output weight111 if (input Weight && refWeight) {112 pmFPAfile *out Weight = pmFPAfileDefineOutput(config, output->fpa, "PPSUB.OUTPUT.WEIGHT");113 if (!out Weight) {114 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT. WEIGHT"));115 return false; 116 } 117 if (out Weight->type != PM_FPA_FILE_WEIGHT) {118 psError(PS_ERR_IO, true, "PPSUB.OUTPUT. WEIGHT is not of type WEIGHT");119 return false; 120 } 121 out Weight->save = true;110 // Output variance 111 if (inputVariance && refVariance) { 112 pmFPAfile *outVariance = pmFPAfileDefineOutput(config, output->fpa, "PPSUB.OUTPUT.VARIANCE"); 113 if (!outVariance) { 114 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.VARIANCE")); 115 return false; 116 } 117 if (outVariance->type != PM_FPA_FILE_VARIANCE) { 118 psError(PS_ERR_IO, true, "PPSUB.OUTPUT.VARIANCE is not of type VARIANCE"); 119 return false; 120 } 121 outVariance->save = true; 122 122 } 123 123 … … 146 146 // XXX should be based on recipe : inConvMask->save = true; 147 147 148 // Convolved input weight149 if (input Weight) {150 pmFPAfile *inConv Weight = pmFPAfileDefineOutput(config, inConv->fpa, "PPSUB.INPUT.CONV.WEIGHT");151 if (!inConv Weight) {152 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT. WEIGHT"));153 return false; 154 } 155 if (inConv Weight->type != PM_FPA_FILE_WEIGHT) {156 psError(PS_ERR_IO, true, "PPSUB.INPUT.CONV. WEIGHT is not of type WEIGHT");157 return false; 158 } 159 // XXX should be based on recipe : inConv Weight->save = true;148 // Convolved input variance 149 if (inputVariance) { 150 pmFPAfile *inConvVariance = pmFPAfileDefineOutput(config, inConv->fpa, "PPSUB.INPUT.CONV.VARIANCE"); 151 if (!inConvVariance) { 152 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.VARIANCE")); 153 return false; 154 } 155 if (inConvVariance->type != PM_FPA_FILE_VARIANCE) { 156 psError(PS_ERR_IO, true, "PPSUB.INPUT.CONV.VARIANCE is not of type VARIANCE"); 157 return false; 158 } 159 // XXX should be based on recipe : inConvVariance->save = true; 160 160 } 161 161 … … 184 184 // XXX should be based on recipe : refConvMask->save = true; 185 185 186 // Convolved ref weight187 if (ref Weight) {188 pmFPAfile *refConv Weight = pmFPAfileDefineOutput(config, refConv->fpa, "PPSUB.REF.CONV.WEIGHT");189 if (!refConv Weight) {190 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT. WEIGHT"));191 return false; 192 } 193 if (refConv Weight->type != PM_FPA_FILE_WEIGHT) {194 psError(PS_ERR_IO, true, "PPSUB.REF.CONV. WEIGHT is not of type WEIGHT");195 return false; 196 } 197 // XXX should be based on recipe : refConv Weight->save = true;186 // Convolved ref variance 187 if (refVariance) { 188 pmFPAfile *refConvVariance = pmFPAfileDefineOutput(config, refConv->fpa, "PPSUB.REF.CONV.VARIANCE"); 189 if (!refConvVariance) { 190 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.VARIANCE")); 191 return false; 192 } 193 if (refConvVariance->type != PM_FPA_FILE_VARIANCE) { 194 psError(PS_ERR_IO, true, "PPSUB.REF.CONV.VARIANCE is not of type VARIANCE"); 195 return false; 196 } 197 // XXX should be based on recipe : refConvVariance->save = true; 198 198 } 199 199
Note:
See TracChangeset
for help on using the changeset viewer.
