|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io flag_file_flags_section__define.pro
INDEX_FILE_SECTION | +-flag_file_flags_section
Routine Summary 40 routines |
procedure flag_file_flags_section__define | |
FLAG_FILE_FLAGS_SECTION is an abstract class responsible for managing the flags section of a flagging file. |
procedure FLAG_FILE_FLAGS_SECTION::create_formats | |
Takes the format array and creates the variables needed for listing |
function FLAG_FILE_FLAGS_SECTION::get_param_types() | |
Accessor for the param_types member variable |
function FLAG_FILE_FLAGS_SECTION::get_deliminator() | |
Accessor for the deliminator member variable |
function FLAG_FILE_FLAGS_SECTION::get_not_applicable_symbol() | |
Accessor for the not_applicable_symbol member variable |
procedure FLAG_FILE_FLAGS_SECTION::create | |
Creates rows section, but writes no actual rows to it, just the section marker, and the format_header |
function FLAG_FILE_FLAGS_SECTION::get_all_lines([count]) | |
Convert the rows into lines and returns them |
procedure FLAG_FILE_FLAGS_SECTION::list, idstring=idstring, summary=summary | |
Prints contents of flag section. |
function FLAG_FILE_FLAGS_SECTION::get_lines_and_line_nums([status], idstring=idstring) | |
Returns the requested lines from the flag file AND their locations in the file |
function FLAG_FILE_FLAGS_SECTION::get_lines([status], [idstring=string]) | |
Retrieves lines that match idstring from the flags section. |
function FLAG_FILE_FLAGS_SECTION::has_valid_rows() | |
Returns status of pointer to flag structures |
function FLAG_FILE_FLAGS_SECTION::has_valid_index_value_rows() | |
Returns status of pointer to index value record numbers |
function FLAG_FILE_FLAGS_SECTION::get_rows([status][, indicies], [idstring=string]) | |
Returns the flag structures that match the given idstring; returns all if idstring not used. |
procedure FLAG_FILE_FLAGS_SECTION::append_lines, lines | |
Appends a new line to the flag section. |
Returns the last line number of the file, using system file_lines command. |
procedure FLAG_FILE_FLAGS_SECTION::append_rows, rows | |
Appends flagging structures to the array of structures in memory. |
procedure FLAG_FILE_FLAGS_SECTION::append_index_value_rows, rows | |
Appends index value record number(s) to the array kept in memory |
procedure FLAG_FILE_FLAGS_SECTION::set_rows, rows | |
Reset the array of flag structures kept in memory |
procedure FLAG_FILE_FLAGS_SECTION::set_index_value_rows, rows | |
Reset the array of index value record number kept in memory |
Free the memory allocated for the index value rec nums, and reallocate. |
function FLAG_FILE_FLAGS_SECTION::get_index_value_rows([status]) | |
Retrieve the index value record numbers kept in memory |
procedure FLAG_FILE_FLAGS_SECTION::reset_rows | |
Free the memory allocated for the flag structures, and reallocate. |
procedure FLAG_FILE_FLAGS_SECTION::process_line, line, index | |
Procedure to process each line. |
function FLAG_FILE_FLAGS_SECTION::read_file() | |
Loads the flag section of the flag file into memory. |
function FLAG_FILE_FLAGS_SECTION::convert_set_flag_input_scalar(input) | |
Returns the value to use for the input from a flagging command that is only allowed one value to the value it is stored as in the flag file, that is a string, or the 'not applicable' symbol if it is not set. |
function FLAG_FILE_FLAGS_SECTION::convert_set_flag_input_array(input) | |
Returns the value to use for the input from a flagging command that is allowed to be an array to the value it is stored as in the flag file, that is a string, or the 'not applicable' symbol if it is not set. |
function FLAG_FILE_FLAGS_SECTION::int2str(int) | |
Converts an integer into a string, and trims all whitespace. |
function FLAG_FILE_FLAGS_SECTION::search_flags([status], [idstring=string]) | |
Returns the indicies where flags can be found that match the passed in idstring |
function FLAG_FILE_FLAGS_SECTION::get_unique_ids([count]) | |
Returns a list of all idstrings used in flags section |
procedure FLAG_FILE_FLAGS_SECTION::list_ids | |
Prints out unique ids found in file section. |
procedure FLAG_FILE_FLAGS_SECTION::unflag_line, line_location | |
Comments out the given line number in the flag section. |
procedure FLAG_FILE_FLAGS_SECTION::unflag, idstring | |
Comments out all the lines in the flag section that contain the given idstring. |
Accessor method to member variable. |
function FLAG_FILE_FLAGS_SECTION::get_verbose_header() | |
Accessor method to member variable. |
Accessor method to member variable. |
function FLAG_FILE_FLAGS_SECTION::convert_rows(old_rows[, status]) | |
Used for converting old flag file to the current format. |
procedure FLAG_FILE_FLAGS_SECTION::write_new_rows, rows[, status] | |
Appends new flag structures to the flag seciton of flag file. |
function FLAG_FILE_FLAGS_SECTION::rows_to_lines(rows) | |
Converts flagging structures to strings, using the deliminator character. |
function FLAG_FILE_FLAGS_SECTION::check_channels([bchan][, echan][, chans][, chanwidth][, status]) | |
Converts CHANS and CHANWIDTH keywords, if used, to their equivalent use with BCHAN and ECHAN, and checks all values of BCHAN and ECHAN. |
procedure FLAG_FILE_FLAGS_SECTION::show_state | |
Routine Details |
flag_file_flags_section__define |
procedure flag_file_flags_section__define |
FLAG_FILE_FLAGS_SECTION is an abstract class responsible for managing the flags section of a flagging file. It is a child of the index_file_section class, though it is not an index file (this should be changed). The responsiblities include some of the translation of flagging info to and from the string format found in the file and structures.
FLAG_FILE_FLAGS_SECTION::create_formats |
procedure FLAG_FILE_FLAGS_SECTION::create_formats |
Takes the format array and creates the variables needed for listing
FLAG_FILE_FLAGS_SECTION::get_param_types |
function FLAG_FILE_FLAGS_SECTION::get_param_types() |
Accessor for the param_types member variable
FLAG_FILE_FLAGS_SECTION::get_deliminator |
function FLAG_FILE_FLAGS_SECTION::get_deliminator() |
Accessor for the deliminator member variable
FLAG_FILE_FLAGS_SECTION::get_not_applicable_symbol |
function FLAG_FILE_FLAGS_SECTION::get_not_applicable_symbol() |
Accessor for the not_applicable_symbol member variable
FLAG_FILE_FLAGS_SECTION::create |
procedure FLAG_FILE_FLAGS_SECTION::create |
Creates rows section, but writes no actual rows to it, just the section marker, and the format_header
FLAG_FILE_FLAGS_SECTION::get_all_lines |
function FLAG_FILE_FLAGS_SECTION::get_all_lines([count]) |
Convert the rows into lines and returns them
Parameters | |
count |
number of lines returned |
FLAG_FILE_FLAGS_SECTION::list |
procedure FLAG_FILE_FLAGS_SECTION::list, idstring=idstring, summary=summary |
Prints contents of flag section. For testing purposes only.
Keywords | |
idstring |
. |
summary |
. |
FLAG_FILE_FLAGS_SECTION::get_lines_and_line_nums |
function FLAG_FILE_FLAGS_SECTION::get_lines_and_line_nums([status], idstring=idstring) |
Returns the requested lines from the flag file AND their locations in the file
Parameters | |
status |
0 - failure, 1 - success |
Keywords | |
idstring |
. |
FLAG_FILE_FLAGS_SECTION::get_lines |
function FLAG_FILE_FLAGS_SECTION::get_lines([status], [idstring=string]) |
Retrieves lines that match idstring from the flags section. Returns all lines if idstring is not used.
Parameters | |
status |
0 - bad, 1 - good |
Keywords | |
idstring |
return only lines that match this idstring |
FLAG_FILE_FLAGS_SECTION::has_valid_rows |
function FLAG_FILE_FLAGS_SECTION::has_valid_rows() |
Returns status of pointer to flag structures
FLAG_FILE_FLAGS_SECTION::has_valid_index_value_rows |
function FLAG_FILE_FLAGS_SECTION::has_valid_index_value_rows() |
Returns status of pointer to index value record numbers
FLAG_FILE_FLAGS_SECTION::get_rows |
function FLAG_FILE_FLAGS_SECTION::get_rows([status][, indicies], [idstring=string]) |
Returns the flag structures that match the given idstring; returns all if idstring not used.
Parameters | |
status |
0 - bad, 1 - good |
indicies |
the indicies to the flags returned |
Keywords | |
idstring |
return only lines that match this idstring |
FLAG_FILE_FLAGS_SECTION::append_lines |
procedure FLAG_FILE_FLAGS_SECTION::append_lines, lines |
Appends a new line to the flag section. Also ensures that this line is converted to a flag structure that is also appended.
Parameters | |
lines |
line(s) to append to flag section |
FLAG_FILE_FLAGS_SECTION::get_current_file_length |
function FLAG_FILE_FLAGS_SECTION::get_current_file_length() |
Returns the last line number of the file, using system file_lines command.
FLAG_FILE_FLAGS_SECTION::append_rows |
procedure FLAG_FILE_FLAGS_SECTION::append_rows, rows |
Appends flagging structures to the array of structures in memory.
Parameters | |
rows |
flags to add |
FLAG_FILE_FLAGS_SECTION::append_index_value_rows |
procedure FLAG_FILE_FLAGS_SECTION::append_index_value_rows, rows |
Appends index value record number(s) to the array kept in memory
Parameters | |
rows |
index value record numbers to add |
FLAG_FILE_FLAGS_SECTION::set_rows |
procedure FLAG_FILE_FLAGS_SECTION::set_rows, rows |
Reset the array of flag structures kept in memory
Parameters | |
rows |
flags to reset |
FLAG_FILE_FLAGS_SECTION::set_index_value_rows |
procedure FLAG_FILE_FLAGS_SECTION::set_index_value_rows, rows |
Reset the array of index value record number kept in memory
Parameters | |
rows |
index value record numbers to reset |
FLAG_FILE_FLAGS_SECTION::reset_index_value_rows |
procedure FLAG_FILE_FLAGS_SECTION::reset_index_value_rows |
Free the memory allocated for the index value rec nums, and reallocate.
FLAG_FILE_FLAGS_SECTION::get_index_value_rows |
function FLAG_FILE_FLAGS_SECTION::get_index_value_rows([status]) |
Retrieve the index value record numbers kept in memory
Parameters | |
status |
0 - no rec nums, 1 - success |
FLAG_FILE_FLAGS_SECTION::reset_rows |
procedure FLAG_FILE_FLAGS_SECTION::reset_rows |
Free the memory allocated for the flag structures, and reallocate.
FLAG_FILE_FLAGS_SECTION::process_line |
procedure FLAG_FILE_FLAGS_SECTION::process_line, line, index |
Procedure to process each line. Invoked by index_file_section::read_file
Parameters | |
line |
The line to handle. |
index |
The index number for this line |
FLAG_FILE_FLAGS_SECTION::read_file |
function FLAG_FILE_FLAGS_SECTION::read_file() |
Loads the flag section of the flag file into memory. After reading the lines in the file, these lines are then converted to flag structures
FLAG_FILE_FLAGS_SECTION::convert_set_flag_input_scalar |
function FLAG_FILE_FLAGS_SECTION::convert_set_flag_input_scalar(input) |
Returns the value to use for the input from a flagging command that is only allowed one value to the value it is stored as in the flag file, that is a string, or the 'not applicable' symbol if it is not set.
Parameters | |
input |
value to be converted |
FLAG_FILE_FLAGS_SECTION::convert_set_flag_input_array |
function FLAG_FILE_FLAGS_SECTION::convert_set_flag_input_array(input) |
Returns the value to use for the input from a flagging command that is allowed to be an array to the value it is stored as in the flag file, that is a string, or the 'not applicable' symbol if it is not set.
Parameters | |
input |
value to be converted |
FLAG_FILE_FLAGS_SECTION::int2str |
function FLAG_FILE_FLAGS_SECTION::int2str(int) |
Converts an integer into a string, and trims all whitespace.
Parameters | |
int |
integer to convert |
FLAG_FILE_FLAGS_SECTION::search_flags |
function FLAG_FILE_FLAGS_SECTION::search_flags([status], [idstring=string]) |
Returns the indicies where flags can be found that match the passed in idstring
Parameters | |
status |
0 - match not found, 1 - match(es) found |
Keywords | |
idstring |
return indicies of flags that match this idstring |
FLAG_FILE_FLAGS_SECTION::get_unique_ids |
function FLAG_FILE_FLAGS_SECTION::get_unique_ids([count]) |
Returns a list of all idstrings used in flags section
Parameters | |
count |
number of unique ids returns |
FLAG_FILE_FLAGS_SECTION::list_ids |
procedure FLAG_FILE_FLAGS_SECTION::list_ids |
Prints out unique ids found in file section. For testing purposes only.
FLAG_FILE_FLAGS_SECTION::unflag_line |
procedure FLAG_FILE_FLAGS_SECTION::unflag_line, line_location |
Comments out the given line number in the flag section. Flag file lines begin with a blank space that can be replaced with a # to comment them out without changing the lenght of the line, therefore the size of the file
Parameters | |
line_location |
line number to comment out. This is relative to the entire length of the file, not the flags section alone. |
FLAG_FILE_FLAGS_SECTION::unflag |
procedure FLAG_FILE_FLAGS_SECTION::unflag, idstring |
Comments out all the lines in the flag section that contain the given idstring.
Parameters | |
idstring |
used to find what lines to comment out |
FLAG_FILE_FLAGS_SECTION::get_formatted_header |
function FLAG_FILE_FLAGS_SECTION::get_formatted_header() |
Accessor method to member variable.
FLAG_FILE_FLAGS_SECTION::get_verbose_header |
function FLAG_FILE_FLAGS_SECTION::get_verbose_header() |
Accessor method to member variable.
FLAG_FILE_FLAGS_SECTION::get_values_list_format |
function FLAG_FILE_FLAGS_SECTION::get_values_list_format() |
Accessor method to member variable.
FLAG_FILE_FLAGS_SECTION::convert_rows |
function FLAG_FILE_FLAGS_SECTION::convert_rows(old_rows[, status]) |
Used for converting old flag file to the current format.
Parameters | |
old_rows |
an array of the old flagging structures to convert |
status |
0 - failure, 1 - success |
FLAG_FILE_FLAGS_SECTION::write_new_rows |
procedure FLAG_FILE_FLAGS_SECTION::write_new_rows, rows[, status] |
Appends new flag structures to the flag seciton of flag file. Structures are first converted to strings, and then written to file.
Parameters | |
rows |
representing new flag lines |
status |
0 - failure, 1 - success |
FLAG_FILE_FLAGS_SECTION::rows_to_lines |
function FLAG_FILE_FLAGS_SECTION::rows_to_lines(rows) |
Converts flagging structures to strings, using the deliminator character.
Parameters | |
rows |
flags to convert to strings |
FLAG_FILE_FLAGS_SECTION::check_channels |
function FLAG_FILE_FLAGS_SECTION::check_channels([bchan][, echan][, chans][, chanwidth][, status]) |
Converts CHANS and CHANWIDTH keywords, if used, to their equivalent use with BCHAN and ECHAN, and checks all values of BCHAN and ECHAN. Then takes these integer arrays, and converts them to comma separated strings. BCHAN and ECHAN are mutually exclusive to CHANS and CHANWIDTH. These values should also have been checked higher up, closer to the initial flagging command.
FLAG_FILE_FLAGS_SECTION::show_state |
procedure FLAG_FILE_FLAGS_SECTION::show_state |