Struct fitrs::Hdu

source ·
pub struct Hdu { /* private fields */ }
Expand description

Represent an HDU as defined in FITS standard 4.1.

Implementations

Get HeaderValue by key. Return None if value is not found in Hdu.

Get data array stored in the Hdu.

Create a new HDU with the shape and data given as parameters.

The HDU must be added to a Fits object to be written persistently to disk.

Make an Hdu with an empty data array.

Insert a value into header.

FITS file is saved with the header in the order of insertion. Keys longer than 8 bytes are truncated on writing to disk.

Example
use fitrs::{Hdu};
let mut hdu = Hdu::empty();
hdu.insert("KEYSTR", "My string");
hdu.insert("KEYSTR2", "Strings longer than 68 characters are supported as well, following the continued string convention.");
hdu.insert("KEYFLOAT", 3.14);
hdu.insert("KEYINT", 42);

Trait Implementations

Formats the value using the given formatter. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.