Source
xxxxxxxxxx
raise ValueError( 'Error: paramactive vector must have exactly three entries' )
from __future__ import absolute_import
import os
import numpy as np
from casatasks.private.casa_transition import is_CASA6
if is_CASA6:
from .callibrary import *
from casatools import calibrater
from casatasks import casalog
else:
from callibrary import *
from taskinit import *
calibrater = cbtool
def fringefit(vis=None,caltable=None,
field=None,spw=None,intent=None,
selectdata=None,timerange=None,uvrange=None,
antenna=None,scan=None,
observation=None, msselect=None,
solint=None,combine=None,refant=None,
minsnr=None,zerorates=None,globalsolve=None,niter=None,
delaywindow=None,ratewindow=None,append=None,
corrdepflags=None,
corrcomb=None,
docallib=None,callib=None,gaintable=None,gainfield=None,interp=None,spwmap=None,
paramactive=None,
concatspws=None,
parang=None):
#Python script
casalog.origin('fringefit')
#
try:
mycb = calibrater()
if ((type(vis)==str) & (os.path.exists(vis))):
mycb.open(filename=vis,compress=False,addcorr=False,addmodel=False)
else:
raise ValueError('Visibility data set not found - please verify the name')
# Do data selection according to selectdata
if (selectdata):
casalog.post("Selecting data")
# pass all data selection parameters in as specified
mycb.selectvis(time=timerange,spw=spw, scan=scan, field=field,
intent=intent, observation=str(observation),
baseline=antenna,uvrange=uvrange,chanmode='none',
msselect=msselect)
else:
# selectdata=F, so time,scan,baseline,msselect=''
# using spw and field specifications only
mycb.selectvis(time='',spw=spw,scan='',field=field,intent=intent,
observation='', baseline='',
chanmode='none', msselect='')
# signal use of correlation-dependent flags, if requested
if corrdepflags:
mycb.setcorrdepflags(True)
# Arrange applies....