Changeset 4395 for trunk/archive/scripts/src/test_pmFPARead.c
- Timestamp:
- Jun 24, 2005, 4:48:22 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
r4386 r4395 25 25 #endif 26 26 27 (void)psTraceSetLevel(".", 10);27 (void)psTraceSetLevel(".", 0); 28 28 (void)psTraceSetLevel("readMultipleRegions", 0); 29 29 (void)psTraceSetLevel("portions", 0); 30 30 (void)psTraceSetLevel("pmFPARead", 10); 31 31 (void)psTraceSetLevel("pmFPAfromHeader", 10); 32 (void)psTraceSetLevel("pmCameraFromHeader", 10); 33 34 32 35 33 36 if (argc != 3) { 34 printf("Usage: %s CONFIG IMAGE\n", argv[0]);37 printf("Usage: %s IPP_CONFIG IMAGE\n", argv[0]); 35 38 exit(EXIT_FAILURE); 36 39 } 37 const char * cameraName = argv[1];40 const char *ipprcName = argv[1]; 38 41 const char *imageName = argv[2]; 39 42 40 43 int badLines = 0; // Number of bad lines in camera configuration 41 psMetadata * camera = psMetadataConfigParse(NULL, &badLines, cameraName, true); // Read cameraconfig file44 psMetadata *ipprc = psMetadataConfigParse(NULL, &badLines, ipprcName, true); // Read IPP config file 42 45 if (badLines > 0) { 43 psLogMsg(__func__, PS_LOG_WARN, "%d bad lines encountered while reading cameraconfiguration %s\n",44 badLines, cameraName);46 psLogMsg(__func__, PS_LOG_WARN, "%d bad lines encountered while reading IPP configuration %s\n", 47 badLines, ipprcName); 45 48 } 46 49 47 50 psFits *fits = psFitsAlloc(imageName); 51 psMetadata *header = psFitsReadHeader(NULL, fits); 52 53 psMetadata *camera = pmCameraFromHeader(header, ipprc); 54 48 55 papFPA *fpa = pmFPARead(fits, camera, NULL); 49 56 (void)pmFPAPrint(fpa); … … 55 62 printf("Test: %d %d\n", psCellGetValueS32(fpa, "ccd15", "left", "CELL.YPARITY"), 56 63 psCellGetValueS32(fpa, "ccd15", "right", "CELL.YPARITY")); 57 58 // (void)pmFPAPrint(fpa);59 64 60 65 // Tidy up
Note:
See TracChangeset
for help on using the changeset viewer.
