Produced by IDL 7.1.1
Developer Documentation

./toolbox/io
z_index__define.pro

INDEX_FILE
|
+-z_index

All known superclasses:
INDEX_FILE
Last modification date:
Wed Sep 28 13:27:15 2016

Child class of INDEX_FILE, contains special functionality for dealing with zpectrometer data. This mostly entails the translation of sdfits-like zpectrometer 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 zpectrometer fits and index rows, translation from zpectrometer row to index rows, and provides the search gateway.

Fields inherited from INDEX_FILE:
string  FILE_NAME
longword integer  FILE_LOADED
string  FILE_PATH
object reference  HEADER
object reference  ROWS
string  ROWS_CLASS
pointer  ROW_LINES
string  VERSION
longword integer  SPROTECT
structure [1] INFO
longword integer  DEBUG

Routine Summary  15 routines

function Z_INDEX::init(_EXTRA=_EXTRA)

Child class of INDEX_FILE, contains special functionality for dealing with zpectrometer data.

procedure Z_INDEX::cleanup

private

Class Destructor - cleanup resources

function Z_INDEX::get_row_info_strct()

private

Returns the special structure needed for zpectrometer data

function Z_INDEX::search_index([start][, finish], [SEARCH=array of longs], [INDEX=long], [PROJECT=string], [FILE=string], [EXTENSION=long], [ROW=long], [SOURCE=string], [PROCEDURE=string], [MC_SCAN=long], [SUBSCAN=long], [SCAN=long], [BEINDEX=long], [AZIMUTH=string], [ELEVATION=string], [LONGITUDE=string], [LATITUDE=string], [TIMESTAMP=string], [EXPOSURE=double], [TRCKBEAM=integer], [OBSFREQ=string], [DIODE=integer], [SUBREF=integer])

This method searches the rows in the index file using the optional keywords.

function Z_INDEX::parse_extension_rows(rows, proj, file_name, ext, missing, virtuals, start)

Translates raw sdfits-like zpectrometer rows into the rows to be written to the index file.

procedure Z_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 zpectrometer sdfits-like files.

function Z_INDEX::get_scan_info(scan_number[, file], count=variable, [/quiet])

Returns a structure or array of structures that contains info about the scan number given, such as scan number, procedure name, number of integrations, ifs, etc.

procedure Z_INDEX::update_with_spectra, zdc, file_name, extension, start_row

Appends row info to an index file, given a group of zpectrometer data containers.

procedure Z_INDEX::replace_with_spectrum, index, zdc, file_name, extension, row_num

Replaces a line specified by index number in the index rows section, with information derived from a given zpectrometer data container, and that data'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 Z_INDEX::spectrum_to_info(zdc, index, file_name, extension, row_num)

private

Translates information in a single zpectrometer 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 Z_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 Z_INDEX::set_debug_on

Makes object verbose

procedure Z_INDEX::set_debug_off

Makes object quiet

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

procedure z_index__define

private

Defines class structure

Routine Details

Z_INDEX::init

function Z_INDEX::init(_EXTRA=_EXTRA)

Child class of INDEX_FILE, contains special functionality for dealing with zpectrometer data. This mostly entails the translation of sdfits-like zpectrometer 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 zpectrometer fits and index rows, translation from zpectrometer row to index rows, and provides the search gateway.

Keywords
_EXTRA
.

Z_INDEX::cleanup private

procedure Z_INDEX::cleanup

Class Destructor - cleanup resources

Z_INDEX::get_row_info_strct private

function Z_INDEX::get_row_info_strct()

Returns the special structure needed for zpectrometer data

Returns
z_row_info_strct structure

Z_INDEX::search_index

function Z_INDEX::search_index([start][, finish], [SEARCH=array of longs], [INDEX=long], [PROJECT=string], [FILE=string], [EXTENSION=long], [ROW=long], [SOURCE=string], [PROCEDURE=string], [MC_SCAN=long], [SUBSCAN=long], [SCAN=long], [BEINDEX=long], [AZIMUTH=string], [ELEVATION=string], [LONGITUDE=string], [LATITUDE=string], [TIMESTAMP=string], [EXPOSURE=double], [TRCKBEAM=integer], [OBSFREQ=string], [DIODE=integer], [SUBREF=integer])

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.

Returns
Array of longs, each element corresponding to a line number of the index file that matches the search

Parameters
start
in, optional
long
where to start the range to search in
finish
in, optional
long
where to stop the range to search in

