[Previous]
[Next]
NAME:
fcdir
PROCEDURE:
Compare ascii files
CALLING SEQUENCE:
fcdir.py dir_fc dir_base
INPUTS:
dir
dir_base
CALLS:
PROCEDURE:
> Implemented as a python script
> Files in directory 'dir' are compared with files
in directory 'dir_base' having the same base name
(file name, plus extension).
MODIFICATION HISTORY:
MAY-2002, Paul Hick (UCSD/CASS)
FEB-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added delete keyword; changed 'r' to 'br' in open
statements to allow for processing of binary files.
[Previous]
[Next]
NAME:
fd
PURPOSE:
Kinda-kludgy-but-it-works wrapper for executable fd
RESTRICTIONS:
Not been fully tested
PROCEDURE:
The script has to be sourced, rather than directly executed.
Libsd writes the proper CD command into the file $TUB/OSExitCmd.tmp
The script executes sd, checks for the existence of the temporary
file; executes the contents and deletes it.
[Previous]
[Next]
NAME:
FeatureStack.__iadd__
PURPOSE:
Overloads += operator: adds 'count' fields in specified FeatureStack object
CALLING SEQUENCE:
fstack += feature
INPUTS:
fstack FeatureStack object
feature FeatureStack object
OUTPUTS:
fstack stack object with updated 'count' fields
[Previous]
[Next]
NAME:
FeatureStack.__init__
PURPOSE:
Initialize FeatureStack object
CALLING SEQUENCE:
result = FeatureStack( stack_yaml_file )
INPUTS:
stack_yaml_file fully-qualified name of yaml file containing
the dictionary of key definitions.
Alternatively, the dict itself can be specified
as input.
OPTIONAL INPUT:
ignore list (?? unused)
OUTPUTS:
result FeatureStack object
PROCEDURE:
result.stack = {
count = <count>
category-1 = {
count = <count>
keyword-a = {
count = <count>
attr-1 = <True/False/Yes/No>
attr-2 = <True/False/Yes/No>
},
keyword-b = {
...
},
},
category-1 = {
...
},
}
[Previous]
[Next]
NAME:
FeatureStack.count_atoms
PURPOSE:
Count number of references matching specified keywords.
CALLING SEQUENCE:
keywords.count_atoms(ref_list)
INPUTS:
keywords FeatureStack object
ref_list ReferenceList object
OUTPUTS:
keywords FeatureStack object with updated 'count' fields.
[Previous]
[Next]
NAME:
FeatureStack.filter_attributes
PURPOSE:
Reduce set of keywords to those matching the specified attributes
CALLING SEQUENCE:
fstack.filter_attributes( attributes )
INPUTS:
fstack FeatureStack object
attributes string with attribute specification in the form
attr1=val1,attr2=val2
where val1,val2,... is one of true,false,yes,no
If no value is specified then 'true' is assumed.
OUTPUTS:
fstack updated FeatureStack object containing only those
keywords matching the specified attributes
REMARK:
The 'counts' fields of the input object are retained in the output
object. In most cases it will be necessary to zero the count with
the method 'erase_count'.
PROECDURE:
the attribute names must match the attributes specified as
keys in the stack:
fstack.stack = { category-1 = {
keyword-a = {
attr-1 = <True/False/Yes/No>
},
}
[Previous]
[Next]
NAME:
FeatureStack.keys
PURPOSE:
Return list of keys from stack object, omitting the key 'count'
used internally for counting entries.
CALLING SEQUENCE:
result = fstack.keys([category])
INPUTS:
fstack FeatureStack object
OUTPUTS:
result list of keys
[Previous]
[Next]
NAME:
FeatureStack.used
PURPOSE:
Get keywords from 'fstack' that are used in the specified
reference as a FeatureStack object.
CALLING SEQUENCE:
result = fstack.used(atom)
INPUTS:
fstack FeatureStack object
atom Reference object
OUTPUTS:
result FeatureStack object
The 'count' fields are set to 1 if the reference
has keyword(s) matching 'fstack', or to 0 if
there is no match.
PROCEDURE:
[Previous]
[Next]
NAME:
fill_fraction
PURPOSE:
eon helper function
CALLING SEQUENCE:
str = fill_fraction(format, cint, frac, exponent=exponent, spec=spec)
INPUTS:
format string into which to insert
contains 'spec' followed by an indication of the
required number of digits (see PROCEDURE)
cint integer part of number. This is inserted
into format using '%s', so could be an integer
or already preformatted as a string.
frac fractional part, in units of 10^-exponent,
OPTIONAL INPUTS:
exponent integer indicating length of fraction
(default is zero)
spec=spec substring of format that will be replaced by numbers
typically this is something like 'ss' or 'posix',
If not specified (same as spec='') then insertion
occurs at end of 'format'.
OUTPUTS:
format input format with spec replaced by numbers
PROCEDURE:
The desired length of the fraction is indicated by
adding the string '.dddd' or '.d#' immediately after
the subtring in spec. The number of 'd's indicate the
the number of digits in the fraction; '.d#' indicates
that 'exponent' digits should be used.