Hi Eric,

Eric Chassande-Mottin wrote:

> I have been working on exactly the same thing during the last three weeks!

It's good to see other astronomy people working with octave.

> I wouldn't have if I knew that you were about to submit a dedicated
> package.

Sorry for that. I have been using my code for quite a while now, and I also 
shared it with some other people. I felt, that is was time, to release the 
package to the puplic.

> I attach my own code to this email. Checking quickly through your
> code, I see that it might be useful to merge part of mine into yours such as
> the interface to the header fields. 

You are right, there is currently no routine to write custom FITS headers (I 
never needed that). I think, I could implement it future, but feel free to 
modify the source in SVN. Maybe we should agree on the interface. 

The current features of my code are:
* Reading FITS files with all valid datatypes (8,16,32,64,-32,-64) and storing
  them to an octave double array. Headers are read as well and stored into a
  string array.
* Apart from 2d-images, 3d-cubes or multi-extension files can be read.
* CFITSIO filters can be used in the filename to select frames/data.
* Maximum array size is 2 GB, since (unexperimental) octave can't handle
  larger arrays. (It should be possible to read a subset of >2GB files, though
  I didn't try)
* Saving octave arrays (2-d or 3-d, (1-d array will be saved as 2-d)) to FITS
  files with any valid dataytpe (8,16,32,64,-32,-64). 
* Type conversion is performed by CFITSIO.
* 3-d arrays can be saved as a 3-d data cube or as multiple extentions.
* Existing files will not be over-written unless the filename starts with an
  exclamation mark "!".
* Written files maybe gziped transparently by appending ".gz" to the filename.
* Sanity check of function parameters

I hope, this list is complete.



> You may consider also to use two .m files (readfits.m
> and writefits.m) as an interface between the .oct binary and the user.

Is there a specific reason using .m-functions to call .oct-routines?


Dirk


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to