Changeset 3667 for trunk/stac/src/stac.c
- Timestamp:
- Apr 5, 2005, 12:13:28 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stac.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stac.c
r3666 r3667 71 71 sprintf(errName,"%s.err",config->inputs->data[i]); 72 72 psFits *errorFile = psFitsAlloc(errName); 73 if (!psFitsWriteImage(errorFile, NULL, error , 0, NULL)) {73 if (!psFitsWriteImage(errorFile, NULL, errors->data[i], 0, NULL)) { 74 74 psErrorStackPrint(stderr, "Unable to write image: %s\n", errName); 75 75 } … … 91 91 char shiftName[MAXCHAR]; // Filename of shift image 92 92 char errName[MAXCHAR]; // Filename of error image 93 sprintf(shiftName,"%s.shift1",config->inputs->data[n],numTransforms); 94 sprintf(errName,"%s.shifterr1",config->inputs->data[n],numTransforms); 95 psTrace("stac.transform.test", 6, 96 "Output files have size: %dx%d\n",outImage->numCols,outImage->numRows); 93 sprintf(shiftName,"%s.shift1",config->inputs->data[i]); 94 sprintf(errName,"%s.shifterr1",config->inputs->data[i]); 97 95 psFits *shiftFile = psFitsAlloc(shiftName); 98 96 psFits *errFile = psFitsAlloc(errName); 99 if (!psFitsWriteImage(shiftFile, NULL, outImage, 0, NULL)) { 97 psImage *trans = transformed->data[i]; // Transformed image 98 psImage *transErr = transformedErrors->data[i]; // Transformed error image 99 if (!psFitsWriteImage(shiftFile, NULL, trans, 0, NULL)) { 100 100 psErrorStackPrint(stderr, "Unable to write image: %s\n", shiftName); 101 101 } 102 102 psTrace("stac", 1, "Shifted image written to %s\n", shiftName); 103 if (!psFitsWriteImage(errFile, NULL, outError, 0, NULL)) {103 if (!psFitsWriteImage(errFile, NULL, transErr, 0, NULL)) { 104 104 psErrorStackPrint(stderr, "Unable to write image: %s\n", errName); 105 105 } … … 137 137 #ifdef TESTING 138 138 // Write rejection images out to check 139 for (int i = 0; i < nImages; i++) {139 for (int i = 0; i < rejected->n; i++) { 140 140 char rejName[MAXCHAR]; // Filename of rejection image 141 sprintf(rejName, "%s.shiftrej",config->inputs->data[i]);141 sprintf(rejName, "%s.shiftrej", config->inputs->data[i]); 142 142 143 143 psFits *rejFile = psFitsAlloc(rejName); 144 if (!psFitsWriteImage(rejFile, NULL, (*rejected)->data[i], 0, NULL)) {144 if (!psFitsWriteImage(rejFile, NULL, rejected->data[i], 0, NULL)) { 145 145 psErrorStackPrint(stderr, "Unable to write image: %s\n", rejName); 146 146 } … … 151 151 // Write out pre-combined image 152 152 char preName[MAXCHAR]; // Filename of precombined image 153 sprintf(preName, "%s.pre",config->output);153 sprintf(preName, "%s.pre", config->output); 154 154 psFits *preFile = psFitsAlloc(preName); 155 155 if (!psFitsWriteImage(preFile, NULL, combined, 0, NULL)) {
Note:
See TracChangeset
for help on using the changeset viewer.
