Produced by IDL 7.1.1
User Documentation

./toolbox/io
flags__define.pro

Last modification date:
Wed Sep 28 13:27:11 2016

Routine Summary  70 routines

procedure flags__define

FLAGS is the class which handles all flags used by an io_sdfits object.

function FLAGS::init(file_path=file_path, debug=debug)

Class constructor where pointers are initialized and flag parameter types are defined.

procedure FLAGS::cleanup

Class destructor where pointers and objects are freed.

procedure FLAGS::set_flag, fits_filename, scan, [_EXTRA=keywords]

One of two main methods for setting flags.

procedure FLAGS::set_flag_rec, fits_filename, index_recnum, [_EXTRA=keywords]

One of two main methods for setting flags.

function FLAGS::int_array_to_string_list(int_array)

Converts an array of integers to a comma spearated string

procedure FLAGS::unflag, id[, status], [/all], [/quiet]

Removes a line in a flag file via either its dynamic ID or its IDSTRING.

procedure FLAGS::unflag_id, id[, status], [/quiet]

Removes a line in a flag file given the flags integer ID.

procedure FLAGS::unflag_idstring, idstring[, status], [/quiet]

Removes line(s) in a flag file given the flags IDSTRING.

procedure FLAGS::set_flag_ids

To be called after flags are added or removed.

function FLAGS::has_valid_flag_ids()

Checks to make sure that the flag ids pointer is valid.

function FLAGS::get_flag_id(flag_filename, linenum)

Given a flag filename and a line number in this flag file, returns the current uniqe ID for this line.

function FLAGS::get_flag_location(flag_id[, status])

Given a unique integer flag ID, returns this ID's location - a location being the flag file and the line number in said file.

function FLAGS::get_all_ids([count])

Get a vector of all of the ID integers currently known.

procedure FLAGS::set_file_path, file_path

Sets the file path for this object and all managed flag files.

function FLAGS::get_param_types()

Returns the types of each parameter for the flag file columns.

function FLAGS::get_filename_minus_ext(filename)

Simple function for returning a filename without its extension

function FLAGS::fits_filename_to_index_filename(fits_filename)

Converts a *.

function FLAGS::fits_filename_to_flag_filename(fits_filename)

Converts a *.

function FLAGS::index_filename_to_flag_filename(index_filename)

Converts a *.

function FLAGS::get_flag_file_obj(flag_filename)

Given the full path name to a flag file, returns a flag file object responsible for managing this file.

procedure FLAGS::load_flag_file, flag_filename

Reads in a flag file into memory.

procedure FLAGS::check_flag_file_for_fits_file, fits_filename

For a given fits filename, make sure that if there is a flag file for it, it has been read by a flag file object, and all IDs are up to date.

procedure FLAGS::calculate_index_value_recnums, flag_filename

To be called whenever a flag file is loaded, or all flags are reset, due to an unflag command.

procedure FLAGS::add_flag_filename, flag_filename

Add a flag filename to the list of flag files currently begin managed.

procedure FLAGS::add_file_index_base, file_index_base

Adds a file index base to the list of these values.

procedure FLAGS::add_index_file_info, index_filename, index_base

Adds the flag file name and index base to this class's list of these variables.

function FLAGS::get_file_index_base(flag_filename)

Searches the files member variable for a match with given flag filename, and uses this index to return the value of record number for first spectrum in a multi-sdfits file index file.

function FLAGS::index_recnum_to_flag_recnum(index_recnum, flag_filename)

Retrieves the value of record number for first spectrum in a multi-sdfits file index file, and subtracts this from the given index number.

function FLAGS::flag_recnum_to_index_recnum(flag_recnum, flag_filename)

Retrieves the value of record number for first spectrum in a multi-sdfits file index file, and adds this to the given record number from the given flag file.

procedure FLAGS::list, [idstring=string], [/summary]

Prints out flag lines in all flag files, either nearly as the appear in the flag file, or in a special format.

procedure FLAGS::list_verbose, [idstring=string]

Prints the contents of all flag files, nearly in the format they appear in the flag files.

function FLAGS::replace_deliminators_in_lines(lines, replacement)

