IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 24, 2005, 3:05:59 PM (21 years ago)
Author:
Paul Price
Message:

Retrieval of concepts seems to be working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/test_pmFPARead.c

    r4309 r4386  
    2525#endif
    2626
    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);
    3132
    3233    if (argc != 3) {
     
    3435        exit(EXIT_FAILURE);
    3536    }
    36     const char *configName = argv[1];
     37    const char *cameraName = argv[1];
    3738    const char *imageName = argv[2];
    38        
     39
    3940    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
    4542    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);
    4745    }
    4846
    49     printf("Camera information:\n");
    50     psMetadataPrint(camera, 0);
    51    
    5247    psFits *fits = psFitsAlloc(imageName);
    53     papFPA *fpa = pmFPARead(camera, fits);
     48    papFPA *fpa = pmFPARead(fits, camera, NULL);
     49    (void)pmFPAPrint(fpa);
    5450
     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
    5561    psMemCheckCorruption(true);
    5662
Note: See TracChangeset for help on using the changeset viewer.