IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2015, 7:58:50 PM (11 years ago)
Author:
eugene
Message:

handle zzero,zscale = 0,1 specially to avoid bitlevel errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libfits/matrix/F_compress_utils.c

    r38366 r38399  
    234234  int i, Nbyte;
    235235
     236  // NONE should be swapped to mimic swapping types
     237  if (!strcasecmp(cmptype, "NONE")) {
     238    if (out_bitpix ==   8) return (1);
     239    if (out_bitpix ==  16) return (2);
     240    if (out_bitpix ==  32) return (4);
     241    if (out_bitpix == -32) return (4);
     242    if (out_bitpix == -64) return (8);
     243    return (1);
     244  }
     245
    236246  // GZIP_1, GZIP_2 should not be swapped after compression
    237247  if (!strcasecmp(cmptype, "GZIP_1") ||
    238248      !strcasecmp(cmptype, "GZIP_2") ||
    239       !strcasecmp(cmptype, "NONE_2") ||
    240       !strcasecmp(cmptype, "NONE")) {
     249      !strcasecmp(cmptype, "NONE_2")) {
    241250    if (out_bitpix ==   8) return (1);
    242251    if (out_bitpix ==  16) return (1);
Note: See TracChangeset for help on using the changeset viewer.