IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2007, 2:51:20 PM (19 years ago)
Author:
Paul Price
Message:

Fixing issues with file formats: some formats weren't getting the PHU where required (because the create was following the open, and the open was attempting to write the blank PHU). Added pmFPAfileBlank to write a blank where required. Cleaned up the pmFPAfile stuff a little.

File:
1 edited

Legend:

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

    r11793 r11801  
    2323    PS_ASSERT_PTR_NON_NULL(view, NULL);
    2424
    25     if (file->camera == config->camera || // Need to mosaic, not copy
     25    if (//file->camera == config->camera || // Need to mosaic, not copy
    2626            !file->format) {                // Working with the same output format as input format
    2727        return psMemIncrRefCounter(file->fpa);
     
    5050    }
    5151
    52     if (!pmFPAAddSourceFromView(fpa, phuView, file->format)) {
     52    pmFPA *nameSource = file->src; // Source of FPA.NAME
     53    if (!nameSource) {
     54        nameSource = file->fpa;
     55    }
     56    bool mdok;                  // Status of MD lookup
     57    const char *fpaname = psMetadataLookupStr(&mdok, nameSource->concepts, "FPA.NAME"); // Name of FPA
     58
     59    if (!pmFPAAddSourceFromView(fpa, fpaname, phuView, file->format)) {
    5360        psError(PS_ERR_UNKNOWN, false, "Unable to insert HDU into FPA for writing.\n");
    5461        psFree(fpa);
Note: See TracChangeset for help on using the changeset viewer.