filebinaryfitsapldyalog

Read FITS files


I have some experience in several programming languages, but I would like to try APL. I'm doing some tutorials, but I want to work in a practical example. I would like to read astronomical images from a file, in FITS format (a very common format for Astronomy data), and perform some calculations on them. An image is nothing but a big numerical matrix (mine are integers, but they could be doubles... this is not important, anyway). And each file can have one or several images (not only that, but also tables and metadata information). Once one of the images is loaded, a function with some computations would be applied to it.

I would like to know whether there is any library or package for APL with functions to perform this FITS file handling (reading, writing, modification, retrieval or change of metadata, extension, etc.), or if I should use a kind of wrapper using any other language (C, C++, Python, ...) with well established libraries to perform all the input/output, with a computational core in APL.

(I quick search in Google and in some APL oriented sites didn't yield to any valid result.)


Solution

  • I don't know of such a library in APL, although it should be fairly easy to implement.

    Dyalog APL can fairly easily use FITS libraries from other languages:

    Language Inteface
    C and C++ ⎕NA
    C# and .NET ⎕USING
    Python Py'n'APL
    R rconnect