Table of Contents

Class FitsDetails

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

Details only FITS has, kept in FormatDetails: the HDU's header and how its values became the picture. The writer writes the header's own keywords (all but the structural ones) back.

public sealed class FitsDetails : FormatDetails
Inheritance
FitsDetails
Inherited Members

Examples

// ZScale shows faint detail the way astronomy viewers do; Asinh lifts the faint end and keeps the bright one.
using Raster zscale = Raster.Load("m51.fits", context, new FitsReaderOptions { Stretch = FitsStretch.ZScale });

// None keeps the physical values (BSCALE and BZERO applied, blanks as NaN) for measuring.
using Raster<GrayF32> values = Raster.Load<GrayF32>("m51.fits", context, new FitsReaderOptions { Stretch = FitsStretch.None });

// The header, and the values that became black and white, are in the details.
if (zscale.Metadata.FormatDetails is FitsDetails fits)
{
    Console.WriteLine($"{fits.Header.GetString("OBJECT")}: BITPIX {fits.Bitpix}, {fits.StretchLow} to {fits.StretchHigh}");
}

// A three-plane cube as one RGB image instead of three gray ones.
using Raster colour = Raster.Load("m51-rgb.fits", context, new FitsReaderOptions { Rgb = true });

Properties

Bitpix

Gets or sets the stored BITPIX: 8, 16, 32, 64, -32 or -64.

public int Bitpix { get; set; }

Property Value

int

Compression

Gets or sets the tile compression (ZCMPTYPE, such as RICE_1), or null for none.

public string? Compression { get; set; }

Property Value

string

Hdu

Gets or sets the HDU the image came from, from 0 for the primary HDU.

public int Hdu { get; set; }

Property Value

int

Header

Gets or sets the header of the HDU the image came from (for a tile-compressed image, the image's own keywords).

public FitsHeader Header { get; set; }

Property Value

FitsHeader

Plane

Gets or sets the plane of a cube the image is, from 0.

public int Plane { get; set; }

Property Value

int

Stretch

Gets or sets the stretch Load applied.

public FitsStretch Stretch { get; set; }

Property Value

FitsStretch

StretchHigh

Gets or sets the physical value the stretch put at 1 (NaN when there was no stretch).

public double StretchHigh { get; set; }

Property Value

double

StretchLow

Gets or sets the physical value the stretch put at 0 (NaN when there was no stretch).

public double StretchLow { get; set; }

Property Value

double

Methods

Copy()

Returns a deep copy.

public override FormatDetails Copy()

Returns

FormatDetails

The copy.