|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io io_sdfits__define.pro
IO | +-io_sdfits
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 70 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[, status], 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[, status], /new_index, index_name=index_name, max_nrows=max_nrows | |
This method is the main interface to the sdfits io classes. |
procedure IO_SDFITS::load_index_flag_info | |
For every sdfits file managed by the current index file, the flags object is updated with info from these files. |
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::create_index_for_fits_obj, index_file_name, fits_obj, status | |
Every sdfits file that is read in must have an index file. |
procedure IO_SDFITS::update_flags_with_fits_file, fits_obj | |
For every sdfits file managed by the current index file, the flags object must be able to convert the record numbers in the current index file to record numbers stored in each flag file. |
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], /verbose, [/user], [columns=string array], [file=string], _EXTRA=_EXTRA | |
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[, file], count=variable, [/quiet]) | |
Returns an array of structures 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 |
function IO_SDFITS::get_expected_full_index_name(fits_obj) | |
Given a fits file name of form '/path/filename. |
function IO_SDFITS::update_index_with_other_index(index_name) | |
Instead of adding rows to an index file by reading in an sdfits file, this method attempts to take advantage of a pre-existing index files info. |
function IO_SDFITS::get_index_name_from_fits_name(fits_name) | |
Takes a file named *. |
procedure IO_SDFITS::set_flag, scan, _EXTRA=_EXTRA | |
Sets a flagging rule for a given scan(s) along with other options according to the current flagging version. |
procedure IO_SDFITS::set_flag_rec, recnum, _EXTRA=_EXTRA | |
Sets a flagging rule for a given record number(s) along with other options according to the current flagging version. |
function IO_SDFITS::get_scans_in_index(scans[, count], [quiet=bool]) | |
Given a set of scan numbers, returns which scans can currently be found in the index file. |
function IO_SDFITS::get_recnums_in_index(recnums[, count], [quiet=bool]) | |
Given a set of record numbers, returns which records can currently be found in the index file. |
function IO_SDFITS::get_flag_file_names([count], [recnum=long], [scan=long]) | |
When certain spectra are being flagged, which flag files need to be used? This can be determined by finding in which fits file the record and scan numbers being flagged reside. |
procedure IO_SDFITS::list_flags, _EXTRA=_EXTRA | |
For printing flag files' contents |
procedure IO_SDFITS::list_flag_ids | |
Prints all unique IDSTRINGS in flag files |
function IO_SDFITS::get_flag_lines([count], _EXTRA=_EXTRA) | |
Returns contents of all flag files idstring keyword allows retrieving only specific IDSTRINGs |
procedure IO_SDFITS::unflag, id, [/all], /quiet | |
Removes the flag(s) associated with the id passed in. |
function IO_SDFITS::find_exact_matches(search_arr, values[, total_count]) | |
Finds where multiple values occur in an array. |
function IO_SDFITS::find_flagged_data(dcs, flag[, count]) | |
For a given flag structure, determines which of the given data containers' this flag applies to. |
function IO_SDFITS::find_flagged_data_field(data_field, flag_strct, flag_field_name, result) | |
Looks for matches between a given array of values, and a field in a given flagging structure. |
procedure IO_SDFITS::flag_data, dcs, flag | |
Once it has been determined which flags apply to which data containers, this method actually blanks the data containers data, using the bchan and echan fields. |
function IO_SDFITS::IS_SCAN_FLAGGED(scan, [idstring=idstring]) | |
Find if the specific scan has been flagged at all. |
function IO_SDFITS::get_columns(columns, [_EXTRA=structure]) | |
Get the named columns as a set of vectors in a structure from the associated data file(s) using any supplied selection criteria. |
function IO_SDFITS::find_flagged_index_data(indicies, recnum_string[, count]) | |
For finding what data containers have been flagged via record number. |
procedure IO_SDFITS::set_flag_file_version, version_num, version_class | |
For testing purposes only. |
function IO_SDFITS::validate_param_value_type(value, type, name, [quiet=bool]) | |
Checks a given value against a given type |
function IO_SDFITS::validate_param_value_types(value, types, name, [quiet=bool]) | |
Checks to make sure that the given value is one of the given types. |
function IO_SDFITS::validate_param_list_types(values_strct, param_types, _EXTRA=_EXTRA) | |
Generic method used for checking keywords used in both flagging commands and index searches. |
function IO_SDFITS::get_param_index(param_names, param_name[, count]) | |
Looks for a keyword passed in for such methods as index searches or or flag commands in the list of valid names. |
function IO_SDFITS::check_param_syntax(param_name, value, _EXTRA=_EXTRA) | |
function IO_SDFITS::get_single_param_types(param_name) | |
function IO_SDFITS::get_index_param_types() | |
All the index file columns can be searched against, using keyword arguments. |
function IO_SDFITS::get_flag_param_types() | |
Most of the keywords used in a flagging command match against the columns found in a flag file. |
function IO_SDFITS::check_flag_param_syntax(_EXTRA=_EXTRA, [quiet=bool]) | |
Checks the parameters used in a flagging command Checks for validity of both type and range syntax. |
function IO_SDFITS::check_search_param_syntax(_EXTRA=_EXTRA, [quiet=bool]) | |
Checks the parameters used for a search, be it for a list command, or get_* method. |
function IO_SDFITS::validate_string_value(value, types, quiet=quiet) | |
Used to check the validaty of values passed into keywords used with index and flagging commands. |
function IO_SDFITS::validate_integer_range(value) | |
Sometimes keywords that take integers can be passed in a string representing a a range of integers. |
function IO_SDFITS::validate_float_range(value) | |
Sometimes keywords that take floats can be passed in a string representing a float to a certain perscion, or a range of floats. |
function IO_SDFITS::validate_string_range(values) | |
For some keywords, strings can be used with wildcards either at the begining or end of the string. |
function IO_SDFITS::get_last_record() | |
Retrieves the last record, or index number to be retrieved from a get_* method |
function IO_SDFITS::get_flags_obj() | |
Get access to the associated flags object |
procedure IO_SDFITS::flags_show_state | |
Debugging function to explore the FLAG state |
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.
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 |
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.
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->set_project, path
Parameters | |
dir |
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[, status], 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).
io = obj_new('io_sdfits_cntm') io->set_file, 'TREG_04_01.dcr.raw.fits'
Parameters | |
file_name |
The file name of the sdfits file (no path) |
status |
1 - success, 0 - failure |
Keywords | |
file_path |
Where to find the sdfits file |
index_name |
What to call the new index file |
online |
. |
_EXTRA |
. |
IO_SDFITS::add_file |
procedure IO_SDFITS::add_file, file_name[, status], /new_index, index_name=index_name, max_nrows=max_nrows |
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.
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 |
Name of sdfits file to add (no path) |
status |
1 - success, 0 - failure |
Keywords | |
new_index |
Forces the creation of a new index file (overwrites pre-existing index) |
index_name |
. |
max_nrows |
. |
IO_SDFITS::load_index_flag_info |
procedure IO_SDFITS::load_index_flag_info |
For every sdfits file managed by the current index file, the flags object is updated with info from these files.
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.
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 |
Index file name (no path) |
Keywords | |
file_path |
Where to find index file and sdfits files |
IO_SDFITS::create_index_for_fits_obj |
procedure IO_SDFITS::create_index_for_fits_obj, index_file_name, fits_obj, status |
Every sdfits file that is read in must have an index file. Even if multiple sdfits files are managed by a single index file, this master index file gets its info from the individual index files. This method creates an index file for the given fits object.
Parameters | |
index_file_name |
. |
fits_obj |
. |
status |
. |
IO_SDFITS::update_flags_with_fits_file |
procedure IO_SDFITS::update_flags_with_fits_file, fits_obj |
For every sdfits file managed by the current index file, the flags object must be able to convert the record numbers in the current index file to record numbers stored in each flag file.
Parameters | |
fits_obj |
object representing an sdfits file referred to in the current index. |
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
path = '/users/me/my_project' io = obj_new('io_sdfits_line') io->set_file_path, path
Parameters | |
file_path |
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
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.
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.
Keywords | |
full |
wether to return the full path name of the index file or not |
IO_SDFITS::list |
procedure IO_SDFITS::list[, start][, finish], [sortcol=string], /verbose, [/user], [columns=string array], [file=string], _EXTRA=_EXTRA |
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 |
where to start the range to list |
finish |
where to stop the range to list |
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
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_scan_info |
function IO_SDFITS::get_scan_info(scan_number[, file], count=variable, [/quiet]) |
Returns an array of structures that contains info about the scan number given, such as scan number, procedure name, number of integrations, ifs, etc.. A separate element is returned for each unique TIMESTAMP and file for all rows having that scan number.
Parameters | |
scan_number |
scan number information is queried for |
file |
Limit the search for the scan number to a specific file name. |
Keywords | |
count |
The number of elements of the returned array of structures. |
quiet |
When set, suppress most error messages. |
IO_SDFITS::list_index_header |
procedure IO_SDFITS::list_index_header |
Prints out the header section of the index file used by this object
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
Parameters | |
column_name |
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
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
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
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
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
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)
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 |
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
IO_SDFITS::sort_search_results |
Given an integer array representing some rows in the index, sorts this array by a given column name in the index file
Parameters | |
results |
integer array representing some rows in the index file |
column |
must be uniquely identify a column in the index file |
IO_SDFITS::get_expected_full_index_name |
function IO_SDFITS::get_expected_full_index_name(fits_obj) |
Given a fits file name of form '/path/filename.fits', returns the expected name of its index: '/path/filename.index'
Parameters | |
fits_obj |
fits object for fits file |
IO_SDFITS::update_index_with_other_index |
function IO_SDFITS::update_index_with_other_index(index_name) |
Instead of adding rows to an index file by reading in an sdfits file, this method attempts to take advantage of a pre-existing index files info.
Parameters | |
index_name |
full path name to index file to read |
IO_SDFITS::get_index_name_from_fits_name |
function IO_SDFITS::get_index_name_from_fits_name(fits_name) |
Takes a file named *.fits and returns a string equal to *.index
Parameters | |
fits_name |
fits file name |
IO_SDFITS::set_flag |
Sets a flagging rule for a given scan(s) along with other options according to the current flagging version. With the current version, the flagging options include: intnum, fdnum, plnum, ifnum, bchan, echan, and idstring.
Parameters | |
scan |
scan or scans to be flagged. |
Keywords | |
_EXTRA |
. |
IO_SDFITS::set_flag_rec |
Sets a flagging rule for a given record number(s) along with other options according to the current flagging version. With the current version, the flagging options include: bchan, echan, and idstring.
Parameters | |
recnum |
recnum or recnums to be flagged. |
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_scans_in_index |
function IO_SDFITS::get_scans_in_index(scans[, count], [quiet=bool]) |
Given a set of scan numbers, returns which scans can currently be found in the index file.
Parameters | |
scans |
scan num(s) to search for |
count |
the num of scans found in index |
Keywords | |
quiet |
inform the user when scan is missing? |
IO_SDFITS::get_recnums_in_index |
function IO_SDFITS::get_recnums_in_index(recnums[, count], [quiet=bool]) |
Given a set of record numbers, returns which records can currently be found in the index file.
Parameters | |
recnums |
record num(s) to search for |
count |
the num of records found in index |
Keywords | |
quiet |
inform the user when rec is missing? |
IO_SDFITS::get_flag_file_names |
function IO_SDFITS::get_flag_file_names([count], [recnum=long], [scan=long]) |
When certain spectra are being flagged, which flag files need to be used? This can be determined by finding in which fits file the record and scan numbers being flagged reside.
Parameters | |
count |
number of flag files found |
Keywords | |
recnum |
record number(s) to look for |
scan |
scan number(s) to look for |
IO_SDFITS::list_flags |
procedure IO_SDFITS::list_flags, _EXTRA=_EXTRA |
For printing flag files' contents
Keywords | |
_EXTRA |
. |
IO_SDFITS::list_flag_ids |
procedure IO_SDFITS::list_flag_ids |
Prints all unique IDSTRINGS in flag files
IO_SDFITS::get_flag_lines |
Returns contents of all flag files idstring keyword allows retrieving only specific IDSTRINGs
Parameters | |
count |
number of lines returned |
Keywords | |
_EXTRA |
. |
IO_SDFITS::unflag |
Removes the flag(s) associated with the id passed in. If the id passe in is a string, then this is an IDSTRING, and whatever flags using this IDSTRING are removed. If id passed in is an integer, then this is a unique ID, and only one flag is removed.
Parameters | |
id |
ID or IDSTRING of flag to remove. |
Keywords | |
all |
When set, unflag all IDs. |
quiet |
When set, suppress the warning message when the requested ID was not found. Any value of ID is ignored. |
IO_SDFITS::find_exact_matches |
function IO_SDFITS::find_exact_matches(search_arr, values[, total_count]) |
Finds where multiple values occur in an array.
IO_SDFITS::find_flagged_data |
For a given flag structure, determines which of the given data containers' this flag applies to. This is done by checking the flags contents against the data containers' scan_number, integration, polarization_num, feed_num, and if_number fields.
IO_SDFITS::find_flagged_data_field |
function IO_SDFITS::find_flagged_data_field(data_field, flag_strct, flag_field_name, result) |
Looks for matches between a given array of values, and a field in a given flagging structure. The flag structure holds strings, which magy need to be converted to integer arrays before the search can be done.
IO_SDFITS::flag_data |
Once it has been determined which flags apply to which data containers, this method actually blanks the data containers data, using the bchan and echan fields.
Parameters | |
dcs |
array of data contianers to be flagged by single flag |
flag |
structure representing a line in a flag file |
IO_SDFITS::IS_SCAN_FLAGGED |
function IO_SDFITS::IS_SCAN_FLAGGED(scan, [idstring=idstring]) |
Find if the specific scan has been flagged at all.
Parameters | |
scan |
Scan number to check. |
Keywords | |
idstring |
If given, only find if the scan has been flagged with that idstring. |
IO_SDFITS::get_columns |
function IO_SDFITS::get_columns(columns, [_EXTRA=structure]) |
Get the named columns as a set of vectors in a structure from the associated data file(s) using any supplied selection criteria.
Keywords | |
_EXTRA |
see search_for_row_info for more info |
IO_SDFITS::find_flagged_index_data |
function IO_SDFITS::find_flagged_index_data(indicies, recnum_string[, count]) |
For finding what data containers have been flagged via record number. Finds matches between a given array of index record numbers, and a string containing a compressed list of index numbers.
IO_SDFITS::set_flag_file_version |
procedure IO_SDFITS::set_flag_file_version, version_num, version_class |
For testing purposes only. Allows overriding of flag format to use
Parameters | |
version_num |
. |
version_class |
. |
IO_SDFITS::validate_param_value_type |
function IO_SDFITS::validate_param_value_type(value, type, name, [quiet=bool]) |
Checks a given value against a given type
Parameters | |
value |
value to be checked |
type |
type |
name |
name of the keyword being checked. |
Keywords | |
quiet |
quiet on errors? |
IO_SDFITS::validate_param_value_types |
function IO_SDFITS::validate_param_value_types(value, types, name, [quiet=bool]) |
Checks to make sure that the given value is one of the given types. If its a string, it also makes sure that is is in the correct form. This is used to make sure that keywords for index searches and flagging commands are correctly used.
Parameters | |
value |
value to be checked |
types |
comma separated types |
name |
name of the keyword being checked. |
Keywords | |
quiet |
quiet on errors? |
IO_SDFITS::validate_param_list_types |
function IO_SDFITS::validate_param_list_types(values_strct, param_types, _EXTRA=_EXTRA) |
Generic method used for checking keywords used in both flagging commands and index searches. The names and types for each keyword are stored in the 2-D string arrays in the flag and index objects. These arrays are passed in to this method, along with the keywords used (passed in as a structure). In this method, for each keyword used, first the keyword is checked if it's name is valid, and then its type and range syntax is checked.
Parameters | |
values_strct |
keywords passed in via inheritance |
param_types |
contains param names and their types |
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_param_index |
function IO_SDFITS::get_param_index(param_names, param_name[, count]) |
Looks for a keyword passed in for such methods as index searches or or flag commands in the list of valid names. A keyword shortened to it's most unambigious abbreviation is valid.
Parameters | |
param_names |
list of valid names |
param_name |
parameter name, may be abbreviated |
count |
number of times name is found |
IO_SDFITS::check_param_syntax |
function IO_SDFITS::check_param_syntax(param_name, value, _EXTRA=_EXTRA) |
Parameters | |
param_name |
. |
value |
. |
Keywords | |
_EXTRA |
. |
IO_SDFITS::get_single_param_types |
function IO_SDFITS::get_single_param_types(param_name) |
Parameters | |
param_name |
. |
IO_SDFITS::get_index_param_types |
function IO_SDFITS::get_index_param_types() |
All the index file columns can be searched against, using keyword arguments. The types of each column are stored in memory in the index object, which this method retrieves. This way, the keywords used in a search can be checked
IO_SDFITS::get_flag_param_types |
function IO_SDFITS::get_flag_param_types() |
Most of the keywords used in a flagging command match against the columns found in a flag file. These columns, along with the CHANS and CHANWIDTH columns have their names and types stored in a 2-D string array in the flag object. This method retrieves this info so that the keywords used with a flagging command can be checked for valid type and range syntax before the command progresses.
IO_SDFITS::check_flag_param_syntax |
function IO_SDFITS::check_flag_param_syntax(_EXTRA=_EXTRA, [quiet=bool]) |
Checks the parameters used in a flagging command Checks for validity of both type and range syntax. First the param types for a flagging commmand are found, which are stored as a 2-D array in the flag object, and then these values are used to check against the search parameters actually used. _EXTRA=ex refers to all keywords valid in a flagging command.
Keywords | |
_EXTRA |
. |
quiet |
wether or not to be quiet on errors |
IO_SDFITS::check_search_param_syntax |
function IO_SDFITS::check_search_param_syntax(_EXTRA=_EXTRA, [quiet=bool]) |
Checks the parameters used for a search, be it for a list command, or get_* method. Checks for validity of both type and range syntax. First the param types for an index file search are found, which are stored as a 2-D array in the index object, and then these values are used to check against the search parameters actually used. _EXTRA=ex refers to all keywords valid for a search.
Keywords | |
_EXTRA |
. |
quiet |
wether or not to be quiet on errors |
IO_SDFITS::validate_string_value |
function IO_SDFITS::validate_string_value(value, types, quiet=quiet) |
Used to check the validaty of values passed into keywords used with index and flagging commands. Integer and float ranges can sometimes be passed in with string values, and strings themselves sometimes can use wildcards.
Parameters | |
value |
value to be validated |
types |
comma separated types |
Keywords | |
quiet |
. |
IO_SDFITS::validate_integer_range |
function IO_SDFITS::validate_integer_range(value) |
Sometimes keywords that take integers can be passed in a string representing a a range of integers. This checks that the value passed in conforms to the correct syntax.
Parameters | |
value |
value to be checked |
IO_SDFITS::validate_float_range |
function IO_SDFITS::validate_float_range(value) |
Sometimes keywords that take floats can be passed in a string representing a float to a certain perscion, or a range of floats. This checks that the value passed in conforms to the correct syntax.
Parameters | |
value |
value to be checked |
IO_SDFITS::validate_string_range |
function IO_SDFITS::validate_string_range(values) |
For some keywords, strings can be used with wildcards either at the begining or end of the string. This makes sure that the passed in string conforms to this syntax
Parameters | |
values |
values to be checked |
IO_SDFITS::get_last_record |
function IO_SDFITS::get_last_record() |
Retrieves the last record, or index number to be retrieved from a get_* method
IO_SDFITS::get_flags_obj |
function IO_SDFITS::get_flags_obj() |
Get access to the associated flags object
IO_SDFITS::flags_show_state |
procedure IO_SDFITS::flags_show_state |
Debugging function to explore the FLAG state