|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io io_sdfits__define.pro
IO | +-io_sdfits
IO_SDFITS is the base class for spectral line and continuum sdfits classes. All the general functionality for reading, writing, navigating sdfits files, and for; translating their info to data containers is placed in this class. See UML for all IO Classes, or IO_SDFITS UML for just the line and continuum sdfits classes.
Routine Summary 30 routines |
procedure io_sdfits__define | |
IO_SDFITS is the base class for spectral line and continuum sdfits classes. |
procedure IO_SDFITS::set_debug_on | |
The class can be made to verbosly describe what its doing |
procedure IO_SDFITS::set_debug_off | |
The class can be made to be quite |
procedure IO_SDFITS::set_project, dir, _EXTRA=_EXTRA | |
This method looks into the given directory and attempts to load any existing index file. |
procedure IO_SDFITS::set_file, file_name, file_path=string, index_name=string, online=online, _EXTRA=_EXTRA | |
This method can be used to lock the io object into working with only one sdfits file. |
procedure IO_SDFITS::add_file, file_name, /new_index, index_name=index_name | |
This method is the main interface to the sdfits io classes. |
procedure IO_SDFITS::load_index, file_name, file_path=string | |
This method will read an index file, check that the index agrees with the sdfits files on disk, and create fits objects for the files listed in its index. |
procedure IO_SDFITS::set_file_path, file_path | |
Sets the path where index file and all sdfits files are to be found |
function IO_SDFITS::get_file_path() | |
Gets the path where index file and all sdfits files are to be found |
function IO_SDFITS::is_data_loaded() | |
Checks to see if this object has any sdfits files connected to it. |
procedure IO_SDFITS::set_index_file_name, file_name | |
Sets the file name of the index file. |
function IO_SDFITS::get_index_file_name([/full]) | |
Retrieves the file name of the index file. |
procedure IO_SDFITS::list[, start][, finish], [sortcol=string], _EXTRA=_EXTRA, /verbose, [/user], [columns=string array] | |
Prints out rows from the index file used by object. |
function IO_SDFITS::get_index(_EXTRA=_EXTRA) | |
Returns indicies of rows in index file that match search. |
function IO_SDFITS::get_scan_info(scan_number) | |
Returns a structure that contains info about the scan number given, such as scan number, procedure name, number of integrations, ifs, etc. |
procedure IO_SDFITS::list_index_header | |
Prints out the header section of the index file used by this object |
function IO_SDFITS::get_index_values(column_name, _EXTRA=_EXTRA) | |
Returns the values contained in the index file column used by this object |
function IO_SDFITS::get_index_files(_EXTRA=_EXTRA, full=full) | |
Returns the unique file names (no path) contained in the index file used by this object |
function IO_SDFITS::get_index_projects(_EXTRA=_EXTRA) | |
Returns the unique project names (no path) contained in the index file used by this object |
function IO_SDFITS::get_index_sources(_EXTRA=_EXTRA) | |
Returns the unique source names (no path) contained in the index file used by this object |
function IO_SDFITS::get_index_procedures(_EXTRA=_EXTRA) | |
Returns the unique procedure names (no path) contained in the index file used by this object |
function IO_SDFITS::get_index_scans(_EXTRA=_EXTRA) | |
Returns the unique scan names (no path) contained in the index file used by this object |
function IO_SDFITS::are_index_file_indicies_unique() | |
Diagnostic function to determine if index file indicies are unique (as they should be) |
procedure IO_SDFITS::set_more_format_on | |
Sets the object to print rows using the interactive 'more' format |
procedure IO_SDFITS::set_more_format_off | |
Sets the object NOT to print rows using the interactive 'more' format |
procedure IO_SDFITS::list_available_columns | |
Prints the available columns from the rows section for list; these are also the valid search keywords |
procedure IO_SDFITS::set_user_columns, columns | |
Sets what columns should be used for user listing |
procedure IO_SDFITS::list_user_columns | |
Prints the columns currently selected for the user specified listing |
function IO_SDFITS::get_num_index_rows() | |
Retrieves number of records the object is connected to - or how many rows currently in the index file |
function IO_SDFITS::sort_search_results(results, column) | |
Given an integer array representing some rows in the index, sorts this array by a given column name in the index file |
Routine Details |
io_sdfits__define |
procedure io_sdfits__define |
IO_SDFITS is the base class for spectral line and continuum sdfits classes. All the GENERAL functionality for reading, writing, navigating sdfits files, and for; translating their info to data containers is placed in this class. See UML for all IO Classes, or IO_SDFITS UML for just the line and continuum sdfits classes.
IO_SDFITS::set_debug_on |
procedure IO_SDFITS::set_debug_on |
The class can be made to verbosly describe what its doing
IO_SDFITS::set_debug_off |
procedure IO_SDFITS::set_debug_off |
The class can be made to be quite
IO_SDFITS::set_project |
This method looks into the given directory and attempts to load any existing index file. If the file does not exist, all sdfits files in this directory are loaded using the add_file method, and a new index is created. For a complete description, see the flowchart.
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->set_project, path
Parameters | |
dir |
The path in which all sdfits files and possibly the index file are to be found |
Keywords | |
_EXTRA |
. |
IO_SDFITS::set_file |
procedure IO_SDFITS::set_file, file_name, file_path=string, index_name=string, online=online, _EXTRA=_EXTRA |
This method can be used to lock the io object into working with only one sdfits file. An index file is automatically created (overwrites pre-existing one).
io = obj_new('io_sdfits_cntm') io->set_file, 'TREG_04_01.dcr.raw.fits'
Parameters | |
file_name |
The file name of the sdfits file (no path) |
Keywords | |
file_path |
Where to find the sdfits file |
index_name |
What to call the new index file |
online |
. |
_EXTRA |
. |
IO_SDFITS::add_file |
procedure IO_SDFITS::add_file, file_name, /new_index, index_name=index_name |
This method is the main interface to the sdfits io classes. It is used in turn by set_project and set_file. Most of the logic for keeping the index file in sync with the fits files is coded in this method. For a complete description, see the flowchart.
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->set_file_path, path io->add_file, 'TREG_O1_04.acs.raw.fits'
Parameters | |
file_name |
Name of sdfits file to add (no path) |
Keywords | |
new_index |
Forces the creation of a new index file (overwrites pre-existing index) |
index_name |
. |
IO_SDFITS::load_index |
procedure IO_SDFITS::load_index, file_name, file_path=string |
This method will read an index file, check that the index agrees with the sdfits files on disk, and create fits objects for the files listed in its index.
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->load_index, 'my_index', file_path='/users/me/my_project'
Parameters | |
file_name |
Index file name (no path) |
Keywords | |
file_path |
Where to find index file and sdfits files |
IO_SDFITS::set_file_path |
procedure IO_SDFITS::set_file_path, file_path |
Sets the path where index file and all sdfits files are to be found
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->set_file_path, path
Parameters | |
file_path |
Path where index file and all sdfits files are to be found. |
IO_SDFITS::get_file_path |
function IO_SDFITS::get_file_path() |
Gets the path where index file and all sdfits files are to be found
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->set_project, path print, io->get_file_path() '/users/me/my_project'
IO_SDFITS::is_data_loaded |
function IO_SDFITS::is_data_loaded() |
Checks to see if this object has any sdfits files connected to it.
IO_SDFITS::set_index_file_name |
procedure IO_SDFITS::set_index_file_name, file_name |
Sets the file name of the index file.
Parameters | |
file_name |
. |
IO_SDFITS::get_index_file_name |
function IO_SDFITS::get_index_file_name([/full]) |
Retrieves the file name of the index file.
Keywords | |
full |
wether to return the full path name of the index file or not |
IO_SDFITS::list |
procedure IO_SDFITS::list[, start][, finish], [sortcol=string], _EXTRA=_EXTRA, /verbose, [/user], [columns=string array] |
Prints out rows from the index file used by object. For exact search parameters to enter, see LINE_INDEX::search_index or CNTM_INDEX::search_index
Parameters | |
start |
where to start the range to list |
finish |
where to stop the range to list |
IO_SDFITS::get_index |
function IO_SDFITS::get_index(_EXTRA=_EXTRA) |
Returns indicies of rows in index file that match search. For exact search parameters to enter, see LINE_INDEX::search_index or CNTM_INDEX::search_index
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_scan_info |
function IO_SDFITS::get_scan_info(scan_number) |
Returns a structure that contains info about the scan number given, such as scan number, procedure name, number of integrations, ifs, etc..
Parameters | |
scan_number |
scan number information is queried for |
IO_SDFITS::list_index_header |
procedure IO_SDFITS::list_index_header |
Prints out the header section of the index file used by this object
IO_SDFITS::get_index_values |
function IO_SDFITS::get_index_values(column_name, _EXTRA=_EXTRA) |
Returns the values contained in the index file column used by this object
Parameters | |
column_name |
name of the column to query |
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_index_files |
function IO_SDFITS::get_index_files(_EXTRA=_EXTRA, full=full) |
Returns the unique file names (no path) contained in the index file used by this object
Keywords | |
_EXTRA |
. |
full |
. |
IO_SDFITS::get_index_projects |
function IO_SDFITS::get_index_projects(_EXTRA=_EXTRA) |
Returns the unique project names (no path) contained in the index file used by this object
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_index_sources |
function IO_SDFITS::get_index_sources(_EXTRA=_EXTRA) |
Returns the unique source names (no path) contained in the index file used by this object
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_index_procedures |
function IO_SDFITS::get_index_procedures(_EXTRA=_EXTRA) |
Returns the unique procedure names (no path) contained in the index file used by this object
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_index_scans |
function IO_SDFITS::get_index_scans(_EXTRA=_EXTRA) |
Returns the unique scan names (no path) contained in the index file used by this object
Keywords | |
_EXTRA |
. |
IO_SDFITS::are_index_file_indicies_unique |
function IO_SDFITS::are_index_file_indicies_unique() |
Diagnostic function to determine if index file indicies are unique (as they should be)
IO_SDFITS::set_more_format_on |
procedure IO_SDFITS::set_more_format_on |
Sets the object to print rows using the interactive 'more' format
IO_SDFITS::set_more_format_off |
procedure IO_SDFITS::set_more_format_off |
Sets the object NOT to print rows using the interactive 'more' format
IO_SDFITS::list_available_columns |
procedure IO_SDFITS::list_available_columns |
Prints the available columns from the rows section for list; these are also the valid search keywords
IO_SDFITS::set_user_columns |
procedure IO_SDFITS::set_user_columns, columns |
Sets what columns should be used for user listing
Parameters | |
columns |
array of columns to print on list command |
IO_SDFITS::list_user_columns |
procedure IO_SDFITS::list_user_columns |
Prints the columns currently selected for the user specified listing
IO_SDFITS::get_num_index_rows |
function IO_SDFITS::get_num_index_rows() |
Retrieves number of records the object is connected to - or how many rows currently in the index file
IO_SDFITS::sort_search_results |
Given an integer array representing some rows in the index, sorts this array by a given column name in the index file
Parameters | |
results |
integer array representing some rows in the index file |
column |
must be uniquely identify a column in the index file |