def setupRflag(self, devpar): '''cast rflag's list parameters from numpy types to Python types devpar --> list of numeric parameters or list of list such as timedev or freqdev''' nt = copy.deepcopy(devpar) for i in range(len(nt)): if (isinstance(nt[i],list)): nnt = nt[i] for j in range(len(nnt)): elem = fh.evaluateNumpyType(nnt[j]) # write the casted element back devpar[i][j] = elem
def setupRflag(self, devpar): '''cast rflag's list parameters from numpy types to Python types devpar --> list of numeric parameters or list of list such as timedev or freqdev''' nt = copy.deepcopy(devpar) for i in range(len(nt)): if (isinstance(nt[i], list)): nnt = nt[i] for j in range(len(nnt)): elem = fh.evaluateNumpyType(nnt[j]) # write the casted element back devpar[i][j] = elem
if combinespws: casalog.post('Combine spws %s into new output spw'%spw) config['combinespws'] = True # Only parse chanaverage if chanbin is valid if chanaverage and isinstance(chanbin, int) and chanbin <= 1: raise Exception, 'Parameter chanbin must be > 1 to do channel averaging' # Validate the case of int or list chanbin if chanaverage and pdh.validateChanBin(): casalog.post('Parse channel averaging parameters') config['chanaverage'] = True # convert numpy types, until CAS-6493 is not fixed chanbin = fh.evaluateNumpyType(chanbin) config['chanbin'] = chanbin if hanning: casalog.post('Apply Hanning smoothing') config['hanning'] = True if regridms: casalog.post('Parse regridding parameters') config['regridms'] = True # Reset the defaults depending on the mode # Only add non-empty string parameters to config dictionary start, width = pdh.defaultRegridParams() config['mode'] = mode config['nchan'] = nchan if start != '':