[][src]Struct fitrs::Fits

pub struct Fits { /* fields omitted */ }

Represent an open FITS file.

Implement caching. Thread-safe.

Methods

impl Fits[src]

pub fn open<P: AsRef<Path>>(path: P) -> Result<Fits, Error>[src]

Open FITS file given in provided path (read-only).

Important traits for FitsIter<'f>
pub fn iter(&self) -> FitsIter[src]

Iterate over references to Hdus.

pub fn load_all(&self)[src]

Force-read the whole FITS file and cache it.

Beware of the size of the file you are loading before doing that.

pub fn get(&self, index: usize) -> Option<Hdu>[src]

Get Hdu by index. Use 0 for primary HDU.

pub fn get_by_name(&self, index: &str) -> Option<Hdu>[src]

Get Hdu by EXTNAME. Defined in FIST standard 5.4.2.6

impl Fits[src]

pub fn create<P: AsRef<Path>>(path: P, primary_hdu: Hdu) -> Result<Fits, Error>[src]

Creates a FITS file at the given path with the provided Hdu as primary HDU.

The file and its content are immediately written on disk.

pub fn push(&mut self, hdu: Hdu) -> Result<(), Error>[src]

Push an extension HDU and update the FITS file on disk.

Currently defaults to creating an IMAGE HDU.

Trait Implementations

impl IntoIterator for Fits[src]

type Item = Hdu

The type of the elements being iterated over.

type IntoIter = FitsIntoIter

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a Fits[src]

type Item = <FitsIter<'a> as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = FitsIter<'a>

Which kind of iterator are we turning this into?

impl Debug for Fits[src]

Auto Trait Implementations

impl Send for Fits

impl Sync for Fits

impl Unpin for Fits

impl UnwindSafe for Fits

impl RefUnwindSafe for Fits

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]