Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/private/task_rerefant.py: 42%

12 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-10-31 19:53 +0000

1import os 

2 

3from casatasks import casalog 

4from casatools import calibrater 

5_cb = calibrater() 

6 

7def rerefant(vis,tablein,caltable,refantmode,refant): 

8 """ Smooth calibration solution(s) derived from one or more sources: 

9 

10 Keyword arguments: 

11 vis -- Name of input visibility file (MS) 

12 default: none; example: vis='ngc5921.ms' 

13 tablein -- Input calibration table (any type) 

14 default: none; example: tablein='ngc5921.gcal' 

15 caltable -- Output calibration table (re-refant-ed) 

16 default: none 

17 refantmode -- Reference antenna application mode (TBD) 

18 refant -- Reference antenna name(s) 

19 """ 

20 

21 #Python script 

22 try: 

23 casalog.origin('rerefant') 

24 if ((type(vis)==str) & (os.path.exists(vis))): 

25 _cb.open(filename=vis,compress=False,addcorr=False,addmodel=False) 

26 

27 else: 

28 raise Exception('Visibility data set not found - please verify the name') 

29 

30 _cb.rerefant(tablein=tablein,tableout=caltable,refantmode=refantmode,refant=refant); 

31 

32 finally: 

33 _cb.close() 

34