IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2013, 11:06:10 AM (13 years ago)
Author:
eugene
Message:

FtableToImage was failing to allocate enough memory for the new table to fill the FITS block

Location:
trunk/Ohana/src/libfits
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/include/gfitsio.h

    r33648 r35162  
    123123off_t   gfits_data_size                PROTO((Header *header));
    124124off_t   gfits_data_min_size            PROTO((Header *header));
     125off_t   gfits_data_pad_size            PROTO((off_t rawsize));
    125126int     gfits_extended_to_primary      PROTO((Header *header, int simple, char *comment));
    126127int     gfits_primary_to_extended      PROTO((Header *header, char *exttype, char *comment));
  • trunk/Ohana/src/libfits/matrix/F_matrix.c

    r27435 r35162  
    4343  return (size);
    4444}
     45
     46off_t gfits_data_pad_size (off_t rawsize) {
     47 
     48  off_t Nrec, size;
     49
     50  /* round up to next complete block */
     51  if (rawsize % FT_RECORD_SIZE) {
     52    Nrec = 1 + (int) (rawsize / FT_RECORD_SIZE);
     53    size = FT_RECORD_SIZE * Nrec;
     54  }
     55
     56  return (size);
     57}
Note: See TracChangeset for help on using the changeset viewer.