Replaces all delminators that appear in the given strings with the given replacement character.

function FLAGS::get_index_value_lines_with_id([count], [idstring=string])

Returns lines from flag flag files, with record numbers corresponding to their values in the current index file, along with their unique ID numbers prepended to the begining of each line.

function FLAGS::get_index_value_lines([count], [idstring=string])

Retrieve lines from flag flag files, with record numbers corresponding to their values in the current index file This is used for listing in verbose mode.

function FLAGS::convert_flag_lines_to_index_lines(lines, deliminator, flag_filename)

Given lines from a flag file, returns the same lines, but with the record numbers adjusted to reflect the same spectra in the current index file.

function FLAGS::has_valid_files()

Checks status of flag file pointer

function FLAGS::get_values_list_format([status])

The format for listing flag file contents in summary mode is stored in a flag file object.

function FLAGS::get_formatted_header([status])

The format for listing flag file headers in summary mode is stored in a flag file object.

function FLAGS::get_verbose_header([status])

The header used when listing flag file headers in verbose mode is stored in a flag file object.

function FLAGS::get_deliminator([status])

Returns the character used for separating values in flag files.

function FLAGS::find_file_with_flags()

Looks for a flag file object that manages a valid flag file.

procedure FLAGS::list_formatted, [idstring=string]

Prints contents of flag files in a formatted version.

function FLAGS::get_summary_line(line_strct, line_format)

Given a structure that represents a line form the flag file (with record number already adjusted), copy this structure to a line that is ready for printing in summary format.

function FLAGS::get_flag_strcts([count][, index_recnums], [_EXTRA=strct])

Returns structures representing desired lines from flag files.

function FLAGS::get_index_value_rows(count, ids, [_EXTRA=strct])

Now only used when printing in list summary format.

function FLAGS::get_all_flag_ids([count])

Returns all the flag IDs, which should just be 0.

function FLAGS::get_number_of_flag_ids()

Simply returns the number of flag ID's.

function FLAGS::get_flag_ids_used(idstrings[, count])

Returns the unique integer IDs that match flag lines that contain the given IDSTRINGs.

function FLAGS::get_all_index_value_rows([count])

Returns structures representing all lines in all flag files, with the record number field adjusted to reflect the correct value in the current index file.

function FLAGS::convert_flag_rows_to_index_rows(rows, flag_filename)

Adjusts the record number field in the given structures to match the record number value used in the current index file.

function FLAGS::flag_recnum_string_to_index_recnum_string(flag_recnum_string, flag_filename)

Converts the string found in flag file lines that represent flagged record numbers.

function FLAGS::get_unique_ids([count])

Should change this to get_unique_idstrings.

procedure FLAGS::list_ids

Should change this to list_unique_idstrings Takes the lines returned from get_unique_ids, and prints them

procedure FLAGS::update_flags, fits_name, base_index

If a flag file already exists for the given fits file, this flag file is loaded.

function FLAGS::is_flag_file_loaded(file_name)

Is the given flag file name currently loaded in memory?

function FLAGS::get_full_file_name(file_name)

Given a filename, return it full path name, taking into account all possible pertabations.

function FLAGS::get_int_array_from_flag_string(flag_string, count)

Certain values in flag files integer ranges stored as a string.

procedure FLAGS::set_debug_on

Makes object verbose

procedure FLAGS::set_debug_off

Makes object quiet

procedure FLAGS::set_flag_files_debug, debug

Sets debug flag for all flag file objects

procedure FLAGS::set_flag_file_version, version_num, version_class

For testing purposes only.

function FLAGS::are_all_flags_on([useflag=boolean, string array], [skipflag=boolean, string array])

Checks keywords to see if all flags are to be used.

function FLAGS::are_all_flags_off([useflag=boolean, string array], [skipflag=boolean, string array])

Checks keywords to see if all flags are to be skipped.

function FLAGS::get_flag_idstrings_used([count], [useflag=boolean, string array], [skipflag=boolean, string array])

Returns the idstrings of all flag lines that match the criteria of the given keywords.

function FLAGS::get_index_value_recnums([status])

Returns an array for all the record numbers in all the flag files, with their values given with respect to the current index file.

