Documentation |
Information about FITS file
info = fitsinfo(filename)
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 string enclosed in single quotes 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 | String | |
File modification date | String | |
Size of the file in bytes | double | |
List of extensions in the file in the order that they occur | Cell array of strings | |
Information about the primary data in the FITS file | Structure array |
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 | String | |
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. | double array | |
Size of the primary data in bytes | double | |
Value used to represent undefined data | double | |
Value, used with Slope, to calculate actual pixel values from the array pixel values, using the equation: actual_value = Slope*array_value + Intercept | double | |
Value, used with Intercept, to calculate actual pixel values from the array pixel values, using the equation: actual_value = Slope*array_value + Intercept | double | |
Number of bytes from beginning of the file to the location of the first data value | double | |
A number-of-keywords-by-3 cell array containing keywords, values, and comments of the header in each column | Cell array of strings |
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
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 | double | |
Number of characters in each row | double | |
Number of fields in each row | double array | |
A 1-by-NFields cell containing formats in which each field is encoded. The formats are FORTRAN-77 format codes. | Cell array of strings | |
A 1-by-NFields cell containing precision of the data in each field | Cell array of strings | |
A 1-by-NFields array containing the number of characters in each field | double array | |
A 1-by-NFields array of numbers representing the starting column for each field | double array | |
Size of the data in the table in bytes | double | |
A 1-by-NFields array of numbers used to represent undefined data in each field | Cell array of strings | |
A 1-by-NFields array of numbers used along with Slope to calculate actual data values from the array data values using the equation: actual_value = Slope*array_value+Intercept | double array | |
A 1-by-NFields array of numbers used with Intercept to calculate true data values from the array data values using the equation: actual_value = Slope*array_value+Intercept | double array | |
Number of bytes from beginning of the file to the location of the first data value in the table | double | |
A number-of-keywords-by-3 cell array containing all the Keywords, Values and Comments in the ASCII table header | Cell array of strings |
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 | double | |
Number of bytes in each row | double | |
Number of fields in each row | double | |
A 1-by-NFields cell array containing the data type of the data in each field. The data type is represented by a FITS binary table format code. | Cell array of strings | |
A 1-by-NFields cell containing precision of the data in each field | Cell array of strings | |
A 1-by-NFields array, where each element contains the number of values in the Nth field | double array | |
Size of the data in the Binary Table, in bytes. Includes any data past the main table. | double | |
An 1-by-NFields array of numbers used to represent undefined data in each field | Cell array of double | |
A 1-by-NFields array of numbers used along with Slope to calculate actual data values from the array data values using the equation: actual_value = slope*array_value+Intercept | double array | |
A 1-by-NFields array of numbers used with Intercept to calculate true data values from the array data values using the equation: actual_value = Slope*array_value+Intercept | double array | |
Number of bytes from beginning of the file to the location of the first data value | double | |
Size of any data past the main table, in bytes | double | |
Number of bytes from the beginning of the file to any data past the main table | double | |
A number-of-keywords-by-3 cell array containing all the Keywords, values, and comments in the Binary Table header | Cell array of strings |
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 | String | |
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. | double array | |
Size of the data in the Image extension in bytes | double | |
Number of bytes from the beginning of the file to the first data value | double | |
Value used to represent undefined data | double | |
Value, used with Slope, to calculate actual pixel values from the array pixel values, using the equation: actual_value = Slope*array_value+Intercept | double | |
Value, used with Intercept, to calculate actual pixel values from the array pixel values, using the equation: actual_value = Slope*array_value + Intercept | double | |
A number-of-keywords-by-3 cell array containing all the Keywords, values, and comments in the Binary Table header | Cell array of strings |
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 | String | |
Sizes of each dimension | double array | |
Size of the data in nonstandard extensions, in bytes | double | |
Number of bytes from beginning of the file to the first data value | double | |
Representation of undefined data | double | |
Value, used with Slope, to calculate actual data values from the array data values, using the equation: actual_value = Slope*array_value+Intercept | double | |
Value, used with Intercept, to calculate actual data values from the array data values, using the equation: actual_value = Slope*array_value+Intercept | double | |
A number-of-keywords-by-3 cell array containing all the Keywords, values, and comments in the Binary Table header | Cell array of strings |