Sloan Digital Sky Survey
CSharpFITS Package

About the CSharpFITS Package

The CSharpFITS package is a pure C# .NET port of Tom McGlynn's nom.tam.fits Java package. It provides native C# support for reading and writing FITS files. This port is still in the alpha testing phase, and as such is not to be considered in a final or even totally functioning state. However, to my knowledge, it's the current best FITS library available in C#.

Additionally, I've added some support for writing FITS binary tables directly from database result streams. The included implementation was tested only in unit tests and in conjunction with the SDSS CASJobs service. But if the current implementation is not sufficient for your purposes, you may find it feasible to fit your own implementation into the provided framework.

Some code in this package may look like good example code when really it is not. Other such code actually is good example code. Unfortunately I haven't yet had time to mark which is which.

Many ostensibly simple tasks remain difficult to accomplish with this library, but most things are possible. This page is being released now in response to substantial demand for this library even in its current alpha form.

In porting this library, I had the following goals in mind, prioritized more or less in the order listed:

Needless to say, several (all, really) of these goals have yet to be filled.

Using the CSharpFITS Package

There is no documentation as such at this point. However, most of Tom McGlynn's documentation for the original Java version still applies if you translate into C# in your head while reading it. His programmer's guide is available here and his API documentation is available here. Many Java idioms have been translated into C# idioms, so you'll want to have Visual Studio's class browser handy. Also, you may find some of the code in the "tests" directory in the source distribution useful as example code, though the above caveats apply.

Bugs

Yes, I'm sure we have some. If you come across any, please "file a report" by emailing me with any console output and a description of what you're trying to do, possibly including any relevant source code. My email address is my last name (which can be found below) at pha.jhu.edu.

Download Files

CSharpFITS Package DLL This is a compiled binary of the library and is really all you need to be able to use the library. If you add this library to your project as a reference, you can use the classes it contains and browse their properties and methods using the class browser in Visual Studio.
CSharpFITS Package Source Distribution Source code for those who are interested. You can view the source with anything capable of reading ASCII, but you'll need Visual Studio 2005 to be able to open the project.


Samuel Carliles
Last Modified :Tuesday, August 15, 2006 at 4:58:37 PM , $Revision 1.2 $