IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 23, 2007, 5:11:19 PM (19 years ago)
Author:
Paul Price
Message:

Enabling different formats for output pmFPAfiles. To do this, needed to overhaul the writing functions to generate a new FPA using the new format, and write that. To get the blank PHU, needed to do similarly for the open function (!), since it writes blanks immediately after opening the file. Tested with inputting 6 megacam split chips and writing to spliced format --- works successfully.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAConstruct.c

    r11237 r11255  
    766766
    767767    pmFPAview *view = addSource(fpa, phuView, NULL, format, true);
    768     bool status = (view == NULL);
     768    bool status = (view != NULL);
    769769    psFree(view);
    770770    return status;
     
    895895
    896896}
     897
     898
     899pmFPALevel pmFPAPHULevel(const psMetadata *format)
     900{
     901    PS_ASSERT_METADATA_NON_NULL(format, PM_FPA_LEVEL_NONE);
     902
     903    bool mdok;                          // Status of MD lookup
     904    psMetadata *fileInfo = psMetadataLookupMetadata(&mdok, format, "FILE"); // Contents of FILE metadata
     905    if (!mdok || !fileInfo) {
     906        psError(PS_ERR_UNKNOWN, true, "Unable to find FILE in camera format configuration.\n");
     907        return PM_FPA_LEVEL_NONE;
     908    }
     909    const char *phu = psMetadataLookupStr(&mdok, fileInfo, "PHU"); // PHU level
     910    if (!mdok || !phu || strlen(phu) == 0) {
     911        psError(PS_ERR_UNKNOWN, true, "Unable to find PHU in FILE in camera format configuration.\n");
     912        return PM_FPA_LEVEL_NONE;
     913    }
     914
     915    return pmFPALevelFromName(phu);
     916}
     917
     918pmFPALevel pmFPAExtensionsLevel(const psMetadata *format)
     919{
     920    PS_ASSERT_METADATA_NON_NULL(format, PM_FPA_LEVEL_NONE);
     921
     922    bool mdok;                          // Status of MD lookup
     923    psMetadata *fileInfo = psMetadataLookupMetadata(&mdok, format, "FILE"); // Contents of FILE metadata
     924    if (!mdok || !fileInfo) {
     925        psError(PS_ERR_UNKNOWN, true, "Unable to find FILE in camera format configuration.\n");
     926        return PM_FPA_LEVEL_NONE;
     927    }
     928
     929    const char *extensions = psMetadataLookupStr(&mdok, fileInfo, "EXTENSIONS"); // EXTENSIONS level
     930    if (!mdok || !extensions || strlen(extensions) == 0) {
     931        psError(PS_ERR_UNKNOWN, true, "Unable to find EXTENSIONS in FILE in camera format configuration.\n");
     932        return PM_FPA_LEVEL_NONE;
     933    }
     934
     935    return pmFPALevelFromName(extensions);
     936}
     937
Note: See TracChangeset for help on using the changeset viewer.