Table of Contents

Enum FitsHduKind

Namespace
Egami.Formats.Extended.Fits
Assembly
Egami.Formats.Extended.dll

What a FITS HDU (header and data unit) holds.

public enum FitsHduKind

Fields

AsciiTable = 4

An ASCII table (TABLE), skipped as data.

BinaryTable = 3

A binary table (BINTABLE), skipped as data.

CompressedImage = 2

A tile-compressed image: a binary table with ZIMAGE = T, as fpack writes.

Image = 1

An IMAGE extension.

Other = 5

Any other extension, or random groups, skipped as data.

Primary = 0

The primary HDU, first in every file; it may hold an image or no data.

Examples

// FitsFile lists every HDU with its header, tables included, and reads an image's values in file order.
FitsFile file = FitsFile.Load("m51.fits");
foreach (FitsHdu hdu in file.Hdus)
{
    Console.WriteLine($"HDU {hdu.Index}: {hdu.Kind}, {string.Join(" × ", hdu.Axes)}");
}

FitsHdu image = file.FirstImage!;
double exposure = image.Header.GetReal("EXPTIME") ?? 0;
double[] counts = file.ReadValues(image);
using Raster<GrayF32> plane = file.ReadPlane(image);