fitsinfo
Information about FITS file
Syntax
info = fitsinfo(filename)
Description
info = fitsinfo(filename)
returns the structure,
info
, with fields that contain information about the contents of a Flexible
Image Transport System (FITS) file. filename
is a character vector or string
scalar that specifies the name of the FITS file.
The info
structure contains the following
fields, listed in the order they appear in the structure. In addition,
the info structure can also contain information about any number of
optional file components, called extensions in
FITS terminology. For more information, see FITS File Extensions.
Field Name | Description | Return Type |
---|---|---|
| Name of the file | Character vector |
| File modification date | Character vector |
| Size of the file in bytes |
|
| List of extensions in the file in the order that they occur | Cell array of character vectors |
| Information about the primary data in the FITS file | Structure array |
PrimaryData
The PrimaryData
field is a structure that
describes the primary data in the file. The following table lists
the fields in the order they appear in the structure.
Field Name | Description | Return Type |
---|---|---|
| Precision of the data | Character vector |
| Size of each dimension. The number of rows correspond to the value of the NAXIS2 keyword, while the number of columns correspond to the value of the NAXIS1 keyword. Any further dimensions correspond to NAXIS3, NAXIS4, and so on. |
|
| Size of the primary data in bytes |
|
| Value used to represent undefined data |
|
| Value, used with |
|
| Value, used with |
|
| Number of bytes from beginning of the file to the location of the first data value |
|
| A number-of-keywords-by-3 cell array containing keywords, values, and comments of the header in each column | Cell array of character vectors |
FITS File Extensions
A FITS file can also include optional extensions. If the file
contains any of these extensions, the info
structure
can contain these additional fields.
AsciiTable — Numeric information in tabular format, stored as ASCII characters
BinaryTable — Numeric information in tabular format, stored in binary representation
Image — A multidimensional array of pixels
Unknown — Nonstandard extension
AsciiTable Extension
The AsciiTable
structure contains the following
fields, listed in the order they appear in the structure.
Field Name | Description | Return Type |
---|---|---|
| Number of rows in the table |
|
| Number of characters in each row |
|
| Number of fields in each row |
|
| A 1-by- | Cell array of character vectors |
| A 1-by- | Cell array of character vectors |
| A 1-by- |
|
| A 1-by- |
|
| Size of the data in the table in bytes |
|
| A 1-by- | Cell array of character vectors |
| A 1-by- |
|
| A 1-by- |
|
| Number of bytes from beginning of the file to the location of the first data value in the table |
|
| A number-of-keywords-by-3 cell array containing all the Keywords, Values and Comments in the ASCII table header | Cell array of character vectors |
BinaryTable Extension
The BinaryTable
structure contains the following
fields, listed in the order they appear in the structure.
Field Name | Description | Return Type |
---|---|---|
| Number of rows in the table |
|
| Number of bytes in each row |
|
| Number of fields in each row |
|
| A 1-by- | Cell array of character vectors |
| A 1-by- | Cell array of character vectors |
| A 1-by- |
|
| Size of the data in the Binary Table, in bytes. Includes any data past the main table. |
|
| An 1-by- | Cell array of |
| A 1-by- |
|
| A 1-by- |
|
| Number of bytes from beginning of the file to the location of the first data value |
|
| Size of any data past the main table, in bytes |
|
| Number of bytes from the beginning of the file to any data past the main table |
|
| A number-of-keywords-by-3 cell array containing all the Keywords, values, and comments in the Binary Table header | Cell array of character vectors |
Image Extension
The Image
structure contains the following
fields, listed in the order they appear in the structure.
Field Name | Description | Return Type |
---|---|---|
| Precision of the data | Character vector |
| Size of each dimension. The number of rows correspond to the value of the NAXIS2 keyword, while the number of columns correspond to the value of the NAXIS1 keyword. Any further dimensions correspond to NAXIS3, NAXIS4, and so on. |
|
| Size of the data in the Image extension in bytes |
|
| Number of bytes from the beginning of the file to the first data value |
|
| Value used to represent undefined data |
|
| Value, used with |
|
| Value, used with |
|
| A number-of-keywords-by-3 cell array containing all the Keywords, values, and comments in the Binary Table header | Cell array of character vectors |
Unknown Structure
The Unknown
structure contains the following
fields, listed in the order they appear in the structure.
Field Name | Description | Return Type |
---|---|---|
| Precision of the data | Character vector |
| Sizes of each dimension |
|
| Size of the data in nonstandard extensions, in bytes |
|
| Number of bytes from beginning of the file to the first data value |
|
| Representation of undefined data |
|
| Value, used with |
|
| Value, used with |
|
| A number-of-keywords-by-3 cell array containing all the Keywords, values, and comments in the Binary Table header | Cell array of character vectors |
Examples
Version History
Introduced before R2006a