Class FitsFormat
FITS (Flexible Image Transport System, standard 4.0), astronomy's image format: headers of 80-character keyword cards in 2880-byte blocks, then big-endian 8, 16, 32 or 64-bit integer or 32 or 64-bit float data. Load gives a viewable picture of the first image, stretched into 0 to 1 (Stretch); LoadAll gives every image of every HDU and every plane of a cube. FitsFile gives the header cards and the physical values themselves. Registered with WithFits(EgamiContext).
public static class FitsFormat
- Inheritance
-
FitsFormat
- Inherited Members
Examples
// Load stretches the values into 0 to 1 (from the smallest to the largest, or DATAMIN to DATAMAX when the header gives
// them) as GrayF32; the first stored row is at the bottom, as astronomy viewers show it.
EgamiContext context = EgamiContext.Default.WithFits();
using Raster image = Raster.Load("m51.fits", context);
image.Save("m51.png");
// Every image HDU, and every plane of a cube, is an image of its own.
RasterInfo info = Raster.Probe("m51.fits", context);
Console.WriteLine($"{info.Width}×{info.Height}, {info.ImageCount} image(s)");
Properties
Info
Gets the format's registration: name, MIME types, extensions, signature, reader and writer.
public static FormatInfo Info { get; }