|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io io_sdfits_line__define.pro
IO | +-IO_SDFITS | +-io_sdfits_line
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.
Fields Summary | |
ONLINE_DIR |
. |
ONLINE_PROJ |
. |
ONLINE_LOCK_LUN |
. |
Fields inherited from IO_SDFITS: | ||||||||||||||||||||||
|
Fields inherited from IO: | ||
|
Routine Summary 18 routines |
procedure io_sdfits_line__define | |
IO_SDFITS_LINE is intended for end users wishing to work with spectral line data. |
function IO_SDFITS_LINE::init(index_file=index_file) | private |
Called upon instantiation of this class. |
procedure IO_SDFITS_LINE::cleanup | |
Class destructor |
procedure IO_SDFITS_LINE::update_index_with_fits_file, fits_obj | private |
Reads in all the rows from every extension in the fits file represented by the passed in sdfits object, and passes this on to the index object so that the index file can be updated. |
function IO_SDFITS_LINE::group_row_info(row_info) | private |
Groups a collection of rows from the index file by file and extension. |
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. |
function IO_SDFITS_LINE::rows_to_spectra(sdfits_rows, integrations, if_numbers, feed_nums, pol_nums, nsaves, missing[, virtuals]) | private |
Handles the translation of several sdfits rows to spectrum data containers. |
function IO_SDFITS_LINE::sdfits_row_to_spectrum(row, integration, if_number, feed_num, pol_num, nsave, missing[, virtuals]) | private |
Handles the translation of an sdfits row to a spectrum data container. |
procedure IO_SDFITS_LINE::free_group_row_info, row_info | private |
Frees the memory referenced by pointers in the passed in structure |
function IO_SDFITS_LINE::get_new_fits_obj(file_name, _EXTRA=_EXTRA) | private |
Creates and returns a line_sdfits object |
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::group_locations(locations) | private |
Like other group functions in I/O, groups an array of structures by their filename, and extension tags. |
function IO_SDFITS_LINE::get_new_row_locations(filename, status) | private |
Compares index file with sdfits files listed in it, and looks for new rows in the sdfits 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.
IO_SDFITS_LINE::init | private |
function IO_SDFITS_LINE::init(index_file=index_file) |
Called upon instantiation of this class.
Keywords | |
index_file |
. |
IO_SDFITS_LINE::cleanup |
procedure IO_SDFITS_LINE::cleanup |
Class destructor
IO_SDFITS_LINE::update_index_with_fits_file | private |
procedure IO_SDFITS_LINE::update_index_with_fits_file, fits_obj |
Reads in all the rows from every extension in the fits file represented by the passed in sdfits object, and passes this on to the index object so that the index file can be updated.
Parameters | |
fits_obj |
sdfits object representing an sdfits file. |
IO_SDFITS_LINE::group_row_info | private |
function IO_SDFITS_LINE::group_row_info(row_info) |
Groups a collection of rows from the index file by file and extension. This method is needed since we will want to access each files extension only once to read the pertinent rows (for efficiany reasons).
Parameters | |
row_info |
array of structs, where each struct represents a row of the index file |
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.
Parameters | |
count |
number of spectra returned |
indicies |
. |
Keywords | |
_EXTRA |
see search_for_row_info for more info |
IO_SDFITS_LINE::rows_to_spectra | private |
function IO_SDFITS_LINE::rows_to_spectra(sdfits_rows, integrations, if_numbers, feed_nums, pol_nums, nsaves, missing[, virtuals]) |
Handles the translation of several sdfits rows to spectrum data containers. Utilizes additional info from the index file, as well as info on keywords in the extension roads are found in, and what ever expected columns were not found in the sdfits file.
IO_SDFITS_LINE::sdfits_row_to_spectrum | private |
function IO_SDFITS_LINE::sdfits_row_to_spectrum(row, integration, if_number, feed_num, pol_num, nsave, missing[, virtuals]) |
Handles the translation of an sdfits row to a spectrum data container. Utilizes additional info from the index file, as well as info on keywords in the extension roads are found in, and what ever expected columns were not found in the sdfits file.
IO_SDFITS_LINE::free_group_row_info | private |
procedure IO_SDFITS_LINE::free_group_row_info, row_info |
Frees the memory referenced by pointers in the passed in structure
Parameters | |
row_info |
contains pointers to row number lists, integration and if number lists |
IO_SDFITS_LINE::get_new_fits_obj | private |
function IO_SDFITS_LINE::get_new_fits_obj(file_name, _EXTRA=_EXTRA) |
Creates and returns a line_sdfits object
Parameters | |
file_name |
full path file name for sdfits file of with spectral line data |
Keywords | |
_EXTRA |
. |
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
IO_SDFITS_LINE::group_locations | private |
function IO_SDFITS_LINE::group_locations(locations) |
Like other group functions in I/O, groups an array of structures by their filename, and extension tags. This is used so that rows in the same file-extension can be accessed all at once.
Parameters | |
locations |
array of structures containing filenames, ext, and row # |
IO_SDFITS_LINE::get_new_row_locations | private |
function IO_SDFITS_LINE::get_new_row_locations(filename, status) |
Compares index file with sdfits files listed in it, and looks for new rows in the sdfits file.
Parameters | |
filename |
. |
status |
. |
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.
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 |
base or full filename to connect to |
Keywords | |
test |
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.
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