Source
newtimedev,newfreqdev = writeRFlagThresholdFile(rflag_thresholds, rflagpars['timedev'], rflagpars['freqdev'], rflagid)
import os
import time
import ast
import copy
import numpy
import inspect
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
###some helper tools
tblocal = table()
mslocal = ms()
qalocal = quanta()
'''
A set of helper functions for the tasks flagdata and flagcmd.
Class Parser: to parse flag commands
I/O functions:
get_flag_cmd_list
readFile
readFiles
readAndParse
parseDictionary
parseXML
readAntennaList
writeAntennaList
writeFlagCommands
writeRflagThresholdFile
Parameter handling
compressSelectionList
evalParams
selectReason
parseSelectionPars
parseUnion
purgeEmptyPars
purgeParameter
parseAgents
Others
backupFlags
convertDictToString
convertStringToDict
extractAntennaInfo
save_rflag_consolidated_files
parseRflagOutputFromSummary
'''
debug = False
def get_task_arg_default( func, arg ):
print(arg)
spec = inspect.getfullargspec(func.__call__)
if arg not in spec.args:
raise Exception("cannot find '%s' among the function arguments" % arg)