Produced by IDL 6.1
User Documentation

./toolbox/io
File io_sdfits__define.pro

IO
|
+-io_sdfits

All known superclasses:
IO
Last modification date:
Wed Dec 8 11:57:38 2004

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.

Inherits
io
Version
$Id: io_sdfits__define.pro,v 1.21 2004/12/02 20:28:31 paghots Exp $


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.

Examples
    path = '/users/me/my_project'
    io = obj_new('io_sdfits_line')
    io->set_project, path 
   
-
Uses
add_file

Parameters
dir
in
string
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).

Examples
   io = obj_new('io_sdfits_cntm')
   io->set_file, 'TREG_04_01.dcr.raw.fits'
   
-
Uses
add_file

Parameters
file_name
in
string
The file name of the sdfits file (no path)

Keywords
file_path
in
string
Where to find the sdfits file
index_name
in
string (def. 'file_name.index')
What to call the new index file


IO_SDFITS::add_file

procedure IO_SDFITS::add_file, file_name, /new_index

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.

Examples
    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
in
string
Name of sdfits file to add (no path)

Keywords
new_index
in
boolean (def. 0)
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.

Examples
    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
in
string
Index file name (no path)

Keywords
file_path
in
string
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

Examples
    path = '/users/me/my_project'
    io = obj_new('io_sdfits_line')
    io->set_file_path, path 
 

Parameters
file_path
in
string
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

Returns
{type=string} Path where index file and all sdfits files are to be found.
Examples
    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.

Returns
0 - data is not loaded; 1 - data is loaded.


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

procedure IO_SDFITS::list, _EXTRA=_EXTRA, /verbose

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
in
boolean (def. 0)
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

Returns
Long array of indicies of rows in index file that match search -
Uses
INDEX_FILE::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..

Returns
Structure containing info on scan
Uses
INDEX_FILE::get_scan_info

Parameters
scan_number
in
long
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

Uses
INDEX_FILE::list_header


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

Returns
The unique file names (no path) contained in the index file used by this object
Uses
INDEX_FILE::get_column_values

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

Returns
The unique project names (no path) contained in the index file used by this object
Uses
INDEX_FILE::get_column_values

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

Returns
The unique source names (no path) contained in the index file used by this object
Uses
INDEX_FILE::get_column_values

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

Returns
The unique procedure names (no path) contained in the index file used by this object
Uses
INDEX_FILE::get_column_values

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

Returns
The unique scan names (no path) contained in the index file used by this object
Uses
INDEX_FILE::get_column_values

Keywords
_EXTRA
.


Produced by IDLdoc 1.5 on Wed Dec 8 13:08:20 2004