Top List Search Help RSS Login

Caution for compiling with cfitsio libraryの変更点

  • 追加された行はこのように表示されます。
  • 削除された行はこのように表示されます。
!!!Caution for compiling with cfitsio library
{{category All of Data Analysis System(Servers and Terminals)}}
{{category Data analysis servers(anam* and anah*)}}
{{category Terminal Workstations(alws* and sbws*)}}

Compiling programs with cfitsio library may fail.

  (Example) compress_fits
  URL: http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples.html
  
  =========
  cc -I/usr/local/include -L/usr/local/lib -o compress_fits
  compress_fits.c -lcfitsio -lm
  /var/tmp/ccSFbWKg.o: In function `main':
  compress_fits.c:(.text+0x489): undefined reference to `fits_comp_img'
  collect2: ld returned 1 exit status
  =========

This failure is caused by that the function "fits_compress_img" was not used  since 27 April, 2011.
Instead of this, you can use the function "fits_img_compress" that has equivalent capability to "fits_compress_img".


  [an excerpt from imcompress.c]
  /*--------------------------------------------------------------------------*/
  int fits_compress_img_OBSOLETE(
          fitsfile *infptr, /* pointer to image tobe compressed */
          fitsfile *outfptr, /* empty HDU for output compressed image */
          int compress_type, /* compression type code */
                               /*  RICE_1, HCOMPRESS_1, etc. */
          long *intilesize,    /* size in each dimension of the tiles */
                                     /* NULL pointer means tile by rows */
                  int blocksize,     /* compression parameter: blocksize  */
                  int nbits,         /* compression parameter: nbits  */
                  int *status)       /* IO - error status               */
                                        
  /*
    !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
    This routine is obsolete and should not be used.  The
    ftools 'fimgzip' task used to call this routine (but that task has been deleted);
    
    The name of the routine was changed 4/27/2011, to see if anyone complains.
    If not, then this routine should be deleted from the source code.
    !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
    
    This routine initializes the output table, copies all the keywords,
    and  loops through the input image, compressing the data and
    writing the compressed tiles to the output table.
   */