newtimedev,newfreqdev = writeRFlagThresholdFile(rflag_thresholds, rflagpars['timedev'], rflagpars['freqdev'], rflagid)
from collections import deque,defaultdict
from collections import OrderedDict
from casatasks import casalog, flagdata
from casatools import table,quanta,ms,agentflagger
from .parallel.parallel_task_helper import ParallelTaskHelper
A set of helper functions for the tasks flagdata and flagcmd.
Class Parser: to parse flag commands
save_rflag_consolidated_files
parseRflagOutputFromSummary
def get_task_arg_default( func, arg ):
spec = inspect.getfullargspec(func.__call__)
raise Exception("cannot find '%s' among the function arguments" % arg)
return spec.defaults[spec.args.index(arg)-1]
''' Parser for input files.
primarydivider --> first split the string by this character
secondarydivider --> next split the string by this character
The constructor takes two separators.
It first splits the string by the 'primarydivider'. It
then loops through each entry after the first split and
verifies if the 'secondarydivider' is in the string. If yes,
the string is added to a list. If not, it removes the
whitespace of the initial split, by bringing back two
strings together. This will allow the primarydivider to be
part of the string itself. Last thing, it returns an ordered
dictionary using the imported class OrderedDict.
def __init__(self,primarydivider,secondarydivider):
self.prime = primarydivider
self.second = secondarydivider
def parse2Dictionary(self,string):
res = self.initialsplit(string)
if self.second not in entry: