|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io fits__define.pro
Provides basic interface for reading and writing fits files
Fields Summary | |
FILE_NAME |
full path name to the fits file |
NUM_EXTENSIONS |
number of extensions for this file |
EXTENSION_NAMES |
pointer to list of names for each extension |
EXTENSION_TYPES |
pointer to list of types for each extension |
AXIS |
pointer to 2-D array with info on each extension |
PRIMARY_HEADER |
fits_header_parsert object for primary header |
EXT_HEADER |
fits_header_parsert object for last extension header |
PROPERTIES_KNOWN |
flag signaling if above fields are valid |
DEBUG |
flag for determining if debug printouts occur |
VERSION |
string denoting what version of the io modules |
Routine Summary 35 routines |
procedure fits__define | |
Provides basic interface for reading and writing fits files |
function FITS::init([file_name], version=version) | |
Class Constructor - if file name is passed and it exists, the properties of this file are determined and stored |
procedure FITS::cleanup | private |
Class Destructor |
function FITS::get_version() | |
Retrieves this objects version number |
procedure FITS::set_version, ver | |
Sets the version number of this object |
procedure FITS::set_debug_on | |
Makes object verbose |
procedure FITS::set_debug_off | |
Makes object quiet |
procedure FITS::update_properties | |
Determins properties of file and last extension, and sotres them |
procedure FITS::update_file_properties | |
Determines and stores the fits files number of extenions, names & types of each extension, and more info on each extension, plus read in primry header keywords |
procedure FITS::update_last_extension_properties | |
Determines and stores info on the last extension of the file |
procedure FITS::set_file_name, file_name | |
Sets the full path name of the fits file |
function FITS::get_full_file_name() | |
Retrieves the full path name of the fits file |
function FITS::get_file_name() | |
Retrieves just the file name of the fits file (no path) |
function FITS::file_exists([file_name=string]) | |
Checks if fits file represented by object (or keyword) exist on disk |
function FITS::get_number_extensions() | |
Returns the number of extensions of this fits file |
function FITS::get_extension_type(ext_num) | |
Returns the type of the given extension |
function FITS::get_extension_name(ext_num) | |
Returns the name of the given extension |
function FITS::get_ext_num_rows(ext_num) | |
REturns the number of rows for this extension |
function FITS::get_rows([ext=long], [row_nums=array]) | |
Returns the contents of the gvein extension and row numbers for this fits file. |
procedure FITS::create_extension_header_struct, hdr_lines | private |
Creates a new header struct using the string array from the extension header |
procedure FITS::create_primary_header_struct, hdr_lines | private |
Creates a new header struct using the string array from the primary header |
procedure FITS::list_extension_header | |
Prints the contents of the header of the last read extension |
function FITS::get_extension_header_value(keyword) | |
Retrieves the value of a keyword in the last read extension |
procedure FITS::write_rows_new_extension, rows[, virtuals] | |
Appends a new extension to fits file and adds rows to it. |
procedure FITS::append_rows_to_extension, rows | |
Appends rows to last extension in fits file |
function FITS::get_column_type(extension[, column_number], [column_name=string]) | |
Retrieves the TFROM# value for an extension column specified either by number or name |
function FITS::row_compatible_with_extension(row, extension) | |
Called before an extension is appended to with new rows. |
function FITS::make_header_array(virtuals) | |
Converts a structure containing keyword-values and returns a string array suitable for using to add to extension header |
function FITS::get_logical_columns(forms, n_logic_cols) | private |
Given the TFORMs found in extension header, finds which ones are of type '1L' |
function FITS::fits_type_to_idl_type(fits_type[, idl_size]) | private |
Converts fits TFORM# keyword value to it's IDL integer type |
function FITS::get_uniques(arr) | private |
Sorts array, and returns all unique values of sort |
procedure FITS::modify_row_column, extension, row_num, col_num, value | |
Overwrites a value in a fits file, identified by extension number, row number, and column number. |
procedure FITS::modify_rows, extension, row_nums, rows | |
Overwrites entire rows in fits extension |
function FITS::get_column_num(extension, col_name) | private |
Retrieves the column number for a given column name and extension. |
procedure FITS::modify_row_col_name, extension, row_num, column_name, value | |
Modifies a 'cell' in a fits file, by specifiying the extension, row number, column name, and the value to replace 'cell' with. |
Routine Details |
fits__define |
procedure fits__define |
Provides basic interface for reading and writing fits files
FITS::init |
Class Constructor - if file name is passed and it exists, the properties of this file are determined and stored
Parameters | |
file_name |
full path name to fits file |
Keywords | |
version |
. |
FITS::cleanup | private |
procedure FITS::cleanup |
Class Destructor
FITS::get_version |
function FITS::get_version() |
Retrieves this objects version number
FITS::set_version |
procedure FITS::set_version, ver |
Sets the version number of this object
Parameters | |
ver |
. |
FITS::set_debug_on |
procedure FITS::set_debug_on |
Makes object verbose
FITS::set_debug_off |
procedure FITS::set_debug_off |
Makes object quiet
FITS::update_properties |
procedure FITS::update_properties |
Determins properties of file and last extension, and sotres them
FITS::update_file_properties |
procedure FITS::update_file_properties |
Determines and stores the fits files number of extenions, names & types of each extension, and more info on each extension, plus read in primry header keywords
FITS::update_last_extension_properties |
procedure FITS::update_last_extension_properties |
Determines and stores info on the last extension of the file
FITS::set_file_name |
procedure FITS::set_file_name, file_name |
Sets the full path name of the fits file
Parameters | |
file_name |
full path name of fits file |
FITS::get_full_file_name |
function FITS::get_full_file_name() |
Retrieves the full path name of the fits file
FITS::get_file_name |
function FITS::get_file_name() |
Retrieves just the file name of the fits file (no path)
FITS::file_exists |
function FITS::file_exists([file_name=string]) |
Checks if fits file represented by object (or keyword) exist on disk
Keywords | |
file_name |
full path name of file to check |
FITS::get_number_extensions |
function FITS::get_number_extensions() |
Returns the number of extensions of this fits file
FITS::get_extension_type |
function FITS::get_extension_type(ext_num) |
Returns the type of the given extension
Parameters | |
ext_num |
extension number in question |
FITS::get_extension_name |
function FITS::get_extension_name(ext_num) |
Returns the name of the given extension
Parameters | |
ext_num |
extension number in question |
FITS::get_ext_num_rows |
function FITS::get_ext_num_rows(ext_num) |
REturns the number of rows for this extension
Parameters | |
ext_num |
extension number |
FITS::get_rows |
Returns the contents of the gvein extension and row numbers for this fits file. Also updates properties of this extension that was read.
Keywords | |
ext |
extension to read, default = 1 |
row_nums |
array of row numbers to read (0-based), default=all |
FITS::create_extension_header_struct | private |
procedure FITS::create_extension_header_struct, hdr_lines |
Creates a new header struct using the string array from the extension header
Parameters | |
hdr_lines |
string array of extension header returned by mrdfits |
FITS::create_primary_header_struct | private |
procedure FITS::create_primary_header_struct, hdr_lines |
Creates a new header struct using the string array from the primary header
Parameters | |
hdr_lines |
string array of primary header returned by FITS_READ |
FITS::list_extension_header |
procedure FITS::list_extension_header |
Prints the contents of the header of the last read extension
FITS::get_extension_header_value |
function FITS::get_extension_header_value(keyword) |
Retrieves the value of a keyword in the last read extension
Parameters | |
keyword |
extension header keyword |
FITS::write_rows_new_extension |
Appends a new extension to fits file and adds rows to it. Additional keywords are added to the extesnion header, and fits files properties are updated.
Parameters | |
rows |
array of structures that mirror rows to be writtein |
virtuals |
keywords to be written to new extension (other then column specs) |
FITS::append_rows_to_extension |
procedure FITS::append_rows_to_extension, rows |
Appends rows to last extension in fits file
Parameters | |
rows |
array of structs mirroring rows to be appended |
FITS::get_column_type |
function FITS::get_column_type(extension[, column_number], [column_name=string]) |
Retrieves the TFROM# value for an extension column specified either by number or name
Parameters | |
extension |
extension number in which column is to be found |
column_number |
column number to be queried |
Keywords | |
column_name |
column name to be queried; overrides column number |
FITS::row_compatible_with_extension |
function FITS::row_compatible_with_extension(row, extension) |
Called before an extension is appended to with new rows. Checks to see if a representative of these rows has properties that match the existing columns of the extension. For each tag in the row structure, its name and type is compared to the column, in increasing order.
Parameters | |
row |
structure representing first row to be appended to extension |
extension |
the extension number to be appended to |
FITS::make_header_array |
function FITS::make_header_array(virtuals) |
Converts a structure containing keyword-values and returns a string array suitable for using to add to extension header
Parameters | |
virtuals |
structure cointing keyword-values for header |
FITS::get_logical_columns | private |
function FITS::get_logical_columns(forms, n_logic_cols) |
Given the TFORMs found in extension header, finds which ones are of type '1L'
Parameters | |
forms |
string array of all TFORM#s foudn in extension header |
n_logic_cols |
number of logic columns found |
FITS::fits_type_to_idl_type | private |
Converts fits TFORM# keyword value to it's IDL integer type
Parameters | |
fits_type |
the value of the TFORM# keyword in the ext. header |
idl_size |
the size of this type (ex: string length) |
FITS::get_uniques | private |
function FITS::get_uniques(arr) |
Sorts array, and returns all unique values of sort
Parameters | |
arr |
array to be uniqed |
FITS::modify_row_column |
procedure FITS::modify_row_column, extension, row_num, col_num, value |
Overwrites a value in a fits file, identified by extension number, row number, and column number.
FITS::modify_rows |
Overwrites entire rows in fits extension
FITS::get_column_num | private |
Retrieves the column number for a given column name and extension. Note that column name refers to name in the header line: TTYPEn = 'name'
Parameters | |
extension |
extension to retrieve column number from |
col_name |
column name whose number is retrieved |
FITS::modify_row_col_name |
procedure FITS::modify_row_col_name, extension, row_num, column_name, value |
Modifies a 'cell' in a fits file, by specifiying the extension, row number, column name, and the value to replace 'cell' with.