IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 9:44:51 PM (11 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20150419/Ohana/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src

  • branches/eam_branches/ipp-20150419/Ohana/src/libfits/matrix/F_matrix.c

    r35164 r38447  
    22# include <gfitsio.h>
    33
    4 off_t gfits_data_size (Header *header) {
    5  
    6   int i;
    7   off_t Nrec, size;
    8 
    9   if (header[0].Naxes == 0) return (0);
    10 
    11   size = abs(header[0].bitpix / 8);
    12 
    13   for (i = 0; i < header[0].Naxes; i++)
    14     size *= header[0].Naxis[i];
    15 
    16   // XXX do I multiply this times gcount?
    17   size += header[0].pcount;
    18 
    19   /* round up to next complete block */
    20   if (size % FT_RECORD_SIZE) {
    21     Nrec = 1 + (int) (size / FT_RECORD_SIZE);
    22     size = FT_RECORD_SIZE * Nrec;
    23   }
    24 
    25   return (size);
    26 }
    27 
    28 off_t gfits_data_min_size (Header *header) {
     4off_t gfits_heap_start (Header *header) {
    295 
    306  int i;
     
    3814    size *= header[0].Naxis[i];
    3915
    40   // XXX do I multiply this times gcount?
     16  return (size);
     17}
     18
     19off_t gfits_data_min_size (Header *header) {
     20 
     21  off_t size = gfits_heap_start (header);
    4122  size += header[0].pcount;
     23
     24  // XXX what do I do with gcount?
    4225
    4326  return (size);
     
    4629off_t gfits_data_pad_size (off_t rawsize) {
    4730 
    48   off_t Nrec, size;
    49 
    50   size = rawsize;
     31  off_t size = rawsize;
    5132
    5233  /* round up to next complete block */
    5334  if (rawsize % FT_RECORD_SIZE) {
    54     Nrec = 1 + (int) (rawsize / FT_RECORD_SIZE);
     35    off_t Nrec = 1 + (int) (rawsize / FT_RECORD_SIZE);
    5536    size = FT_RECORD_SIZE * Nrec;
    5637  }
     
    5839  return (size);
    5940}
     41
     42off_t gfits_data_size (Header *header) {
     43  off_t rawsize = gfits_data_min_size(header);
     44  off_t size = gfits_data_pad_size (rawsize);
     45
     46  return (size);
     47}
     48
Note: See TracChangeset for help on using the changeset viewer.