- Timestamp:
- Apr 6, 2010, 1:36:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/stackphot.20100406/psphot/src/psphotStackParseCamera.c
r26894 r27625 15 15 } 16 16 17 psMetadata *item == NULL;17 psMetadataItem *item = NULL; 18 18 int nInputs = 0; 19 while ((item = psMetadataGet Index(inputs, nInputs)) != NULL) {19 while ((item = psMetadataGet(inputs, nInputs)) != NULL) { 20 20 if (item->type != PS_DATA_METADATA) { 21 21 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Component %s of the input metadata is not of type METADATA", item->name); … … 34 34 pmFPAfile *imageFile = defineFile(config, NULL, "PSPHOT.INPUT", image, PM_FPA_FILE_IMAGE); // File for image 35 35 if (!imageFile) { 36 psError(PS_ERR_UNKNOWN, false, "Unable to define file from image %d (%s)", i, image);36 psError(PS_ERR_UNKNOWN, false, "Unable to define file from image %d (%s)", nInputs, image); 37 37 return false; 38 38 } … … 41 41 if (mask && strlen(mask) > 0) { 42 42 if (!defineFile(config, imageFile, "PSPHOT.INPUT.MASK", mask, PM_FPA_FILE_MASK)) { 43 psError(PS_ERR_UNKNOWN, false, "Unable to define file from mask %d (%s)", i, mask);43 psError(PS_ERR_UNKNOWN, false, "Unable to define file from mask %d (%s)", nInputs, mask); 44 44 return false; 45 45 } 46 46 } 47 47 48 psString variance = psMetadataLookupStr(& mdok, input, "VARIANCE"); // Name of variance map48 psString variance = psMetadataLookupStr(&status, input, "VARIANCE"); // Name of variance map 49 49 if (variance && strlen(variance) > 0) { 50 50 if (!defineFile(config, imageFile, "PSPHOT.INPUT.VARIANCE", variance, PM_FPA_FILE_VARIANCE)) { 51 psError(PS_ERR_UNKNOWN, false, "Unable to define file from variance %d (%s)", i, variance);51 psError(PS_ERR_UNKNOWN, false, "Unable to define file from variance %d (%s)", nInputs, variance); 52 52 return false; 53 53 } … … 58 58 psMetadataAddS32 (config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "number of inputs", nInputs); 59 59 60 // generate an pmFPAimage for the chisqImage 61 pmFPAfile *chisqImage = pmFPAfileDefineOutput(config, NULL, "PSPHOT.CHISQ.IMAGE"); 62 if (!chisqImage) { 63 psError(PSPHOT_ERR_CONFIG, false, "Trouble defining PSPHOT.CHISQ.IMAGE"); 64 return false; 65 } 66 pmFPAfile *chisqMask = pmFPAfileDefineOutput(config, chisqImage->fpa, "PPIMAGE.CHISQ.MASK"); 67 if (!chisqMask) { 68 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHISQ.MASK")); 69 return NULL; 70 } 71 if (chisqMask->type != PM_FPA_FILE_MASK) { 72 psError(PS_ERR_IO, true, "PPIMAGE.CHISQ.MASK is not of type MASK"); 73 return NULL; 74 } 75 pmFPAfile *chisqVariance = pmFPAfileDefineOutput(config, chisqImage->fpa, "PPIMAGE.CHISQ.VARIANCE"); 76 if (!chisqVariance) { 77 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHISQ.VARIANCE")); 78 return NULL; 79 } 80 if (chisqVariance->type != PM_FPA_FILE_VARIANCE) { 81 psError(PS_ERR_IO, true, "PPIMAGE.CHISQ.VARIANCE is not of type VARIANCE"); 82 return NULL; 83 } 84 85 # if (0) 60 86 // define the additional input/output files associated with psphot 61 87 // XXX figure out which files are needed by psphotStack … … 64 90 return false; 65 91 } 92 # endif 66 93 67 94 psTrace("psphot", 1, "Done with psphotStackParseCamera...\n");
Note:
See TracChangeset
for help on using the changeset viewer.
