Produced by IDL 6.1
User Documentation

./toolbox/io
io_sdfits__define.pro

IO
|
+-io_sdfits

All known superclasses:
IO
Last modification date:
Thu Jun 2 23:56:08 2005

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.

Inherits
io
Version
$Id: io_sdfits__define.pro,v 1.49 2005/06/02 17:10:43 bgarwood 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, _EXTRA=_EXTRA

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

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).

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
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.

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)
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.

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::get_index_file_name

function IO_SDFITS::get_index_file_name([/full])

Retrieves the file name of the index file.

Returns
The file name of the index file

Keywords
full
in, optional
boolean
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
in, optional
long
where to start the range to list
finish
in, optional
long
where to stop the range to list

Keywords
sortcol
in, optional
string
what index column name to order listwith
_EXTRA
.
verbose
in
boolean (def. 0)
Print out ALL information?
user
in, optional
boolean
print out columns specified using set_user_columns? Takes precedence over verbose keyword
columns
in, optional
string array
array of column names to print out upon list command. Takes precedence over user and verbose keywords.

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_values

function IO_SDFITS::get_index_values(column_name, _EXTRA=_EXTRA)

Returns the values contained in the index file column used by this object

Returns
the values found in the index column name specified.
Uses
INDEX_FILE::get_column_values

Parameters
column_name
in, required
string
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

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

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

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_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

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

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)

Returns
0 - bad, 1 - good

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
in, required
string array
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

Returns
number of records this object is connected to

IO_SDFITS::sort_search_results

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

Parameters
results
in, required
array
integer array representing some rows in the index file
column
in, required
string
must be uniquely identify a column in the index file


Produced by IDLdoc 1.6 on Thu Jun 2 23:57:07 2005