Documentation ¶
Overview ¶
fitsio provides read and write access to FITS files.
Index ¶
- Constants
- func CopyHDU(dst, src *File, i int) error
- func CopyTable(dst, src *Table) error
- func CopyTableRange(dst, src *Table, beg, end int64) error
- func NewImage(bitpix int, axes []int) *imageHDU
- type Card
- type Column
- type Decoder
- type Encoder
- type File
- type HDU
- type HDUType
- type Header
- func (hdr *Header) Append(cards ...Card) error
- func (hdr *Header) Axes() []int
- func (hdr *Header) Bitpix() int
- func (hdr *Header) Clear()
- func (hdr *Header) Comment() string
- func (hdr *Header) Get(n string) *Card
- func (hdr *Header) History() string
- func (hdr *Header) Index(n string) int
- func (hdr *Header) Keys() []string
- func (hdr *Header) Set(n string, v interface{}, comment string)
- func (hdr *Header) Text() string
- func (hdr *Header) Type() HDUType
- type Image
- type Mode
- type Reader
- type Rows
- type Table
- func (t *Table) Close() error
- func (t *Table) Col(i int) *Column
- func (t *Table) Cols() []Column
- func (t *Table) Data() (Value, error)
- func (t *Table) Header() *Header
- func (t *Table) Index(n string) int
- func (t *Table) Name() string
- func (t *Table) NumCols() int
- func (t *Table) NumRows() int64
- func (t *Table) Read(beg, end int64) (*Rows, error)
- func (t *Table) ReadRange(beg, end, inc int64) (*Rows, error)
- func (t *Table) Type() HDUType
- func (t *Table) Version() int
- func (t *Table) Write(args ...interface{}) error
- type Type
- type Value
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CopyTableRange ¶
CopyTableRange copies the rows interval [beg,end) from src into dst
Types ¶
type Column ¶
type Column struct { Name string // column name, corresponding to “TTYPE“ keyword Format string // column format, corresponding to “TFORM“ keyword Unit string // column unit, corresponding to “TUNIT“ keyword Null string // null value, corresponding to “TNULL“ keyword Bscale float64 // bscale value, corresponding to “TSCAL“ keyword Bzero float64 // bzero value, corresponding to “TZERO“ keyword Display string // display format, corresponding to “TDISP“ keyword Dim []int64 // column dimension corresponding to “TDIM“ keyword Start int64 // column starting position, corresponding to “TBCOL“ keyword // contains filtered or unexported fields }
Column represents a column in a FITS table
type Decoder ¶
func NewDecoder ¶
NewDecoder creates a new Decoder according to the capabilities of the underlying io.Reader
type Encoder ¶
func NewEncoder ¶
NewEncoder creates a new Encoder according to the capabilities of the underlying io.Writer
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a FITS file.
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header describes a Header-Data Unit of a FITS file
func NewDefaultHeader ¶
func NewDefaultHeader() *Header
NewDefaultHeader creates a Header with CFITSIO default Cards, of type IMAGE_HDU and bitpix=8, no axes.
type Image ¶
type Image interface { HDU Read(ptr interface{}) error Write(ptr interface{}) error Raw() []byte Image() image.Image // contains filtered or unexported methods }
Image represents a FITS image
func NewPrimaryHDU ¶
NewPrimaryHDU creates a new PrimaryHDU with Header hdr. If hdr is nil, a default Header will be created.
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Rows is the result of a query on a FITS Table. Its cursors starts before the first row of the result set. Use Next to advance through the rows:
rows, err := table.Read(0, -1) ... for rows.Next() { var id int var x float64 err = rows.Scan(&id, &x) ... } err = rows.Err() // get any error encountered during iteration ...
func (*Rows) Close ¶
Close closes the Rows, preventing further enumeration. Close is idempotent and does not affect the result of Err.
func (*Rows) Err ¶
Err returns the error, if any, that was encountered during iteration. Err may be called after an explicit or implicit Close.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func NewTableFrom ¶
NewTableFrom creates a new table in the given FITS file, using the struct v as schema
func (*Table) Read ¶
Read reads rows over the range [beg, end) and returns the corresponding iterator. if end > maxrows, the iteration will stop at maxrows ReadRange has the same semantics than a `for i=0; i < max; i++ {...}` loop
func (*Table) ReadRange ¶
ReadRange reads rows over the range [beg, end) and returns the corresponding iterator. if end > maxrows, the iteration will stop at maxrows ReadRange has the same semantics than a `for i=0; i < max; i+=inc {...}` loop
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
view-fits
view-fits is a simple program to display images in a FITS file.
|
view-fits is a simple program to display images in a FITS file. |
fltimg provides image.Image implementations for the float32- and float64-image encodings of FITS.
|
fltimg provides image.Image implementations for the float32- and float64-image encodings of FITS. |