Table of Contents

Class FitsWriterOptions

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

Options for writing FITS.

public sealed class FitsWriterOptions : WriterOptions
Inheritance
FitsWriterOptions
Inherited Members

Examples

// BITPIX follows the pixel type: -32 for floating point, 16 for 16-bit, 8 otherwise. The cards of a loaded header go
// with it, and Keywords adds more.
using (FileStream output = File.Create("m51-copy.fits"))
{
    values.Save(output, FitsFormat.Info, new FitsWriterOptions { Keywords = [new FitsCard("HISTORY", null, "dark subtracted")] });
}

// A colour image becomes a three-plane cube; Bitpix picks the depth.
using (FileStream output = File.Create("duck.fits"))
{
    photo.Save(output, FitsFormat.Info, new FitsWriterOptions { Bitpix = 16 });
}

Properties

Bitpix

Gets the BITPIX to write: 8 (unsigned bytes), 16 (unsigned 16-bit, stored with BZERO 32768) or -32 (float), or null (the default) for the one that fits the pixel type: 8 for 8-bit pixels, 16 for 16-bit ones and -32 for float.

public int? Bitpix { get; init; }

Property Value

int?

Default

Gets the default options.

public static FitsWriterOptions Default { get; }

Property Value

FitsWriterOptions

Keywords

Gets keyword cards to add to the header, after those of a raster read from FITS (Header). A card with a keyword the structure needs, such as BITPIX or NAXIS1, is ignored.

public IReadOnlyList<FitsCard> Keywords { get; init; }

Property Value

IReadOnlyList<FitsCard>