function FLAGS::get_num_flags()

Returns the sum of all the flags in all flag files

function FLAGS::get_all_row_strcts([count])

Method for returning structures that represent all the flags in all the flag files.

function FLAGS::check_channels_range(_EXTRA=_EXTRA)

Uses keyword inheritance to intercept the channel keywords and test them for valid usage.

procedure FLAGS::show_state

Routine Details

flags__define

procedure flags__define

FLAGS is the class which handles all flags used by an io_sdfits object. It is composed of an array of FLAG_FILE objects for managing separate flag files. It is also responsible for converting record number between their values for a particular sdfits file, and that for a single index file used with multiple sdfits files. See UML fro all IO Classes.

FLAGS::init

function FLAGS::init(file_path=file_path, debug=debug)

Class constructor where pointers are initialized and flag parameter types are defined.

Keywords
file_path
.
debug
.

FLAGS::cleanup

procedure FLAGS::cleanup

Class destructor where pointers and objects are freed.

FLAGS::set_flag

procedure FLAGS::set_flag, fits_filename, scan, [_EXTRA=keywords]

One of two main methods for setting flags. This sets a flag rule according to observational parameters, such as scan number, integration number, feed, polarization, and IF numbers. The channels to flag can also be set, along with an idstring for identification. The fits filename parameter is used to retrieve the flag file object responsible for this file, which does the flagging. Flag IDs are reset after this operation.

Parameters
fits_filename
in, required
string
the full path name to the fits file that contains the scan to be flagged
scan
in, required
long
scan number

Keywords
_EXTRA
in, optional
keywords
includes keywords intnum, fdnum, plnum, ifnum, bchan, echan, idstring.

FLAGS::set_flag_rec

procedure FLAGS::set_flag_rec, fits_filename, index_recnum, [_EXTRA=keywords]

One of two main methods for setting flags. This sets a flag rule according to index parameters, specifically the record number. The channels to flag can also be set, along with an idstring for identification. The fits filename parameter is used to retrieve the flag file object responsible for this file, which does the flagging. Flag IDs are reset after this operation.

Parameters
fits_filename
in, required
string
the full path name to the fits file that contains the scan to be flagged
index_recnum
in, required
long
record number to flag

Keywords
_EXTRA
in, optional
keywords
includes keywords bchan, echan, idstring.

FLAGS::int_array_to_string_list

function FLAGS::int_array_to_string_list(int_array)

Converts an array of integers to a comma spearated string

Returns
string containing comma separated elements of array

Parameters
int_array
in, required
long
integer array

FLAGS::unflag

procedure FLAGS::unflag, id[, status], [/all], [/quiet]

Removes a line in a flag file via either its dynamic ID or its IDSTRING.

Parameters
id
in, required
long,string
id can be an integer ID or string IDSTRING
status
out, optional
variable
0 - failure, 1 - success

Keywords
all
in, optional
boolean
When set, all IDs are unflagged and any id argument is ignored.
quiet
in, optional
boolean
When set, suppress the warning messages when a specific id is used but not found.

FLAGS::unflag_id

procedure FLAGS::unflag_id, id[, status], [/quiet]

Removes a line in a flag file given the flags integer ID. Flag IDs are reassigned at the end of this operation.

Parameters
id
in, required
long
ID of line to remove
status
out, optional
variable
0 - failure, 1 - success unflagged.

Keywords
quiet
in, optional
boolean
When set, suppress the warning message when id was not found.

FLAGS::unflag_idstring

procedure FLAGS::unflag_idstring, idstring[, status], [/quiet]

Removes line(s) in a flag file given the flags IDSTRING. Flag IDs are reassigned at the end of this operation.

Parameters
idstring
in, required
string
IDSTRING of line(s) to remove
status
out, optional
variable
0 - failure, 1 - success

Keywords
quiet
in, optional
boolean
When set, suppress the warning message when id was not found.

FLAGS::set_flag_ids

procedure FLAGS::set_flag_ids

To be called after flags are added or removed. Assigns unique integer IDs to each line in all flag files. These IDs are dynamic and only stored in memory.

