Produced by IDL 6.1
User Documentation

./toolbox/io
io_sdfits_line__define.pro

IO
|
+-IO_SDFITS
  |
  +-io_sdfits_line

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

IO_SDFITS_LINE is intended for end users wishing to work with spectral line data. It's the child class of IO_SDFITS used for reading, writing, navigating sdfits spectrual line files, and for translating their info to spectrum data containers. See UML for all IO Classes, or IO_SDFITS UML for just the line and continuum sdfits classes.

Routine Summary  9 routines

procedure io_sdfits_line__define

IO_SDFITS_LINE is intended for end users wishing to work with spectral line data.

procedure IO_SDFITS_LINE::cleanup

Class destructor

function IO_SDFITS_LINE::get_spectra([count], indicies, [_EXTRA=_EXTRA])

This function searches the index file using the keyword parameters passed into it, reads the appropriate parts of the sdfits files, and tranlates this data into spectrum structures, which are returned.

procedure IO_SDFITS_LINE::load_new_sdfits_rows

Determines if any files have grown, and appends new rows to the index file

function IO_SDFITS_LINE::get_online_files([newest_acs][, newest_dcr][, newest_sp][, status])

Finds the latest files in the online directory.

procedure IO_SDFITS_LINE::set_online, file_name, [test=bool]

Connects to a file in the online directory, and sets up object so that every time a query of the index file is done, the update method is called.

procedure IO_SDFITS_LINE::update

Reads the new lines in an index file into memory, if the size of the index file has changed.

procedure IO_SDFITS_LINE::lock_file

lock file needed for sharing resources with other processes.

procedure IO_SDFITS_LINE::unlock_file

lock file needed for sharing resources with other processes.

Routine Details

io_sdfits_line__define

procedure io_sdfits_line__define

IO_SDFITS_LINE is intended for end users wishing to work with spectral line data. It's the child class of IO_SDFITS used for reading, writing, navigating sdfits spectrual line files, and for translating their info to spectrum data containers. See UML for all IO Classes, or IO_SDFITS UML for just the line and continuum sdfits classes.

Inherits
io_sdfits
Uses
LINE_INDEX SDFITS
Version
$Id: io_sdfits_line__define.pro,v 1.32 2005/05/28 15:58:26 paghots Exp $

IO_SDFITS_LINE::cleanup

procedure IO_SDFITS_LINE::cleanup

Class destructor

IO_SDFITS_LINE::get_spectra

function IO_SDFITS_LINE::get_spectra([count], indicies, [_EXTRA=_EXTRA])

This function searches the index file using the keyword parameters passed into it, reads the appropriate parts of the sdfits files, and tranlates this data into spectrum structures, which are returned.

Returns
Array of spectrum structures
Examples
 
Uses
LINE_INDEX::search_for_row_info SDFITS::get_and_eval_rows IO_SDFITS_LINE::rows_to_spectra
Version
$Id: io_sdfits_line__define.pro,v 1.32 2005/05/28 15:58:26 paghots Exp $

Parameters
count
out, optional
variable
number of spectra returned
indicies
.

Keywords
_EXTRA
in, optional
see search_for_row_info for more info

IO_SDFITS_LINE::load_new_sdfits_rows

procedure IO_SDFITS_LINE::load_new_sdfits_rows

Determines if any files have grown, and appends new rows to the index file

Examples
>io->set_file, 'filename' >io->list ; here you see contents of 'filename' >io->update ; even though 'filename' hasnt changed >'No sdfits file(s) in index need updating' ; now new rows are appended to 'filename' (by the online filler perhaps) >io->update >'Index file updated with 5 rows' >io->list ; here you see the original contents of 'filname' ; plus the extra 5 new rows. ; NOTE: the index file was NOT re-created from scatch
Uses
get_new_row_locations group_row_locations

IO_SDFITS_LINE::get_online_files

function IO_SDFITS_LINE::get_online_files([newest_acs][, newest_dcr][, newest_sp][, status])

Finds the latest files in the online directory.

Returns
the newest fits file (of all backends) in the online directory

Parameters
newest_acs
out, optional
variable
the newest spectrometer fits file in the online directory
newest_dcr
out, optional
variable
the newest dcr fits file in the online directory
newest_sp
out, optional
variable
the newest spectral processor fits file in the online directory
status
out, optional
variable
0 - error, 1 - success

IO_SDFITS_LINE::set_online

procedure IO_SDFITS_LINE::set_online, file_name, [test=bool]

Connects to a file in the online directory, and sets up object so that every time a query of the index file is done, the update method is called. This depends on another process(es) that should be updating the sdfits and index files for the current project.

Parameters
file_name
in, required
string
base or full filename to connect to

Keywords
test
in, optional
bool
if true, this is a test, and the online directory does not need to be visible

IO_SDFITS_LINE::update

procedure IO_SDFITS_LINE::update

Reads the new lines in an index file into memory, if the size of the index file has changed. Uses a lock file since other processes might be reading/writing the index file.

Uses
INDEX_FILE::read_new_rows

IO_SDFITS_LINE::lock_file

procedure IO_SDFITS_LINE::lock_file

lock file needed for sharing resources with other processes. if lock file already exists, then some other process is using the resource, and we wait (no time out). Once file is gone, we can lock the resource. this method creates the file /home/sdfits/project.lock

IO_SDFITS_LINE::unlock_file

procedure IO_SDFITS_LINE::unlock_file

lock file needed for sharing resources with other processes. this method destorys the file /home/sdfits/project.lock


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