Changeset 34779
- Timestamp:
- Dec 7, 2012, 12:28:26 PM (14 years ago)
- Location:
- trunk/ppTranslate/src
- Files:
-
- 2 edited
-
ppMopsRead.c (modified) (4 diffs)
-
ppMopsWrite.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppTranslate/src/ppMopsRead.c
r34676 r34779 28 28 for (int i = 0; i < num; i++) { 29 29 const char *name = inNames->data[i]; 30 printf(" %s\n", name);30 printf("Input filename:\n%s\n", name); 31 31 32 32 psFits *fits = psFitsOpen(name, "r"); // FITS file … … 84 84 } 85 85 ppMopsDetections *det = ppMopsDetectionsAlloc(size); 86 det->platescale = NAN; 86 87 detections->data[i] = det; 87 88 det->component = psStringNCopy(name, strrchr(name, '.') - name); // Strip off extension … … 280 281 if (isfinite(scale)) { 281 282 det->platescale = scale; 283 //printf("platescale = %g\n", scale); 282 284 } 283 285 numGood++; … … 306 308 } 307 309 310 printf("Detection platescale = %g\n", det->platescale); 308 311 psTrace("ppMops.read", 2, "Read %ld good rows from %s\n", numGood, (const char*)name); 309 312 } -
trunk/ppTranslate/src/ppMopsWrite.c
r34675 r34779 51 51 float seeing = 0.; 52 52 int totalGood = 0; 53 int platescale_has_been_set = 0; 53 54 for (int d = 0; d < detections->n; d++) { 54 55 if ( (detections->data[d] != NULL) && (isfinite(((ppMopsDetections*) detections->data[d])->seeing)) ) { … … 56 57 totalGood += 1; 57 58 if (isfinite(((ppMopsDetections*) detections->data[d])->platescale)) { 59 if (platescale_has_been_set == 0) { 58 60 det->platescale = ((ppMopsDetections*) detections->data[d])->platescale; 59 } 60 } 61 } 62 printf("plate-scale = [%g]\n", det->platescale); 61 platescale_has_been_set = 1; 62 } else { 63 if (det->platescale != ((ppMopsDetections*) detections->data[d])->platescale) { 64 printf("Different values for platescale: %g - %g in detection %d\n", 65 det->platescale, 66 ((ppMopsDetections*) detections->data[d])->platescale, 67 d); 68 } 69 } 70 } 71 } 72 } 73 //printf("plate-scale = [%g]\n", det->platescale); 63 74 seeing /= (float) totalGood; 64 75 if (det != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.