Keywords
SEARCH
in, optional
array of longs
The row numbers to search, often this is the result of a previous search that you wish to refine.
INDEX
in, optional
long
index (zero-based)
PROJECT
in, optional
string
project name
FILE
in, optional
string
sdfits file
EXTENSION
in, optional
long
sdfits extension number
ROW
in, optional
long
sdfits row number
SOURCE
in, optional
string
source name
PROCEDURE
in, optional
string
procecure
MC_SCAN
in, optional
long
M&C scan number
SUBSCAN
in, optional
long
Subscan number
SCAN
in, optional
long
Scan number
BEINDEX
in, optional
long
Backend index number
AZIMUTH
in, optional
string
azimuth
ELEVATION
in, optional
string
elevation
LONGITUDE
in, optional
string
longitude axis (ex:ra) value
LATITUDE
in, optional
string
latitude axis (ex:dec) value
TIMESTAMP
in, optional
string
the start of the scan
EXPOSURE
in, optional
double
exposure
TRCKBEAM
in, optional
integer
Tracking beam ID
OBSFREQ
in, optional
string
observed frequency
DIODE
in, optional
integer
Diode value
SUBREF
in, optional
integer
Subreflector state (0=moving, 1, or -1)

Z_INDEX::parse_extension_rows

function Z_INDEX::parse_extension_rows(rows, proj, file_name, ext, missing, virtuals, start)

Translates raw sdfits-like zpectrometer rows into the rows to be written to the index file.

Returns
arrays of structures representing lines to be written to index file
Uses
INDEX_FILE::get_row_info_strct INDEX_FILE::get_row_value

Parameters
rows
in
array
array of structs representing sdfits rows
proj
in
string
project id shared by all rows
file_name
in
string
file location shared by all rows
ext
in
long
extension location shared by all rows
missing
in
array
string array of columns missing from the sdfits file
virtuals
in
struct
key-value pairs from sdfits extension header (not including col descriptions)
start
in
long
row number that these rows start at 4

Z_INDEX::update_file

procedure Z_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 zpectrometer sdfits-like files. Used for first loading in a zpectrometer file

Uses
LINE_INDEX::update_index_file

Parameters
ext_rows
in
array
array of sdfits rows
proj
in
string
project shared by all rows
file_name
in
string
file location shared by all extensions
ext
in
long
extension location shared by all extensions
missing
in
array
string array of columns missing from the ext_rows param
virtuals
in
struct
keywords from extension header not describing columns
start_row
in
long
where these spectra start in the extension

Z_INDEX::get_scan_info

function Z_INDEX::get_scan_info(scan_number[, file], count=variable, [/quiet])

Returns a structure or array of structures that contains info about the scan number given, such as scan number, procedure name, number of integrations, ifs, etc.. One element in the array for each unique TIMESTAMP value for all rows having that scan number.

Returns
Array of structures containing info on scan, returns -1 on failure.

Parameters
scan_number
in
long
scan number information is queried for
file
in, optional
string
Limit the search for the scan number to a specific file name.

Keywords
count
out
variable
The number of elements of the returned array of scan_info structures.
quiet
in, optional
boolean
When set, suppress most error messages.

Z_INDEX::update_with_spectra

procedure Z_INDEX::update_with_spectra, zdc, file_name, extension, start_row

Appends row info to an index file, given a group of zpectrometer data containers. Used for when these data have been written to an sdifts file.

Uses
LINE_INDEX::spectra_to_info LINE_INDEX::update_index_file

Parameters
zdc
in
array
array of zpectrometer data containers
file_name
in
string
file location shared by all extensions
extension
in
long
extension location shared by all extensions
start_row
in
long
where these zdc start in the extension, should be the current number of rows in extension

Z_INDEX::replace_with_spectrum

procedure Z_INDEX::replace_with_spectrum, index, zdc, file_name, extension, row_num

Replaces a line specified by index number in the index rows section, with information derived from a given zpectrometer data container, and that data'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).

Uses
LINE_INDEX::spectra_to_info

Parameters
index
.
zdc
in
array
zpectrometer data container
file_name
in
string
file location where zdc was written
extension
in
long
extension location where this zdc was written
row_num
in
long
row number where this zdc was written

Z_INDEX::spectrum_to_info private

function Z_INDEX::spectrum_to_info(zdc, index, file_name, extension, row_num)

Translates information in a single zpectrometer 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

Returns
structure representing a row in the index file
Uses
INDEX_FILE::get_row_info_strct

Parameters
zdc
in
struct
zpectrometer data container
index
in
long
index number that this row will have in index file
file_name
in
string
file that this zdc is from
extension
in
long
extension that this zdc are from
row_num
in
long
the row that this zdc is from

Z_INDEX::spectra_to_info private

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

Returns
structures representing a row in the index file
Uses
INDEX_FILE::get_row_info_strct LINE_INDEX::spectrum_to_info

Parameters
spectra
in
array
array of spectrum data containers
file_name
in
string
file that these spectra are from
extension
in
long
extension that these spectra are from
start
in
long
the row at which these spectra start in their file-extension location, should be the current number of rows in extension

Z_INDEX::set_debug_on

procedure Z_INDEX::set_debug_on

Makes object verbose

Z_INDEX::set_debug_off

procedure Z_INDEX::set_debug_off

Makes object quiet

Z_INDEX::get_file_properties_in_index private

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

Parameters
file_name
in
string
file whose properties are being queried
extensions
out
variable
number of extensions for this file
num_rows
out
variable
array showing how many rows in each extension for this file

z_index__define private

procedure z_index__define

Defines class structure


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:30 2016