Struct fitsio::fitsfile::FitsFile
[−]
[src]
pub struct FitsFile { pub filename: String, // some fields omitted }
Main entry point to the FITS file format
Fields
filename: String
Name of the file
Methods
impl FitsFile
[src]
pub fn open<T: AsRef<Path>>(filename: T) -> Result<Self>
[src]
Open a fits file from disk
Examples
use fitsio::FitsFile; let f = FitsFile::open("../testdata/full_example.fits").unwrap(); // Continue to use `f` afterwards
pub fn edit<T: AsRef<Path>>(filename: T) -> Result<Self>
[src]
Open a fits file in read/write mode
pub fn create<'a, T: AsRef<Path>>(path: T) -> NewFitsFile<'a, T>
[src]
Create a new fits file on disk
pub fn hdu<T: DescribesHdu>(&mut self, hdu_description: T) -> Result<FitsHdu>
[src]
Return a new HDU object
pub fn primary_hdu(&mut self) -> Result<FitsHdu>
[src]
Return the primary hdu (HDU 0)
pub fn num_hdus(&mut self) -> Result<usize>
[src]
Return the number of HDU objects in the file
pub fn hdu_names(&mut self) -> Result<Vec<String>>
[src]
Return the list of HDU names
pub fn current_hdu(&mut self) -> Result<FitsHdu>
[src]
Get the current hdu as an HDU object
pub fn create_table<T>(
&mut self,
extname: T,
table_description: &[ConcreteColumnDescription]
) -> Result<FitsHdu> where
T: Into<String>,
[src]
&mut self,
extname: T,
table_description: &[ConcreteColumnDescription]
) -> Result<FitsHdu> where
T: Into<String>,
Create a new fits table
Create a new fits table, with columns as detailed in the ColumnDescription
object.
pub fn create_image<T>(
&mut self,
extname: T,
image_description: &ImageDescription
) -> Result<FitsHdu> where
T: Into<String>,
[src]
&mut self,
extname: T,
image_description: &ImageDescription
) -> Result<FitsHdu> where
T: Into<String>,
Create a new fits image, and return the FitsHdu
object
ⓘImportant traits for FitsHduIterator<'a>pub fn iter(&mut self) -> FitsHduIterator
[src]
Iterate over the HDUs in the file
pub fn pretty_print(&mut self) -> Result<()>
[src]
Pretty-print file to stdout
pub fn pretty_write<W>(&mut self, w: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Pretty-print the fits file structure to any Write
implementor
pub unsafe fn as_raw(&self) -> *mut fitsfile
[src]
Return a pointer to the underlying C fitsfile
object representing the current file.
This is marked as unsafe
as it is definitely something that is not required by most
users, and hence the unsafe-ness marks it as an advanced feature. I have also not
considered possible concurrency or data race issues as yet.