Table of Contents

Class FitsHeaderEntry

Namespace
FitsModel
Assembly
FitsModel.dll

Represents a single 80 byte record in a FITS header.

public class FitsHeaderEntry
Inheritance
FitsHeaderEntry
Inherited Members

Constructors

FitsHeaderEntry()

Creates an empty 80 byte record in a FITS header.

public FitsHeaderEntry()

FitsHeaderEntry(string)

Represents one record in a FitsHeader. Each record must be of the proper RecordSize

public FitsHeaderEntry(string entry)

Parameters

entry string

FitsHeaderEntry(string, string)

Creates a new FitsHeaderEntry from the provided keyword and value.

public FitsHeaderEntry(string keyword, string value)

Parameters

keyword string
value string

Exceptions

FitsModelException

Thrown if the keyword is null or emtpy or the resulting entry is greater than 80 characters.

Properties

IsEndRecord

True if this record is the end record of a FITS header.

public bool IsEndRecord { get; }

Property Value

bool

Keyword

If this record is a keyword record, this will be the keyword name.

public string? Keyword { get; }

Property Value

string

RawEntry

The raw 80 character string for this entry.

public string RawEntry { get; }

Property Value

string

Value

If this record is a keyword record, this will be the value associated with the keyword.

public string? Value { get; }

Property Value

string

Methods

CreateRawValue(string, string)

Converts the provided key and value into a raw FITS header entry string.

public static string CreateRawValue(string key, string value)

Parameters

key string
value string

Returns

string

Exceptions

FitsModelException

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetBytes()

Converts this FITS header entry to an ASCII byte array.

public byte[] GetBytes()

Returns

byte[]

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

WriteToStream(Stream)

Writes this FITS header entry to the provided stream.

public Task WriteToStream(Stream stream)

Parameters

stream Stream

Returns

Task

WriteToStream(Stream, CancellationToken)

Writes this FITS header entry to the provided stream.

public Task WriteToStream(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream
cancellationToken CancellationToken

Returns

Task