Struct fitsio::fitsfile::FitsHdu [] [src]

pub struct FitsHdu {
    pub info: HduInfo,
    // some fields omitted
}

Struct representing a FITS HDU

Fields

Information about the current HDU

Methods

impl FitsHdu
[src]

[src]

Read the HDU name

[src]

Read header key

[src]

Write a fits key to the current header

[src]

Read pixels from an image between a start index and end index

The range is exclusive of the upper value

[src]

Read multiple rows from a fits image

[src]

Read a single row from a fits image

[src]

Read a square region from the chip.

Lower left indicates the starting point of the square, and the upper right defines the pixel beyond the end. The range of pixels included is inclusive of the lower end, and exclusive of the upper end.

[src]

Read a whole image into a new Vec

This reads an entire image into a one-dimensional vector

[src]

Write raw pixel values to a FITS image

If the length of the dataset exceeds the number of columns, the data wraps around to the next row.

The range is exclusive of the upper value.

[src]

Write a rectangular region to the fits image

The ranges must have length of 2, and they represent the limits of each axis. The limits are inclusive of the lower bounds, and exclusive of the and upper bounds.

For example, writing with ranges 0..10 and 0..10 wries an 10x10 sized image.

[src]

Write an entire image to the HDU passed in

Firstly a check is performed, making sure that the amount of data will fit in the image. After this, all of the data is written to the image.

[src]

Resize a HDU image

The new_size parameter defines the new size of the image. Unlike cfitsio, the order of the dimensions of new_size follows the C convention, i.e. row-major order.

[src]

Copy an HDU to another open fits file

[src]

Insert a column into a fits table

The column location is 0-indexed. It is inserted at that position, and the following columns are shifted back.

[src]

Add a new column to the end of the table

[src]

Remove a column from the fits file

The column can be identified by id or name.

[src]

Read a subset of a fits column

The range is exclusive of the upper value

[src]

Read a subset of a fits column

The range is exclusive of the upper value

[src]

Write data to part of a column

The range is exclusive of the upper value

[src]

Write data to an entire column

This default implementation does not check the length of the column first, but if the length of the data array is longer than the length of the table, the table will be extended with extra rows. This is as per the fitsio definition.

Important traits for ColumnIterator<'a>
[src]

Iterate over the columns in a fits file

[src]

Delete the current HDU from the fits file.

Note this method takes self by value, and as such the hdu cannot be used after this method is called.

[src]

Read a single value from a fits table

This will be inefficient if lots of individual values are wanted.

[src]

Extract a single row from the file

This method uses returns a FitsRow, which is provided by the user, using a derive implementation from the fitsio-derive crate,

#[macro_use]
extern crate fitsio_derive;
extern crate fitsio;
use fitsio::fitsfile::FitsRow;

#[derive(Default, FitsRow)]
struct Row {
    #[fitsio(colname = "intcol")]
    intfoo: i32,
    #[fitsio(colname = "strcol")]
    foobar: String,
}

// Pick the 4th row
let row: Row = hdu.row(&mut f, 4).unwrap();
assert_eq!(row.intfoo, 16);
assert_eq!(row.foobar, "value4");

Trait Implementations

Auto Trait Implementations

impl Send for FitsHdu

impl Sync for FitsHdu