|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io line_index__define.pro
INDEX_FILE | +-line_index
Child class of INDEX_FILE, contains special functionality for dealing with spectral line data. This mostly entails the translation of sdfits data into contents of the index file. See UML for all IO Classes, or INDEX UML for just index classes. This class is responsible for establishing the correct class for managing the row section of the index file, the translation between sdfits and index rows, translation from spectra to index rows, and provides the search gateway.
Fields Summary | |
IF_FILLER |
object dedicating to filling if numbers for sdfits rows |
Fields inherited from INDEX_FILE: | ||||||||||||||||||||||||
|
Routine Summary 19 routines |
procedure line_index__define | |
Child class of INDEX_FILE, contains special functionality for dealing with spectral line data. |
function LINE_INDEX::init(_EXTRA=_EXTRA) | private |
Class Constructor - special formats for spectral line initialized here |
procedure LINE_INDEX::cleanup | private |
Class Destructor - cleanup resources |
function LINE_INDEX::get_row_info_strct() | private |
Returns the specail structure needed for spectral line data |
function LINE_INDEX::search_index([start][, finish], SEARCH=SEARCH, [INDEX=long], [PROJECT=string], [FILE=string], [EXTENSION=long], [ROW=long], [SOURCE=string], [PROCEDURE=string], [E2ESCAN=long], [SUBSCAN=long], [SCAN=long], [POLARIZATION=string], [PLNUM=long ], [IFNUM=long ], [FEED=long], [FDNUM=long], [INT=long], [NUMCHN=long], [SIG=string], [CAL=string], [SAMPLER=string], [AZIMUTH=string], [ELEVATION=string], [LONGITUDE=string], [LATITUDE=string], [LST=string], [CENTFREQ=string], [RESTFREQ=string], [VELOCITY=string], [RESOLUTION=string], [DATEOBS=string], [BANDWIDTH=double], [EXPOSURE=double], [TSYS=double], [NSAVE=long]) | |
This method searches the rows in the index file using the optional keywords. |
function LINE_INDEX::parse_extension_rows(rows, proj, file_name, ext, missing, virtuals, start) | |
Translates raw sdfits rows into the rows to be written to the index file. |
procedure LINE_INDEX::update_file, ext_rows, proj, file_name, ext, missing, virtuals, start_row | |
Appends row info to an index file, given a group of rows from sdfits files. |
function LINE_INDEX::get_if_numbers(scan_rows, names, ints, index_start, index_end) | private |
Algorithm for assigning if numbers for each row in the index file (zero-based). |
function LINE_INDEX::get_integration_numbers(scan_rows, names) | private |
Algorithm for determining integration numbers (0-based), given the sdfits rows of a scan. |
function LINE_INDEX::get_feed_numbers(scan_rows, names) | private |
Algorithm for determining feed numbers (0-based), given the sdfits rows of a scan. |
function LINE_INDEX::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 LINE_INDEX::update_with_spectra, spectra, file_name, extension, start_row | |
Appends row info to an index file, given a group of spectra. |
procedure LINE_INDEX::replace_with_spectrum, index, spectrum, file_name, extension, row_num | |
Replaces a line specified by index number in the index rows section, with information derived from a given spectral line data container, and that specturm's location (sdfits file, ext, row) Used when a row has been rewritten in an sdfits file with a new spectra (via nsave, for example). |
function LINE_INDEX::spectrum_to_info(spectrum, index, file_name, extension, row_num) | private |
Translates information in a single spectral line data container, along with this data containers location in the sdfits file and index file, into a line in the rows section of the index file |
function LINE_INDEX::spectra_to_info(spectra, file_name, extension, start) | private |
Translates spectral line data containers directly into the rows to be written to index file. |
procedure LINE_INDEX::set_debug_on | |
Makes object verbose |
procedure LINE_INDEX::set_debug_off | |
Makes object quiet |
procedure LINE_INDEX::get_file_properties_in_index, file_name, extensions, num_rows | private |
Finds the number and sizes of extensions for a file listed in the index file, according to the index file. |
function LINE_INDEX::get_center_frequency(ref_freq, ref_chan, freq_interval, num_chan) | |
Returns the center frequency using the following equation: center_chan = (double(num_chan)/2. |
Routine Details |
line_index__define |
procedure line_index__define |
Child class of INDEX_FILE, contains special functionality for dealing with spectral line data. This mostly entails the translation of sdfits data into contents of the index file. See UML for all IO Classes, or INDEX UML for just index classes. This class is responsible for establishing the correct class for managing the row section of the index file, the translation between sdfits and index rows, translation from spectra to index rows, and provides the search gateway.
LINE_INDEX::init | private |
function LINE_INDEX::init(_EXTRA=_EXTRA) |
Class Constructor - special formats for spectral line initialized here
Keywords | |
_EXTRA |
. |
LINE_INDEX::cleanup | private |
procedure LINE_INDEX::cleanup |
Class Destructor - cleanup resources
LINE_INDEX::get_row_info_strct | private |
function LINE_INDEX::get_row_info_strct() |
Returns the specail structure needed for spectral line data
LINE_INDEX::search_index |
function LINE_INDEX::search_index([start][, finish], SEARCH=SEARCH, [INDEX=long], [PROJECT=string], [FILE=string], [EXTENSION=long], [ROW=long], [SOURCE=string], [PROCEDURE=string], [E2ESCAN=long], [SUBSCAN=long], [SCAN=long], [POLARIZATION=string], [PLNUM=long ], [IFNUM=long ], [FEED=long], [FDNUM=long], [INT=long], [NUMCHN=long], [SIG=string], [CAL=string], [SAMPLER=string], [AZIMUTH=string], [ELEVATION=string], [LONGITUDE=string], [LATITUDE=string], [LST=string], [CENTFREQ=string], [RESTFREQ=string], [VELOCITY=string], [RESOLUTION=string], [DATEOBS=string], [BANDWIDTH=double], [EXPOSURE=double], [TSYS=double], [NSAVE=long]) |
This method searches the rows in the index file using the optional keywords. Not using any keywords returns all rows. Multiple keywords are combined with a logical AND.
Parameters | |
start |
where to start the range to search in |
finish |
where to stop the range to search in |
LINE_INDEX::parse_extension_rows |
function LINE_INDEX::parse_extension_rows(rows, proj, file_name, ext, missing, virtuals, start) |
Translates raw sdfits rows into the rows to be written to the index file. This is where all the algorithms are implemented for determining if and integration numbers.
LINE_INDEX::update_file |
procedure LINE_INDEX::update_file, ext_rows, proj, file_name, ext, missing, virtuals, start_row |
Appends row info to an index file, given a group of rows from sdfits files. Used for first loading in an sdfits file
LINE_INDEX::get_if_numbers | private |
function LINE_INDEX::get_if_numbers(scan_rows, names, ints, index_start, index_end) |
Algorithm for assigning if numbers for each row in the index file (zero-based). First, only first integrations are looked at. Of these, only where the SIG column is True are used. Finally of these, unique combinations of (CRVAL1, CTYPE1, CDELT1, and CRPIX1) columns are used to compute the number of ifs in the scan. These if numbers are assigned to where those unique combinations occur, and the unassigned numbers are 'back filled' using the integration numbers as a guide.
LINE_INDEX::get_integration_numbers | private |
function LINE_INDEX::get_integration_numbers(scan_rows, names) |
Algorithm for determining integration numbers (0-based), given the sdfits rows of a scan. This is simple: just use the LST column values.
Parameters | |
scan_rows |
array of sdfits rows for just one scan |
names |
structure containing pointers to names of sdfits columns, missing columns, and keywords |
LINE_INDEX::get_feed_numbers | private |
Algorithm for determining feed numbers (0-based), given the sdfits rows of a scan.
Parameters | |
scan_rows |
array of sdfits rows for just one scan |
names |
structure containing pointers to names of sdfits columns, missing columns, and keywords |
LINE_INDEX::get_scan_info |
function LINE_INDEX::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 |
LINE_INDEX::update_with_spectra |
procedure LINE_INDEX::update_with_spectra, spectra, file_name, extension, start_row |
Appends row info to an index file, given a group of spectra. Used for when these spectra have been written to an sdifts file.
LINE_INDEX::replace_with_spectrum |
procedure LINE_INDEX::replace_with_spectrum, index, spectrum, file_name, extension, row_num |
Replaces a line specified by index number in the index rows section, with information derived from a given spectral line data container, and that specturm's location (sdfits file, ext, row) Used when a row has been rewritten in an sdfits file with a new spectra (via nsave, for example).
LINE_INDEX::spectrum_to_info | private |
function LINE_INDEX::spectrum_to_info(spectrum, index, file_name, extension, row_num) |
Translates information in a single spectral line data container, along with this data containers location in the sdfits file and index file, into a line in the rows section of the index file
LINE_INDEX::spectra_to_info | private |
function LINE_INDEX::spectra_to_info(spectra, file_name, extension, start) |
Translates spectral line data containers directly into the rows to be written to index file. No specail coding here, since an index file was used to create this data container at some point. This assumes that the spectra have been recenlty appended to the file in param file_name.
LINE_INDEX::set_debug_on |
procedure LINE_INDEX::set_debug_on |
Makes object verbose
LINE_INDEX::set_debug_off |
procedure LINE_INDEX::set_debug_off |
Makes object quiet
LINE_INDEX::get_file_properties_in_index | private |
procedure LINE_INDEX::get_file_properties_in_index, file_name, extensions, num_rows |
Finds the number and sizes of extensions for a file listed in the index file, according to the index file.
LINE_INDEX::get_center_frequency |
function LINE_INDEX::get_center_frequency(ref_freq, ref_chan, freq_interval, num_chan) |
Returns the center frequency using the following equation:
center_chan = (double(num_chan)/2.0)-0.5D center_freq = (((center_chan - double(ref_chan))*freq_interval)+ref_freq