Produced by IDL 7.1.1
User Documentation

./toolbox/io
flag_file_flags_section__define.pro

INDEX_FILE_SECTION
|
+-flag_file_flags_section

All known superclasses:
INDEX_FILE_SECTION
Last modification date:
Wed Sep 28 13:27:11 2016

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.

function FLAG_FILE_FLAGS_SECTION::get_current_file_length()

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

procedure FLAG_FILE_FLAGS_SECTION::reset_index_value_rows

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.

function FLAG_FILE_FLAGS_SECTION::get_formatted_header()

Accessor method to member variable.

function FLAG_FILE_FLAGS_SECTION::get_verbose_header()

Accessor method to member variable.

function FLAG_FILE_FLAGS_SECTION::get_values_list_format()

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

Returns
array of lines in section, -1 if no lines

Parameters
count
out, optional
variable
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
out, optional
variable
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.

Returns
lines that match given idstring; all flag lines if idstring not used

Parameters
status
out, optional
variable
0 - bad, 1 - good

Keywords
idstring
in, optional
string
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

Returns
0 - no valid flag structrues, 1 - has valid flag structres

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

Returns
0 - not valid , 1 - valid

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.

Returns
flag structures that match idstring

Parameters
status
out, optional
variable
0 - bad, 1 - good
indicies
out, optional
variable
the indicies to the flags returned

Keywords
idstring
in, optional
string
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
in, required
string
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.

Returns
file_lines() - 1

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
in, required
flag structures
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
in, required
string
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
in, required
flag structures
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
in, required
string
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

Returns
string array of index value record numbers

Parameters
status
out, optional
variable
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
in, required
string
The line to handle.
index
in, required
integer
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

Returns
0 - failure, 1 - success

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.

Returns
string to be stored in flag file

Parameters
input
in, required
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.

Returns
string to be stored in flag file

Parameters
input
in, required
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.

Returns
string representation of integer

Parameters
int
in, required
long
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

Returns
indicies where flags match idstring; all indicies of flags when idstring not used

Parameters
status
out, optional
variable
0 - match not found, 1 - match(es) found

Keywords
idstring
in, optional
string
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

Returns
list of all unique idstrings

Parameters
count
out, optional
variable
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
in, required
long
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
in, required
string
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.

Returns
flag structures containing the same content passed in

Parameters
old_rows
in, required
flag structure
an array of the old flagging structures to convert
status
out, optional
variable
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
in, required
flag structures
representing new flag lines
status
out, optional
variable
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
in, required
flag structures
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.

Returns
string array, where first element is bchan, second echan values for line in flag file

Parameters
bchan
in, optional
long
channel(s) to start flagging
echan
in, optional
long
channel(s) to stop flagging
chans
in, optional
long
channel(s) to flag
chanwidth
in, optional
long
buffer width for CHANS keyword (default=1)
status
out, optional
variable
0 - param values not valid, 1 - success

FLAG_FILE_FLAGS_SECTION::show_state

procedure FLAG_FILE_FLAGS_SECTION::show_state


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