FLAGS::has_valid_flag_ids

function FLAGS::has_valid_flag_ids()

Checks to make sure that the flag ids pointer is valid. Use this before trying to use this pointer.

Returns
1 - valid flag ids, 0 - no valid flag ids

FLAGS::get_flag_id

function FLAGS::get_flag_id(flag_filename, linenum)

Given a flag filename and a line number in this flag file, returns the current uniqe ID for this line. This method accesses the flag id pointer, which points to an array that maps unique IDs to there locations in flag files.

Returns
the unique integer ID for this line in the flag file.

Parameters
flag_filename
in, required
string
full path name to a flag file
linenum
in, required
long
line number in the flag file

FLAGS::get_flag_location

function FLAGS::get_flag_location(flag_id[, status])

Given a unique integer flag ID, returns this ID's location - a location being the flag file and the line number in said file. This method accesses the flag id pointer, which points to an array that maps unique IDs to their locations in flag files.

Returns
2 element string array containing file name and line number

Parameters
flag_id
in, required
long
unique integer flag ID
status
out, optional
variable
1 - success, 0 - failure

FLAGS::get_all_ids

function FLAGS::get_all_ids([count])

Get a vector of all of the ID integers currently known. Returns, -1 and sets count to 0 if there is nothing flagged.

Returns
array of all ID integers known, -1 if none known.

Parameters
count
out, optional
variable
The total count, returns 0 if there are none.

FLAGS::set_file_path

procedure FLAGS::set_file_path, file_path

Sets the file path for this object and all managed flag files.

Parameters
file_path
in, required
string
path used for all flag files.

FLAGS::get_param_types

function FLAGS::get_param_types()

Returns the types of each parameter for the flag file columns. Another words, the scan column takes an integer value, idstring takes a string value, etc.

Returns
string array

FLAGS::get_filename_minus_ext

function FLAGS::get_filename_minus_ext(filename)

Simple function for returning a filename without its extension

Returns
filename without extension

Parameters
filename
in, required
string
filename with extension

FLAGS::fits_filename_to_index_filename

function FLAGS::fits_filename_to_index_filename(fits_filename)

Converts a *.fits filename to a *.index filename. In this case, just the extension is changed.

Returns
index filename

Parameters
fits_filename
in, required
string
fits filename

FLAGS::fits_filename_to_flag_filename

function FLAGS::fits_filename_to_flag_filename(fits_filename)

Converts a *.fits filename to a *.flag filename. In this case, just the extension is changed.

Returns
flag filename

Parameters
fits_filename
in, required
string
fits filename

FLAGS::index_filename_to_flag_filename

function FLAGS::index_filename_to_flag_filename(index_filename)

Converts a *.index filename to a *.flag filename. In this case, just the extension is changed.

Returns
flag filename

Parameters
index_filename
in, required
string
index filename

FLAGS::get_flag_file_obj

function FLAGS::get_flag_file_obj(flag_filename)

Given the full path name to a flag file, returns a flag file object responsible for managing this file. If the flag file object has already been created, this object will be returned, or it will be created and returned.

Returns
flag file object

Parameters
flag_filename
in, required
string
full path to flag file

FLAGS::load_flag_file

procedure FLAGS::load_flag_file, flag_filename

Reads in a flag file into memory. This consists of using/creating a flag file object for the file, using this object to read the file, and then assigning unique IDs to all the flags managed by this class.

Parameters
flag_filename
in, required
string
full path to flag file

FLAGS::check_flag_file_for_fits_file

procedure FLAGS::check_flag_file_for_fits_file, fits_filename

For a given fits filename, make sure that if there is a flag file for it, it has been read by a flag file object, and all IDs are up to date.

Parameters
fits_filename
in, required
string
full path to flag file

FLAGS::calculate_index_value_recnums

procedure FLAGS::calculate_index_value_recnums, flag_filename

To be called whenever a flag file is loaded, or all flags are reset, due to an unflag command. Takes the record numbers in the flag file, and converts them to their new values relative to the current index (remember that this is a no-op if there is only one sdfits file). These values are stored in each respective flag file object.

Parameters
flag_filename
in, required
string
name of the flag file

