|
User Documentation |
||||||||
| prev file | next file | |||||||||
| SUMMARY: fields | routine DETAILS: routine | |||||||||
./toolbox/io File 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 20 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 | |
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 | |
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 | |
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. |
procedure IO_SDFITS::list, _EXTRA=_EXTRA, /verbose | |
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_files(_EXTRA=_EXTRA) | |
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_mc_scans(_EXTRA=_EXTRA) | |
Returns the unique scan names (no path) contained in the index file used by this object |
| 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 |
procedure IO_SDFITS::set_project, dir |
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 |
IO_SDFITS::set_file |
procedure IO_SDFITS::set_file, file_name, file_path=string, index_name=string |
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 |
IO_SDFITS::add_file |
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) |
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::list |
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
| Keywords | |
|
_EXTRA |
. |
|
verbose |
Print out ALL information? should I keep jumping. - |
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_files |
function IO_SDFITS::get_index_files(_EXTRA=_EXTRA) |
Returns the unique file names (no path) contained in the index file used by this object
| Keywords | |
|
_EXTRA |
. |
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_mc_scans |
function IO_SDFITS::get_index_mc_scans(_EXTRA=_EXTRA) |
Returns the unique scan names (no path) contained in the index file used by this object
| Keywords | |
|
_EXTRA |
. |