IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16855


Ignore:
Timestamp:
Mar 6, 2008, 1:10:08 PM (18 years ago)
Author:
eugene
Message:

warning, not error if both ZSIMPLE and ZTENSION are missing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/matrix/F_compress_M.c

    r16252 r16855  
    114114  have_ztension = gfits_scan (header, "ZTENSION", "%s", 1, exttype);
    115115
    116   if (!have_zsimple && !have_ztension) ESCAPE;
    117   if ( have_zsimple &&  have_ztension) ESCAPE;
     116  // this is a very bogus case: we cannot have both keywords
     117  if (have_zsimple && have_ztension) ESCAPE;
     118
     119  // if neither are present, we have an image that is not really following the standard:
     120  // assume it is a PHU
     121  if (!have_zsimple && !have_ztension) {
     122    header->simple = TRUE;
     123    gfits_extended_to_primary (header, header->simple, "Image data");
     124
     125    MOD_KEYWORD ("ZEXTEND",  "EXTEND",   "%t", &header->extend, header->extend);
     126    MOD_KEYWORD ("ZBLOCKED", "BLOCKED",  "%t", &header->extend, header->extend);
     127  }
    118128
    119129  // have_zsimple : image comes from a PHU
     
    125135    MOD_KEYWORD ("ZEXTEND",  "EXTEND",   "%t", &header->extend, header->extend);
    126136    MOD_KEYWORD ("ZBLOCKED", "BLOCKED",  "%t", &header->extend, header->extend);
    127   } else {
     137  }
     138
     139  // have_ztension : image comes from an extension
     140  if (have_ztension) {
    128141    gfits_delete (header, "ZTENSION", 1);
    129142    gfits_modify_extended (header, exttype, "Image extension");
Note: See TracChangeset for help on using the changeset viewer.