FLAGS::add_flag_filename

procedure FLAGS::add_flag_filename, flag_filename

Add a flag filename to the list of flag files currently begin managed.

Parameters
flag_filename
in, required
string
full path to flag file

FLAGS::add_file_index_base

procedure FLAGS::add_file_index_base, file_index_base

Adds a file index base to the list of these values. The file index base values are used for converting a spectrum's index, or record number for in a single index file (an index file for one sdfits file), to its record number in an index file that manages several fits file. This is used in converting record numbers from their values recorded in the flag file to their corresponding values for the current index file, which may differ if the index file manages multiple fits files.

Parameters
file_index_base
in, required
long
value of record number for first spectrum in a multi-sdfits file index file.

FLAGS::add_index_file_info

procedure FLAGS::add_index_file_info, index_filename, index_base

Adds the flag file name and index base to this class's list of these variables. The index filename is converted to the flag filename simply by changing the extension. This is used in converting record numbers from their values recorded in the flag file to their corresponding values for the current index file, which may differ if the index file manages multiple fits files.

Parameters
index_filename
in, required
string
full path to index file
index_base
in, required
long
value of record number for first spectrum in a multi-sdfits file index file.

FLAGS::get_file_index_base

function FLAGS::get_file_index_base(flag_filename)

Searches the files member variable for a match with given flag filename, and uses this index to return the value of record number for first spectrum in a multi-sdfits file index file. This is used in converting record numbers from their values recorded in the flag file to their corresponding values for the current index file, which may differ if the index file manages multiple fits files. The returned index base will be zero for the special case of one sdfits file per index file, or for the first fits file in a multiple fits file index file.

Returns
value of record number for first spectrum in a multi-sdfits file index file.

Parameters
flag_filename
in, required
string
full path to flag file

FLAGS::index_recnum_to_flag_recnum

function FLAGS::index_recnum_to_flag_recnum(index_recnum, flag_filename)

Retrieves the value of record number for first spectrum in a multi-sdfits file index file, and subtracts this from the given index number. This is used in converting record numbers from their values recorded in the flag file to their corresponding values for the current index file, which may differ if the index file manages multiple fits files.

Returns
the record number found in the fits files index file corresponding to the same spectrum referenced by index_recnum

Parameters
index_recnum
in, required
long
the record number found in the current index file.
flag_filename
in, required
string
full path to flag file

FLAGS::flag_recnum_to_index_recnum

function FLAGS::flag_recnum_to_index_recnum(flag_recnum, flag_filename)

Retrieves the value of record number for first spectrum in a multi-sdfits file index file, and adds this to the given record number from the given flag file. This is used in converting record numbers from their values recorded in the flag file to their corresponding values for the current index file, which may differ if the index file manages multiple fits files.

Returns
the record number found in the current index file

Parameters
flag_recnum
in, required
long
the record number found in the flag file.
flag_filename
in, required
string
full path to flag file

FLAGS::list

procedure FLAGS::list, [idstring=string], [/summary]

Prints out flag lines in all flag files, either nearly as the appear in the flag file, or in a special format.

Keywords
idstring
in, optional
string
list only flag lines that match this idstring
summary
in, optional
boolean
if set, print in summary format, if not, print in verbose mode.

FLAGS::list_verbose

procedure FLAGS::list_verbose, [idstring=string]

Prints the contents of all flag files, nearly in the format they appear in the flag files. The Unique IDs are prepended to each line, and the delminators are converted to white space.

Keywords
idstring
in, optional
string
list only flag lines that match this idstring

FLAGS::replace_deliminators_in_lines

function FLAGS::replace_deliminators_in_lines(lines, replacement)

Replaces all delminators that appear in the given strings with the given replacement character.

Returns
the given lines with the deliminators replaced by replacement param.

Parameters
lines
in, required
string array
lines to adjust
replacement
in, required
string array
character used to replace deliminators

FLAGS::get_index_value_lines_with_id

function FLAGS::get_index_value_lines_with_id([count], [idstring=string])

Returns lines from flag flag files, with record numbers corresponding to their values in the current index file, along with their unique ID numbers prepended to the begining of each line. This is used for listing in verbose mode.

