Struct fitrs::Fits [−][src]
pub struct Fits { /* fields omitted */ }
Represent an open FITS file.
Implement caching. Thread-safe.
Methods
impl Fits
[src]
impl Fits
pub fn open<P: AsRef<Path>>(path: P) -> Result<Fits, Error>
[src]
pub fn open<P: AsRef<Path>>(path: P) -> Result<Fits, Error>
Open FITS file given in provided path (read-only).
ⓘImportant traits for FitsIter<'f>pub fn iter(&self) -> FitsIter
[src]
pub fn iter(&self) -> FitsIter
Iterate over references to Hdu
s.
ⓘImportant traits for FitsIterMut<'f>pub fn iter_mut(&mut self) -> FitsIterMut
[src]
pub fn iter_mut(&mut self) -> FitsIterMut
Iterate over mutable references to Hdu
s.
pub fn load_all(&self)
[src]
pub fn load_all(&self)
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]
pub fn get(&self, index: usize) -> Option<&Hdu>
Get reference to Hdu
by index. Use 0
for primary HDU.
pub fn get_mut(&mut self, index: usize) -> Option<&mut Hdu>
[src]
pub fn get_mut(&mut self, index: usize) -> Option<&mut Hdu>
Get mutable reference to Hdu
by index. Use 0
for primary HDU.
pub fn get_by_name(&self, index: &str) -> Option<&Hdu>
[src]
pub fn get_by_name(&self, index: &str) -> Option<&Hdu>
Get reference to Hdu
by EXTNAME
. Defined in FIST standard 5.4.2.6
pub fn get_mut_by_name(&mut self, index: &str) -> Option<&mut Hdu>
[src]
pub fn get_mut_by_name(&mut self, index: &str) -> Option<&mut Hdu>
Get mutable reference to Hdu
by EXTNAME
. Defined in FIST standard 5.4.2.6
impl Fits
[src]
impl Fits
pub fn create<P: AsRef<Path>>(path: P, primary_hdu: Hdu) -> Result<Fits, Error>
[src]
pub fn create<P: AsRef<Path>>(path: P, primary_hdu: Hdu) -> Result<Fits, Error>
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]
pub fn push(&mut self, hdu: Hdu) -> Result<(), Error>
Push an extension HDU and update the FITS file on disk.
Currently defaults to creating an IMAGE HDU.
Trait Implementations
impl Debug for Fits
[src]
impl Debug for Fits
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Fits
[src]
impl Drop for Fits
We must release the Hdu cache!
impl Index<usize> for Fits
[src]
impl Index<usize> for Fits
impl IndexMut<usize> for Fits
[src]
impl IndexMut<usize> for Fits
fn index_mut(&mut self, index: usize) -> &mut Hdu
[src]
fn index_mut(&mut self, index: usize) -> &mut Hdu
Get mutable Hdu
by index.
Panic if index is larger than the number of Hdu
s.
Prefer Fits::get_mut
if you need to check.
impl<'s> Index<&'s str> for Fits
[src]
impl<'s> Index<&'s str> for Fits
type Output = Hdu
Hdu
with provided EXTNAME
.
fn index(&self, index: &str) -> &Self::Output
[src]
fn index(&self, index: &str) -> &Self::Output
Get Hdu
by EXTNAME
.
Panic if EXTNAME
is not found.
Prefer Fits::get_by_name
if you need to check.
impl<'s> IndexMut<&'s str> for Fits
[src]
impl<'s> IndexMut<&'s str> for Fits
fn index_mut(&mut self, index: &str) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: &str) -> &mut Self::Output
Get mutable Hdu
by EXTNAME
.
Panic if EXTNAME
is not found.
Prefer Fits::get_mut_by_name
if you need to check.
impl IntoIterator for Fits
[src]
impl IntoIterator for Fits