Changeset 4386 for trunk/archive/scripts/src/test_pmFPARead.c
- Timestamp:
- Jun 24, 2005, 3:05:59 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/archive/scripts/src/test_pmFPARead.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/scripts/src/test_pmFPARead.c
r4309 r4386 25 25 #endif 26 26 27 psTraceSetLevel("readMultipleRegions", 0); 28 psTraceSetLevel("portions", 0); 29 psTraceSetLevel("pmFPARead", 10); 30 27 (void)psTraceSetLevel(".", 10); 28 (void)psTraceSetLevel("readMultipleRegions", 0); 29 (void)psTraceSetLevel("portions", 0); 30 (void)psTraceSetLevel("pmFPARead", 10); 31 (void)psTraceSetLevel("pmFPAfromHeader", 10); 31 32 32 33 if (argc != 3) { … … 34 35 exit(EXIT_FAILURE); 35 36 } 36 const char *c onfigName = argv[1];37 const char *cameraName = argv[1]; 37 38 const char *imageName = argv[2]; 38 39 39 40 int badLines = 0; // Number of bad lines in camera configuration 40 41 (void)psTraceSetLevel("pmFPAfromHeader", 10); 42 43 psMetadata *camera = psMetadataConfigParse(NULL, &badLines, configName, true); // Camera config 44 41 psMetadata *camera = psMetadataConfigParse(NULL, &badLines, cameraName, true); // Read camera config file 45 42 if (badLines > 0) { 46 printf("%d bad lines encountered while reading %s\n", badLines, configName); 43 psLogMsg(__func__, PS_LOG_WARN, "%d bad lines encountered while reading camera configuration %s\n", 44 badLines, cameraName); 47 45 } 48 46 49 printf("Camera information:\n");50 psMetadataPrint(camera, 0);51 52 47 psFits *fits = psFitsAlloc(imageName); 53 papFPA *fpa = pmFPARead(camera, fits); 48 papFPA *fpa = pmFPARead(fits, camera, NULL); 49 (void)pmFPAPrint(fpa); 54 50 51 printf("Test: %d %d\n", psCellGetValueS32(fpa, "ccd15", "left", "CELL.XPARITY"), 52 psCellGetValueS32(fpa, "ccd15", "right", "CELL.XPARITY")); 53 printf("Test: %d %d\n", psCellGetValueS32(fpa, "ccd15", "left", "CELL.YPARITY"), 54 psCellGetValueS32(fpa, "ccd15", "right", "CELL.YPARITY")); 55 printf("Test: %d %d\n", psCellGetValueS32(fpa, "ccd15", "left", "CELL.YPARITY"), 56 psCellGetValueS32(fpa, "ccd15", "right", "CELL.YPARITY")); 57 58 // (void)pmFPAPrint(fpa); 59 60 // Tidy up 55 61 psMemCheckCorruption(true); 56 62
Note:
See TracChangeset
for help on using the changeset viewer.