Returns
string array ready for use in listing in verbose mode

Parameters
count
out, optional
variable
the number of lines returned

Keywords
idstring
in, optional
string
get only flag lines that match this idstring

FLAGS::get_index_value_lines

function FLAGS::get_index_value_lines([count], [idstring=string])

Retrieve lines from flag flag files, with record numbers corresponding to their values in the current index file This is used for listing in verbose mode.

Returns
string array corresponding to lines in flag files, with record number adjusted.

Parameters
count
out, optional
variable
the number of lines returned

Keywords
idstring
in, optional
string
get only flag lines that match this idstring

FLAGS::convert_flag_lines_to_index_lines

function FLAGS::convert_flag_lines_to_index_lines(lines, deliminator, flag_filename)

Given lines from a flag file, returns the same lines, but with the record numbers adjusted to reflect the same spectra in the current index file. Remember that if the current index file manages multiple sdfits files, the record numbers in the flag files must be adjusted.

Returns
the same lines passed in, but with their record number adjusted.

Parameters
lines
in, required
string array
lines from a flag file
deliminator
in, required
string
character used to deliminate values in a flag file
flag_filename
in, required
string
full path to flag file

FLAGS::has_valid_files

function FLAGS::has_valid_files()

Checks status of flag file pointer

Returns
1 - valid files, 0 - no valid flag files

FLAGS::get_values_list_format

function FLAGS::get_values_list_format([status])

The format for listing flag file contents in summary mode is stored in a flag file object. This method finds and flag file object, and retrieves that format.

Returns
The format for listing flag file contents in summary mode

Parameters
status
out, optional
variable
0 - failure, 1 - success

FLAGS::get_formatted_header

function FLAGS::get_formatted_header([status])

The format for listing flag file headers in summary mode is stored in a flag file object. This method finds and flag file object, and retrieves that format.

Returns
The format for listing flag file headers in summary mode

Parameters
status
out, optional
variable
0 - failure, 1 - success

FLAGS::get_verbose_header

function FLAGS::get_verbose_header([status])

The header used when listing flag file headers in verbose mode is stored in a flag file object. This method finds and flag file object, and retrieves that header.

Returns
The header used when listing flag file headers in verbose mode

Parameters
status
out, optional
variable
0 - failure, 1 - success

FLAGS::get_deliminator

function FLAGS::get_deliminator([status])

Returns the character used for separating values in flag files. Foramt info for flag files are stored in flag file objects. One of these objects must be retrieved first to get format info.

Returns
The character used for separating values in flag files.

Parameters
status
out, optional
variable
0 - failure, 1 - success

FLAGS::find_file_with_flags

function FLAGS::find_file_with_flags()

Looks for a flag file object that manages a valid flag file.

Returns
the index to the flag file object, or -1 if none found.

FLAGS::list_formatted

procedure FLAGS::list_formatted, [idstring=string]

Prints contents of flag files in a formatted version. Columns have fixed width, and if values are wider then this width a symbol is used to denote the truncation of these values.

Keywords
idstring
in, optional
string
prints only flag lines that match this idstring

FLAGS::get_summary_line

function FLAGS::get_summary_line(line_strct, line_format)

Given a structure that represents a line form the flag file (with record number already adjusted), copy this structure to a line that is ready for printing in summary format. This involves going through each structure field and turncating its value to the length specified in the given format.

Returns
string ready to print as a line in summary format

Parameters
line_strct
in, required
strct
represents a line form the flag file (with record number already adjusted)
line_format
in, required
string
string that would print out this structure if used with format keyword

FLAGS::get_flag_strcts

function FLAGS::get_flag_strcts([count][, index_recnums], [_EXTRA=strct])

Returns structures representing desired lines from flag files. The desired lines are determined by the optional useflag and skipflag keywords.

Returns
structures representing desired lines from flag files

Parameters
count
out, optional
variable
number of structures returned
index_recnums
out, optional
variable
the value of the structures' returned record numbers when converted to be relative to the current index file.

Keywords
_EXTRA
in, optional
strct
useflag and skipflag kewords

FLAGS::get_index_value_rows

