IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15441


Ignore:
Timestamp:
Nov 2, 2007, 4:05:10 PM (19 years ago)
Author:
eugene
Message:

fixed tests for primary / extension, compressions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20071015/Ohana/src/opihi/cmd.data/rd.c

    r15353 r15441  
    55 
    66  int i, N, status, plane, Nplane, extend, Nextend, Nskip, JustHead;
    7   int ccdsel, done;
     7  int ccdsel, done, Nword, IsCompressed;
    88  char region[512], *ccdid, *filename;
    99  FILE *f;
     
    8484      fclose (f);
    8585      return (FALSE);
     86    }
     87    if (gfits_extension_is_compressed (&buf[0].header)) {
     88        IsCompressed = TRUE;
    8689    }
    8790  }
     
    115118      Nword = 1;
    116119      IsCompressed = FALSE;
    117       if (gfits_extension_is_compressed_data (&buf[0].header)) {
     120      if (gfits_extension_is_compressed (&buf[0].header)) {
    118121        if (!strcmp (CCDKeyword, "EXTNAME")) Nword = 2;
    119122        IsCompressed = TRUE;
     
    137140  if (extend || ccdsel) {
    138141    if (!IsCompressed) {
    139       gfits_extended_to_primary (buf[0].header, TRUE, "Standard FITS");
     142      gfits_extended_to_primary (&buf[0].header, TRUE, "Standard FITS");
    140143    }
    141144  } else {
     
    179182    ftable.header = &theader;
    180183    gfits_copy_header (&buf[0].header, ftable.header);
    181     status = gfits_fread_table (f, &ftable);  // XXX does this do more than read the bytes?
    182     status = gfits_uncompress_image (&buf[0].header, &buf[0].matrix, ftable, ccdsel || extend);
     184    status = gfits_fread_ftable_data (f, &ftable);  // XXX does this do more than read the bytes?
     185    status = gfits_uncompress_image (&buf[0].header, &buf[0].matrix, &ftable, !(ccdsel || extend));
    183186    gfits_free_table (&ftable);
    184187    // XXX this currently does not work for a cube (we get a cube back, not a specific plane)
Note: See TracChangeset for help on using the changeset viewer.