help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flexible Image Transport System (FITS) file format support


From: Søren Hauberg
Subject: Re: Flexible Image Transport System (FITS) file format support
Date: Sat, 27 Mar 2010 17:25:47 -0700

lør, 27 03 2010 kl. 15:57 -0800, skrev coccoinomane:
> Do you know a way to add to Octave support for the 
> http://fits.gsfc.nasa.gov/fits_overview.html FITS  file format?
> 
> In Matlab this is achieved via the open-source project 
> http://public.lanl.gov/eads/mfitsio/ MFITSIO . This project makes use of
> compiled MEX files, therefore it is not easily convertible to Octave.

Well, Octave does support the MEX API, so it actually shouldn't be too
hard. I had a quick look at this. To compile the MFITSIO files I had to

  1. Change line 27 in 'Makefile' from

       CC = mex

     to

       CC = mkoctfile --mex

  2. Remove lines that look like this

       #include "matrix.h"

     from 'fits_read_image.c', 'mfitsio.c', 'mfitsio.h',
     'fits_write_image.c', 'fits_read_header.c', 'fits_write_header.c',
     'fits_delete_keyword.c', 'fits_read_image_subset.c' and
     'fits_write_image_subset.c'

Then I was able to successfully compile the files by running 'make'. I
haven't actually tested this as I don't have any images in the proper
format.

Søren

P.S. I don't recognise the license used. Does anybody know if it is GPL
compatible?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]