function FLAGS::get_index_value_rows(count, ids, [_EXTRA=strct])

Now only used when printing in list summary format. This should eventually be deprecated so that get_flag_strcts is used (its much faster). Returns structures representing desired lines from flag files, with record numbers adjusted to their values in the current index file. The desired lines are determined by the optional useflag and skipflag keywords.

Returns
structures representing desired lines from flag files, with record numbers adjusted

Parameters
count
.
ids
.

Keywords
_EXTRA
in, optional
strct
useflag and skipflag kewords

FLAGS::get_all_flag_ids

function FLAGS::get_all_flag_ids([count])

Returns all the flag IDs, which should just be 0..N, N==number of flag lines.

Returns
array of integer IDs

Parameters
count
out, optional
variable
number of IDs returned

FLAGS::get_number_of_flag_ids

function FLAGS::get_number_of_flag_ids()

Simply returns the number of flag ID's. This should be equal to the number of all flag lines.

Returns
number of flag IDs

FLAGS::get_flag_ids_used

function FLAGS::get_flag_ids_used(idstrings[, count])

Returns the unique integer IDs that match flag lines that contain the given IDSTRINGs.

Returns
the unique integer IDs used by IDSTRINGs.

Parameters
idstrings
in, required
string array
array of IDSTRINGs.
count
out, optional
variable
number of IDs returned

FLAGS::get_all_index_value_rows

function FLAGS::get_all_index_value_rows([count])

Returns structures representing all lines in all flag files, with the record number field adjusted to reflect the correct value in the current index file. Remember that if the current index file manages multiple sdfits files, the record numbers in the flag files must be adjusted.

Returns
array of structures representing all lines in all flag files

Parameters
count
out, optional
variable
number of structures returned

FLAGS::convert_flag_rows_to_index_rows

function FLAGS::convert_flag_rows_to_index_rows(rows, flag_filename)

Adjusts the record number field in the given structures to match the record number value used in the current index file. Remember that if the current index file manages multiple sdfits files, the record numbers in the flag files must be adjusted.

Returns
the given rows, with their record number field adjusted

Parameters
rows
in, required
strct array
array of structures representing lines in flag files
flag_filename
in, required
string
filename of the flag file where these rows came from

FLAGS::flag_recnum_string_to_index_recnum_string

function FLAGS::flag_recnum_string_to_index_recnum_string(flag_recnum_string, flag_filename)

Converts the string found in flag file lines that represent flagged record numbers. This string may represent a range of record numbers, compressed using a certain syntax. After decompression, the integer values this string represents then must be adjusted to reflect the same spectra in the current index file. Remember that if the current index file manages multiple sdfits files, the record numbers in the flag files must be adjusted.

Returns
string identical to passed string, except the values have been adjusted for the current index file.

Parameters
flag_recnum_string
.
flag_filename
in, required
string
filename of the flag file where the given string came from

FLAGS::get_unique_ids

function FLAGS::get_unique_ids([count])

Should change this to get_unique_idstrings. Collects all idstrings from all flag files, and returns the sorted, unique idstrings.

Returns
unique idstrings found in all flag files

Parameters
count
out, optional
variable
number of structures returned

FLAGS::list_ids

procedure FLAGS::list_ids

Should change this to list_unique_idstrings Takes the lines returned from get_unique_ids, and prints them

FLAGS::update_flags

procedure FLAGS::update_flags, fits_name, base_index

If a flag file already exists for the given fits file, this flag file is loaded. Also stores information so that record numbers between the index file and flag file can be adjusted. Remember that if the current index file manages multiple sdfits files, the record numbers in the flag files must be adjusted.

Parameters
fits_name
in, required
string
filename of the fits file
base_index
in, required
long
where in the current index file the first spectrum of this fits file appears

FLAGS::is_flag_file_loaded

function FLAGS::is_flag_file_loaded(file_name)

Is the given flag file name currently loaded in memory?

Returns
0 - not loaded; 1 - is loaded

Parameters
file_name
in, required
string
filename of the flag file

FLAGS::get_full_file_name

function FLAGS::get_full_file_name(file_name)

