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: Guido Walter Pettinari
Subject: Re: Flexible Image Transport System (FITS) file format support
Date: Sun, 28 Mar 2010 02:42:20 +0000

@ Søren
Thank you very much for your answer! I managed to compile MFITSIO. I had to do 
it manually, i.e. without the Makefile, since upon launching 'make' I got this 
error message:

MAKE: mkoctfile --mex fits_read_image.c mfitsio.c -lcfitsio -L/opt/local/lib 
-I/opt/local/include
MAKE: mkoctfile: unrecognized argument -fPIC

Strangely enough, when I launched the same command "mkoctfile --mex 
fits_read_image.c ... " from terminal, it compiled fine. 

I did a quick test of the function "fits_read_image":
image = fits_read_image ( "cl_out.fits" )
I attached the "cl_out.fits" file to this e-mail.

The result was an error message and an unusable image. I guess there is 
something more to do in order to make MFITSIO compatible with Octave... I am 
afraid I have not the skills to deal with this, since I am pretty new to the 
FITS file format. However, if I were a skilled Octave developer I would 
consider developing an Octave Forge package in order to add FITS support to 
Octave. I am an Astronomer/Cosmologist and many of my colleagues use IDL 
instead of Octave/Matlab because the former has a very good FITS support. In my 
opinion Octave is more flexible and intuitive than IDL, and once it has a good 
FITS support, many people would consider switching from IDL.


@Thomas
Thanks for the link (http://hci.tugraz.at/schloegl/matlab/eeg/). I already had 
a look at BioSig but the FITS support is not complete enough for my needs. By 
the way, I use Mac Os X 10.6.

Cheers,

Guido

On Mar 28, 2010, at 0:25 , Søren Hauberg wrote:

> 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?
> 


Attachment: cl_out.fits
Description: Binary data


reply via email to

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