Given a filename, return it full path name, taking into account all possible pertabations.

Returns
full path to the given filename

Parameters
file_name
in, required
string
filename

FLAGS::get_int_array_from_flag_string

function FLAGS::get_int_array_from_flag_string(flag_string, count)

Certain values in flag files integer ranges stored as a string. This string may use a special syntax for effectively compressing ranges of integers. This method takes the string value from part of a line in a flag file, and converts it into an integer array by decompressing the string.

Returns
integer array

Parameters
flag_string
in, required
string
string representing integer range using a special syntax
count
.

FLAGS::set_debug_on

procedure FLAGS::set_debug_on

Makes object verbose

FLAGS::set_debug_off

procedure FLAGS::set_debug_off

Makes object quiet

FLAGS::set_flag_files_debug

procedure FLAGS::set_flag_files_debug, debug

Sets debug flag for all flag file objects

Parameters
debug
in, required
long
0 - set debug off, 1 - set debug on

FLAGS::set_flag_file_version

procedure FLAGS::set_flag_file_version, version_num, version_class

For testing purposes only. Sets the flag file format version and class that flag files are to use.

Parameters
version_num
in, required
string
format version for flag files
version_class
in, required
string
class to be used to read in rows sections of flag files

FLAGS::are_all_flags_on

function FLAGS::are_all_flags_on([useflag=boolean, string array], [skipflag=boolean, string array])

Checks keywords to see if all flags are to be used. Useflag keyword takes precedence. If none are set, use all flags.

Returns
0 - not all flags are used, 1 - all flags are used.

Keywords
useflag
in, optional
boolean, string array
if set to 1, then all flags are used; if set to a string array, then only those idstrings included are used.
skipflag
in, optional
boolean, string array
if set to 1, then all flags are skipped; if set to a string array, then only those idstrings included are skipped.

FLAGS::are_all_flags_off

function FLAGS::are_all_flags_off([useflag=boolean, string array], [skipflag=boolean, string array])

Checks keywords to see if all flags are to be skipped. Useflag keyword takes precedence. If none are set, use all flags.

Returns
0 - some flags are used, 1 - all flags are off.

Keywords
useflag
in, optional
boolean, string array
if set to 1, then all flags are used; if set to a string array, then only those idstrings included are used.
skipflag
in, optional
boolean, string array
if set to 1, then all flags are skipped; if set to a string array, then only those idstrings included are skipped.

FLAGS::get_flag_idstrings_used

function FLAGS::get_flag_idstrings_used([count], [useflag=boolean, string array], [skipflag=boolean, string array])

Returns the idstrings of all flag lines that match the criteria of the given keywords.

Parameters
count
out, optional
variable
number of idstrings returned

Keywords
useflag
in, optional
boolean, string array
if set to 1, then all flags are used; if set to a string array, then only those idstrings included are used.
skipflag
in, optional
boolean, string array
if set to 1, then all flags are skipped; if set to a string array, then only those idstrings included are skipped.

FLAGS::get_index_value_recnums

function FLAGS::get_index_value_recnums([status])

Returns an array for all the record numbers in all the flag files, with their values given with respect to the current index file.

Parameters
status
out, optional
variable
0 - failure, 1 - success

FLAGS::get_num_flags

function FLAGS::get_num_flags()

Returns the sum of all the flags in all flag files

Returns
the sum of all the flags in all flag files

FLAGS::get_all_row_strcts

function FLAGS::get_all_row_strcts([count])

Method for returning structures that represent all the flags in all the flag files.

Returns
structures that represent all the flags in all flag files, -1 if none

Parameters
count
out, optional
variable
.

FLAGS::check_channels_range

function FLAGS::check_channels_range(_EXTRA=_EXTRA)

Uses keyword inheritance to intercept the channel keywords and test them for valid usage. Relevant keywords are : bchan, echan, chans, chanwidth bchan and echan are exclusive to chans and chanwidth. If bchan or echan are greater then one, then they must have the same length. chanwidth will default to 1.

Returns
0 - keywords not valid, 1 - keywords valid

Keywords
_EXTRA
.

FLAGS::show_state

procedure FLAGS::show_state


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