Build: #160 was successful
Job: Build and Package RHEL6 was successful
Build log
The build generated 2,128 lines of output.The output is too long and has been truncated to the last 1,000 lines. Download or view full build log.
08-Oct-2019 18:56:20 | adding 'casatasks/private/imtools.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/mstools.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/partitionhelper.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/predictcomp_helper.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/sdbeamutil.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/sdutil.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/setjy_helper.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/simutil.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/solar_system_setjy.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_accor.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_accum.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_applycal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_asdmsummary.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_bandpass.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_blcal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_calstat.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_clearcal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_clearstat.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_concat.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_conjugatevis.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_cvel.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_cvel2.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_delmod.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_exportasdm.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_exportfits.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_exportuvfits.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_feather.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_fixplanets.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_fixvis.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_flagcmd.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_flagdata.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_flagmanager.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_fluxscale.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_fringefit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_ft.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_gaincal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_gencal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_hanningsmooth.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imcollapse.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imcontsub.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imdev.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imfit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imhead.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imhistory.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_immath.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_immoments.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_impbcor.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importasap.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importasdm.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importatca.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importfits.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importfitsidi.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importgmrt.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importmiriad.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importnro.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importuvfits.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_importvla.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_impv.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imrebin.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imreframe.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imregrid.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imsmooth.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imstat.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imsubimage.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imtrans.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_imval.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_initweights.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listcal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listfits.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listhistory.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listobs.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listpartition.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listsdm.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_listvis.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_logging.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_makemask.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_mstransform.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_partition.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_plotants.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_plotbandpass.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_plotweather.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_polcal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_polfromgain.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_predictcomp.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_rerefant.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_rmfit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_rmtables.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdbaseline.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdcal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdfit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdfixscan.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdgaincal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdimaging.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_sdsmooth.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_setjy.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_simalma.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_simanalyze.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_simobserve.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_slsearch.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_smoothcal.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_specfit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_specflux.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_specsmooth.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_splattotable.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_split.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_spxfit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_statwt.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_tclean.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_uvcontsub.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_uvmodelfit.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_uvsub.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_virtualconcat.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_vishead.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_visstat.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/task_widebandpbcor.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/update_spw.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/userconfig.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/vishead_util.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/__init__.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/imager_base.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/imager_parallel_continuum.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/imager_parallel_cube.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/imager_parallel_deconvolver.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/input_parameters.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/imagerhelpers/parallel_imager_helper.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/parallel/__init__.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/parallel/parallel_data_helper.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/parallel/parallel_task_helper.py' |
08-Oct-2019 18:56:20 | adding 'casatasks/private/parallel/rflag_post_proc.py' |
08-Oct-2019 18:56:20 | adding 'casatasks-2019.161.dist-info/METADATA' |
08-Oct-2019 18:56:20 | adding 'casatasks-2019.161.dist-info/WHEEL' |
08-Oct-2019 18:56:20 | adding 'casatasks-2019.161.dist-info/top_level.txt' |
08-Oct-2019 18:56:20 | adding 'casatasks-2019.161.dist-info/RECORD' |
08-Oct-2019 18:56:20 | removing build/bdist.linux-x86_64/wheel |
08-Oct-2019 18:56:21 | Cloning into 'casatasks'... |
08-Oct-2019 18:56:30 | Cloning into 'casa-build-utils'... |
08-Oct-2019 18:56:31 | diff --git a/casa-source b/casa-source |
08-Oct-2019 18:56:31 | index 3df3f2e..2c2e462 160000 |
08-Oct-2019 18:56:31 | --- a/casa-source |
08-Oct-2019 18:56:31 | +++ b/casa-source |
08-Oct-2019 18:56:31 | @@ -1 +1 @@ |
08-Oct-2019 18:56:31 | -Subproject commit 3df3f2e2ab02aa1faecdd09660273668c3e6a01f |
08-Oct-2019 18:56:31 | +Subproject commit 2c2e462472b2aa6eb0d6bf81c3b5086da7698e86 |
08-Oct-2019 18:56:31 | diff --git a/src/modules/imagerhelpers/imager_parallel_cube.py b/src/modules/imagerhelpers/imager_parallel_cube.py |
08-Oct-2019 18:56:31 | index 1944a59..2fd5099 100644 |
08-Oct-2019 18:56:31 | --- a/src/modules/imagerhelpers/imager_parallel_cube.py |
08-Oct-2019 18:56:31 | +++ b/src/modules/imagerhelpers/imager_parallel_cube.py |
08-Oct-2019 18:56:31 | @@ -17,6 +17,7 @@ if is_CASA6: |
08-Oct-2019 18:56:31 | from .parallel_imager_helper import PyParallelImagerHelper |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | from taskinit import * |
08-Oct-2019 18:56:31 | + from casac import casac |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | from imagerhelpers.imager_base import PySynthesisImager |
08-Oct-2019 18:56:31 | from imagerhelpers.parallel_imager_helper import PyParallelImagerHelper |
08-Oct-2019 18:56:31 | @@ -362,8 +363,11 @@ class PyParallelCubeSynthesisImager(): |
08-Oct-2019 18:56:31 | except: |
08-Oct-2019 18:56:31 | casalog.post("Cleaning up the existing file named "+fullconcatimname,"DEBUG") |
08-Oct-2019 18:56:31 | os.remove(fullconcatimname) |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | - # Remember to set tempclose=false to avoid a long accessing issue |
08-Oct-2019 18:56:31 | + # set tempclose = false to avoid a long accessing issue |
08-Oct-2019 18:56:31 | + #cmd = 'imageconcat inimages='+subimliststr+' outimage='+"'"+fullconcatimname+"'"+' type='+type+' tempclose=false' |
08-Oct-2019 18:56:31 | + #ret=os.system(cmd) |
08-Oct-2019 18:56:31 | + #if ret!=0: |
08-Oct-2019 18:56:31 | + # casalog.post("concatenation of "+concatimname+" failed","WARN") |
08-Oct-2019 18:56:31 | iatool=imageanalysis() |
08-Oct-2019 18:56:31 | concattool = iatool.imageconcat(outfile=fullconcatimname, mode=type, infiles=subimliststr.strip("'"), axis=-1, tempclose=False, overwrite=True) |
08-Oct-2019 18:56:31 | if(len(concattool.shape())==0): |
08-Oct-2019 18:56:31 | @@ -371,7 +375,6 @@ class PyParallelCubeSynthesisImager(): |
08-Oct-2019 18:56:31 | concattool.done() |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | def getSummary(self): |
08-Oct-2019 18:56:31 | joblist=[] |
08-Oct-2019 18:56:31 | #for node in self.listOfNodes: |
08-Oct-2019 18:56:31 | diff --git a/src/tasks/task_accor.py b/src/tasks/task_accor.py |
08-Oct-2019 18:56:31 | index 3f4254b..c8cded3 100644 |
08-Oct-2019 18:56:31 | --- a/src/tasks/task_accor.py |
08-Oct-2019 18:56:31 | +++ b/src/tasks/task_accor.py |
08-Oct-2019 18:56:31 | @@ -12,7 +12,7 @@ else: |
08-Oct-2019 18:56:31 | from callibrary import * |
08-Oct-2019 18:56:31 | from taskinit import * |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - calibrator = cbtool |
08-Oct-2019 18:56:31 | + calibrater = cbtool |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | def accor(vis=None,caltable=None, |
08-Oct-2019 18:56:31 | field=None,spw=None,intent=None, |
08-Oct-2019 18:56:31 | diff --git a/src/tasks/task_conjugatevis.py b/src/tasks/task_conjugatevis.py |
08-Oct-2019 18:56:31 | index e86eb32..999e649 100644 |
08-Oct-2019 18:56:31 | --- a/src/tasks/task_conjugatevis.py |
08-Oct-2019 18:56:31 | +++ b/src/tasks/task_conjugatevis.py |
08-Oct-2019 18:56:31 | @@ -59,8 +59,8 @@ def conjugatevis(vis,spwlist=[],outputvis="",overwrite=False): |
08-Oct-2019 18:56:31 | except: |
08-Oct-2019 18:56:31 | raise Exception('Error reading DATA_DESCRIPTION table') |
08-Oct-2019 18:56:31 | #endif |
08-Oct-2019 18:56:31 | - outname = 'conjugatedvis_'+vis |
08-Oct-2019 18:56:31 | - if not outputvis=="": |
08-Oct-2019 18:56:31 | + outname = 'conjugated_'+vis |
08-Oct-2019 18:56:31 | + if not (outputvis==""): |
08-Oct-2019 18:56:31 | if((type(outputvis)!=str) or (len(outputvis.split()) < 1)): |
08-Oct-2019 18:56:31 | raise Exception('parameter outputvis is invalid') |
08-Oct-2019 18:56:31 | outname = outputvis |
08-Oct-2019 18:56:31 | @@ -70,7 +70,7 @@ def conjugatevis(vis,spwlist=[],outputvis="",overwrite=False): |
08-Oct-2019 18:56:31 | os.system('cp -R '+vis+' '+outname) |
08-Oct-2019 18:56:31 | _tb.open(outname, nomodify=False) |
08-Oct-2019 18:56:31 | if _tb.iswritable(): |
08-Oct-2019 18:56:31 | - if(spwlist==None): |
08-Oct-2019 18:56:31 | + if(spwlist==[]): |
08-Oct-2019 18:56:31 | for colname in [ 'DATA', 'CORRECTED_DATA', 'FLOAT_DATA' ]: |
08-Oct-2019 18:56:31 | if colname in _tb.colnames(): |
08-Oct-2019 18:56:31 | casalog.post('Conjugating '+str(colname), 'INFO') |
08-Oct-2019 18:56:31 | @@ -103,7 +103,7 @@ def conjugatevis(vis,spwlist=[],outputvis="",overwrite=False): |
08-Oct-2019 18:56:31 | param_vals = [vars[p] for p in param_names] |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | param_vals = [eval(p) for p in param_names] |
08-Oct-2019 18:56:31 | - write_history(mstool(), outputvis, 'conjugatevis', param_names, |
08-Oct-2019 18:56:31 | + write_history(mstool(), outname, 'conjugatevis', param_names, |
08-Oct-2019 18:56:31 | param_vals, casalog) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | except Exception as instance: |
08-Oct-2019 18:56:31 | diff --git a/src/tasks/task_plotbandpass.py b/src/tasks/task_plotbandpass.py |
08-Oct-2019 18:56:31 | index f0409fa..799aa40 100644 |
08-Oct-2019 18:56:31 | --- a/src/tasks/task_plotbandpass.py |
08-Oct-2019 18:56:31 | +++ b/src/tasks/task_plotbandpass.py |
08-Oct-2019 18:56:31 | @@ -24,16 +24,27 @@ import matplotlib.transforms |
08-Oct-2019 18:56:31 | import inspect |
08-Oct-2019 18:56:31 | from casatasks.private.casa_transition import * |
08-Oct-2019 18:56:31 | if is_CASA6: |
08-Oct-2019 18:56:31 | + from casatasks import casalog |
08-Oct-2019 18:56:31 | from casatools import table as tbtool |
08-Oct-2019 18:56:31 | from casatools import msmetadata as msmdtool |
08-Oct-2019 18:56:31 | from casatools import atmosphere as attool |
08-Oct-2019 18:56:31 | from casatools import quanta as qatool |
08-Oct-2019 18:56:31 | from casatools import measures as metool |
08-Oct-2019 18:56:31 | from casatools import ms as mstool |
08-Oct-2019 18:56:31 | + from casatools import ctsys |
08-Oct-2019 18:56:31 | + compare_version = ctsys.compare_version |
08-Oct-2019 18:56:31 | + quantity_as_casa_3x = False |
08-Oct-2019 18:56:31 | + # matplotlib 3.1.1 removed hold |
08-Oct-2019 18:56:31 | + def old_pb_hold(_hold): |
08-Oct-2019 18:56:31 | + pass |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | from taskinit import * # necessary for tb.open() to work |
08-Oct-2019 18:56:31 | if (type(casac.Quantity) != type): # casa 4.x |
08-Oct-2019 18:56:31 | attool = casac.atmosphere |
08-Oct-2019 18:56:31 | + else: |
08-Oct-2019 18:56:31 | + quantity_as_casa_3x = True # casa 3.x |
08-Oct-2019 18:56:31 | + compare_version = cu.compare_version |
08-Oct-2019 18:56:31 | + old_pb_hold = pb.hold |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | TOP_MARGIN = 0.25 # Used if showatm=T or showtksy=T |
08-Oct-2019 18:56:31 | BOTTOM_MARGIN = 0.25 # Used if showfdm=T |
08-Oct-2019 18:56:31 | @@ -991,7 +1002,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | allowedFrames = [11,21,31,41,51,61,71,81,22,32,42] # [11,22,32,42] |
08-Oct-2019 18:56:31 | if (int(subplot) > 100): |
08-Oct-2019 18:56:31 | # This will accept 111, 221, 321, 421, etc. |
08-Oct-2019 18:56:31 | - subplot /= 10 |
08-Oct-2019 18:56:31 | + subplot //= 10 |
08-Oct-2019 18:56:31 | if ((int(subplot) in allowedFrames)==False): |
08-Oct-2019 18:56:31 | print("Subplot choice (rows x columns) must be one of %s" % (str(allowedFrames))) |
08-Oct-2019 18:56:31 | print("(with an optional trailing digit that is ignored).") |
08-Oct-2019 18:56:31 | @@ -1042,14 +1053,14 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | return() |
08-Oct-2019 18:56:31 | xframeStart = int(subplot)*10 # i.e. 110 or 220 or 420 |
08-Oct-2019 18:56:31 | firstFrame = xframeStart + 1 |
08-Oct-2019 18:56:31 | - lastFrame = xframeStart + (subplot/10)*(subplot%10) |
08-Oct-2019 18:56:31 | + lastFrame = xframeStart + (subplot//10)*(subplot%10) |
08-Oct-2019 18:56:31 | bottomRowFrames = [111,212,313,414,515,616,717,818,223,224,325,326,427,428] # try to make this more general |
08-Oct-2019 18:56:31 | leftColumnFrames = [111,211,212,311,312,313,411,412,413,414,511,512,513,514,515,611,612,613,614,615,616, |
08-Oct-2019 18:56:31 | 711,712,713,714,715,716,717,811,812,813,814,815,816,817,818,221,223,321,323,325,421,423,425,427] |
08-Oct-2019 18:56:31 | rightColumnFrames = [111,211,212,311,312,313,411,412,413,414,511,512,513,514,515,611,612,613,614,615,616, |
08-Oct-2019 18:56:31 | 711,712,713,714,715,716,717,811,812,813,814,815,816,817,818,222,224,322,324,326,422,424,426,428] |
08-Oct-2019 18:56:31 | subplotCols = subplot % 10 |
08-Oct-2019 18:56:31 | - subplotRows = subplot/10 |
08-Oct-2019 18:56:31 | + subplotRows = subplot//10 |
08-Oct-2019 18:56:31 | ystartPolLabel = 1.0-0.04*subplotRows |
08-Oct-2019 18:56:31 | ystartMadLabel = 0.04*subplotRows |
08-Oct-2019 18:56:31 | if (subplotCols == 1): |
08-Oct-2019 18:56:31 | @@ -1139,9 +1150,9 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | return() |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | myhspace = 0.30 |
08-Oct-2019 18:56:31 | - if (subplot/10 > 2): |
08-Oct-2019 18:56:31 | + if (subplot//10 > 2): |
08-Oct-2019 18:56:31 | myhspace = 0.4 |
08-Oct-2019 18:56:31 | - if (subplot/10 > 3): |
08-Oct-2019 18:56:31 | + if (subplot//10 > 3): |
08-Oct-2019 18:56:31 | myhspace = 0.6 |
08-Oct-2019 18:56:31 | mywspace = 0.25 |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | @@ -1278,7 +1289,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | # Now open the associated ms tables via msmd tool |
08-Oct-2019 18:56:31 | # msAnt = [] # comment this out when CAS-6801 changes are in place |
08-Oct-2019 18:56:31 | if (debug): print( "creating msmd tool") |
08-Oct-2019 18:56:31 | - if (cu.compare_version('<',[4,1,0])): |
08-Oct-2019 18:56:31 | + if (compare_version('<',[4,1,0])): |
08-Oct-2019 18:56:31 | print("This version of casa is too old to use the msmd tool. Use au.plotbandpass instead.") |
08-Oct-2019 18:56:31 | return |
08-Oct-2019 18:56:31 | mymsmd = '' |
08-Oct-2019 18:56:31 | @@ -1288,7 +1299,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | if (os.path.exists(msName) == False): |
08-Oct-2019 18:56:31 | msName = os.path.dirname(caltable)+'/'+msName |
08-Oct-2019 18:56:31 | if (debug): print( "found msName = %s." % (msName)) |
08-Oct-2019 18:56:31 | - if (cu.compare_version('<',[4,1,0])): |
08-Oct-2019 18:56:31 | + if (compare_version('<',[4,1,0])): |
08-Oct-2019 18:56:31 | print("This version of casa is too old to use the msmd tool. Use au.plotbandpass instead.") |
08-Oct-2019 18:56:31 | return |
08-Oct-2019 18:56:31 | try: |
08-Oct-2019 18:56:31 | @@ -1447,7 +1458,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | print("WARNING: spw %d is not in the solution. Removing it from the list to plot." % (myspw)) |
08-Oct-2019 18:56:31 | print("Available spws = ", uniqueSpwsInCalTable) |
08-Oct-2019 18:56:31 | keepSpwsToPlot.remove(myspw) |
08-Oct-2019 18:56:31 | - if (cu.compare_version('>=',[4,1,0]) and mymsmd != ''): |
08-Oct-2019 18:56:31 | + if (compare_version('>=',[4,1,0]) and mymsmd != ''): |
08-Oct-2019 18:56:31 | # # nonwvrspws = list(set(range(mymsmd.nspw())).difference(set(mymsmd.wvrspws()))) |
08-Oct-2019 18:56:31 | if (myspw not in range(mymsmd.nspw())): |
08-Oct-2019 18:56:31 | print("FATAL: spw %d is not even in the ms. There might be a bug in your script." % (myspw)) |
08-Oct-2019 18:56:31 | @@ -1462,7 +1473,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | originalSpwsToPlot = computeOriginalSpwsToPlot(spwsToPlot, originalSpw, tableFormat, debug) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | # Now generate the list of minimal basebands that contain the spws to be plotted |
08-Oct-2019 18:56:31 | - if (cu.compare_version('>=',[4,1,0]) and msFound): |
08-Oct-2019 18:56:31 | + if (compare_version('>=',[4,1,0]) and msFound): |
08-Oct-2019 18:56:31 | allBasebands = [] |
08-Oct-2019 18:56:31 | if (mymsmd != ''): |
08-Oct-2019 18:56:31 | try: |
08-Oct-2019 18:56:31 | @@ -2718,7 +2729,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | for baseband in basebands: |
08-Oct-2019 18:56:31 | myspwlist = [] |
08-Oct-2019 18:56:31 | for spw in spwsToPlot: |
08-Oct-2019 18:56:31 | - if (cu.compare_version('>=',[4,1,0]) and msFound): |
08-Oct-2019 18:56:31 | + if (compare_version('>=',[4,1,0]) and msFound): |
08-Oct-2019 18:56:31 | if (mymsmd.baseband(originalSpwsToPlot[list(spwsToPlot).index(spw)]) == baseband): |
08-Oct-2019 18:56:31 | myspwlist.append(spw) |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | @@ -2754,7 +2765,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | if (debug): print("setting spwsToPlot for baseband %d (bbctr=%d) to %s" % (baseband, bbctr, str(spwsToPlot))) |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | baseband = 0 # add from here to "ispw=" on 2014-04-05 |
08-Oct-2019 18:56:31 | - if (cu.compare_version('>=',[4,1,0])): |
08-Oct-2019 18:56:31 | + if (compare_version('>=',[4,1,0])): |
08-Oct-2019 18:56:31 | if (debug): print("A, msName=%s, vis=%s" % (msName,vis)) |
08-Oct-2019 18:56:31 | if (getBasebandDict(vis=msName,caltable=caltable,mymsmd=mymsmd) != {}): |
08-Oct-2019 18:56:31 | if (debug): print("B") |
08-Oct-2019 18:56:31 | @@ -2783,7 +2794,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | allTimesFlaggedOnThisSpw = True # used only by overlay='time' |
08-Oct-2019 18:56:31 | if (groupByBaseband == False): |
08-Oct-2019 18:56:31 | baseband = 0 |
08-Oct-2019 18:56:31 | - if (cu.compare_version('>=',[4,1,0])): |
08-Oct-2019 18:56:31 | + if (compare_version('>=',[4,1,0])): |
08-Oct-2019 18:56:31 | if (getBasebandDict(vis=msName,caltable=caltable,mymsmd=mymsmd) != {}): |
08-Oct-2019 18:56:31 | try: |
08-Oct-2019 18:56:31 | baseband = mymsmd.baseband(originalSpwsToPlot[spwctr]) |
08-Oct-2019 18:56:31 | @@ -3185,7 +3196,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | print("1)setting myUniqueTime to %d" % (mytime)) |
08-Oct-2019 18:56:31 | myUniqueTime = mytime |
08-Oct-2019 18:56:31 | ctr += 1 |
08-Oct-2019 18:56:31 | - if (ctr > fieldIndicesToPlot and bOverlay==False): |
08-Oct-2019 18:56:31 | + if (ctr > len(fieldIndicesToPlot) and bOverlay==False): |
08-Oct-2019 18:56:31 | print("multi-field time overlay *************** why are there 2 matches?") |
08-Oct-2019 18:56:31 | # # # # if (ctr == 0): |
08-Oct-2019 18:56:31 | # # # # print("No match for %.1f in "%(t), uTPFPS) |
08-Oct-2019 18:56:31 | @@ -3396,7 +3407,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | drewAtmosphere = False |
08-Oct-2019 18:56:31 | previousSubplot = xframe |
08-Oct-2019 18:56:31 | alreadyPlottedAmp = True # needed for (overlay='baseband', yaxis='both') CAS-6477 |
08-Oct-2019 18:56:31 | - pb.hold(overlayAntennas or overlayTimes or overlaySpws or overlayBasebands) |
08-Oct-2019 18:56:31 | + old_pb_hold(overlayAntennas or overlayTimes or overlaySpws or overlayBasebands) |
08-Oct-2019 18:56:31 | gampx = np.abs(gplotx) |
08-Oct-2019 18:56:31 | if (nPolarizations == 2): |
08-Oct-2019 18:56:31 | gampy = np.abs(gploty) |
08-Oct-2019 18:56:31 | @@ -3542,7 +3553,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | if (xaxis.find('chan')>=0 or (msFound==False and tableFormat==33)): # 'amp' |
08-Oct-2019 18:56:31 | if (debug): |
08-Oct-2019 18:56:31 | print("amp: plot vs. channel **********************") |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (overlayAntennas or overlayTimes): |
08-Oct-2019 18:56:31 | if (corr_type_string[p] in polsToPlot): |
08-Oct-2019 18:56:31 | @@ -3577,7 +3588,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | pb.xlabel("Channel", size=mysize) |
08-Oct-2019 18:56:31 | elif (xaxis.find('freq')>=0): # amp |
08-Oct-2019 18:56:31 | if (bOverlay): |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | myxrange = np.abs(xfrequencies[0]-xfrequencies[-1]) |
08-Oct-2019 18:56:31 | try: |
08-Oct-2019 18:56:31 | xrange2 = np.abs(xfrequencies2[0]-xfrequencies2[-1]) |
08-Oct-2019 18:56:31 | @@ -3586,7 +3597,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | print("If this doesn't work, email the developer (%s)." % (developerEmail)) |
08-Oct-2019 18:56:31 | return() |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - if (np.abs(myxrange/xrange2 - 1) > 0.05 + len(xflag)/len(xchannels)): # 0.0666 is 2000/1875-1 |
08-Oct-2019 18:56:31 | + if (np.abs(myxrange/xrange2 - 1) > 0.05 + len(xflag)//len(xchannels)): # 0.0666 is 2000/1875-1 |
08-Oct-2019 18:56:31 | # These line widths are optimal for visualizing FDM over TDM |
08-Oct-2019 18:56:31 | width1 = 1 |
08-Oct-2019 18:56:31 | width2 = 4 |
08-Oct-2019 18:56:31 | @@ -3756,7 +3767,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | amplitudeSolution2Y = np.mean(gampy)*(cc-np.mean(cc)+1) |
08-Oct-2019 18:56:31 | if (debug): print("Done mean(gampy)") |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | pb.plot(pfrequencies[p], gamp[p],'%s%s'%(pcolor[p],ampmarkstyle), markersize=markersize,markeredgewidth=markeredgewidth) |
08-Oct-2019 18:56:31 | @@ -3780,7 +3791,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | newylimits = recalcYlimitsFreq(chanrange, newylimits, amplitudeSolution2Y, sideband,plotrange,ychannels2,debug,13,chanrangePercent=chanrangePercent) |
08-Oct-2019 18:56:31 | if (debug): print("Done this block") |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | pb.plot(pfrequencies[p], gamp[p],'%s%s'%(pcolor[p],ampmarkstyle), markersize=markersize,markeredgewidth=markeredgewidth) |
08-Oct-2019 18:56:31 | @@ -3797,7 +3808,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | # we are not overlaying any B or polynomial solutions 'amp vs. freq' |
08-Oct-2019 18:56:31 | if (showflagged): |
08-Oct-2019 18:56:31 | # Also show the flagged data to see where the flags are |
08-Oct-2019 18:56:31 | - pb.hold(True) # Matches line 2326 for xaxis='chan' |
08-Oct-2019 18:56:31 | + old_pb_hold(True) # Matches line 2326 for xaxis='chan' |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | if (overlayAntennas or overlayTimes): |
08-Oct-2019 18:56:31 | @@ -3818,7 +3829,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | pb.plot(pfrequencies[p], gamp[p], '%s%s'%(pcolor[p],ampmarkstyles[p]), markersize=markersize,markeredgewidth=markeredgewidth) |
08-Oct-2019 18:56:31 | newylimits = recalcYlimitsFreq(chanrange, newylimits, gamp[p], sideband,plotrange,xchannels,chanrangePercent=chanrangePercent) |
08-Oct-2019 18:56:31 | else: # showing only unflagged data 'amp vs. freq' |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (debug): |
08-Oct-2019 18:56:31 | print("*p=%d, polsToPlot=%s, len(fieldsToPlot)=%d, len(timerangeList)=%d, myUniqueTime=%s" % (p,str(polsToPlot),len(fieldsToPlot),len(timerangeList), str(myUniqueTime))) |
08-Oct-2019 18:56:31 | @@ -3887,7 +3898,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | titleString = "%sspw%s, field %d: %s%s" % (antennaString,spwString,uniqueFields[fieldIndex], |
08-Oct-2019 18:56:31 | fieldString,timeString) |
08-Oct-2019 18:56:31 | - tsize = titlesize-int(len(titleString)/(maxCharsBeforeReducingTitleFontSize/subplotCols)) |
08-Oct-2019 18:56:31 | + tsize = titlesize-int(len(titleString)//(maxCharsBeforeReducingTitleFontSize//subplotCols)) |
08-Oct-2019 18:56:31 | pb.title(titleString, size=tsize) |
08-Oct-2019 18:56:31 | if (abs(plotrange[0]) > 0 or abs(plotrange[1]) > 0): |
08-Oct-2019 18:56:31 | SetNewXLimits([plotrange[0],plotrange[1]],5) |
08-Oct-2019 18:56:31 | @@ -4284,7 +4295,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | if (previousSubplot != xframe): |
08-Oct-2019 18:56:31 | drewAtmosphere = False |
08-Oct-2019 18:56:31 | previousSubplot = xframe |
08-Oct-2019 18:56:31 | - pb.hold(overlayAntennas or overlayTimes) |
08-Oct-2019 18:56:31 | + old_pb_hold(overlayAntennas or overlayTimes) |
08-Oct-2019 18:56:31 | gphsx = np.arctan2(np.imag(gplotx),np.real(gplotx))*180.0/math.pi |
08-Oct-2019 18:56:31 | if (nPolarizations == 2): |
08-Oct-2019 18:56:31 | gphsy = np.arctan2(np.imag(gploty),np.real(gploty))*180.0/math.pi |
08-Oct-2019 18:56:31 | @@ -4371,7 +4382,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | print("bOverlay is FALSE ===========================") |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | if (xaxis.find('chan')>=0 or len(xfrequencies) < 1): # 'phase' |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | if (overlayAntennas or overlayTimes): |
08-Oct-2019 18:56:31 | @@ -4411,7 +4422,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | pb.xlabel("Channel", size=mysize) |
08-Oct-2019 18:56:31 | elif (xaxis.find('freq')>=0): # 'phase' |
08-Oct-2019 18:56:31 | if (bOverlay): |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | if (debug): |
08-Oct-2019 18:56:31 | print("Preparing to plot phase from %f-%f for pols: %s" % (xfrequencies[0],xfrequencies[-1],str(polsToPlot))) |
08-Oct-2019 18:56:31 | print("Preparing to plot phase from %f-%f for pols: %s" % (pfrequencies[p][0],pfrequencies[p][-1],str(polsToPlot))) |
08-Oct-2019 18:56:31 | @@ -4423,7 +4434,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | print("No phase data found in second solution. Try increasing the solutionTimeThresholdSeconds above %.0f." % (solutionTimeThresholdSeconds)) |
08-Oct-2019 18:56:31 | print("If this doesn't work, email the developer (%s)." % (developerEmail)) |
08-Oct-2019 18:56:31 | return() |
08-Oct-2019 18:56:31 | - if (np.abs(myxrange/xrange2 - 1) > 0.05 + len(xflag)/len(xchannels)): # 0.0666 is 2000/1875-1 |
08-Oct-2019 18:56:31 | + if (np.abs(myxrange/xrange2 - 1) > 0.05 + len(xflag)//len(xchannels)): # 0.0666 is 2000/1875-1 |
08-Oct-2019 18:56:31 | # These line widths are optimal for visualizing FDM over TDM |
08-Oct-2019 18:56:31 | width1 = 1 |
08-Oct-2019 18:56:31 | width2 = 4 |
08-Oct-2019 18:56:31 | @@ -4454,7 +4465,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | width1 = 1 |
08-Oct-2019 18:56:31 | width2 = 1 |
08-Oct-2019 18:56:31 | # solutions may be different level of smoothing, so plot highest rms first |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | if (MAD(gphsx) < MAD(gphsx2)): |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | @@ -4608,7 +4619,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | matches2 = np.where(fa<yfrequencies[0])[0] |
08-Oct-2019 18:56:31 | mymean = complexMeanDeg(np.array(cc)[matches[0]:matches2[-1]+1]) |
08-Oct-2019 18:56:31 | phaseSolution2Y = np.mean(gphsy) + cc - mymean |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | pb.plot(pfrequencies[p], gphs[p],'%s%s' % (pcolor[p],phasemarkstyle), markersize=markersize,markeredgewidth=markeredgewidth) |
08-Oct-2019 18:56:31 | @@ -4625,7 +4636,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | pb.plot(frequenciesGHz2[index],phaseSolution2Y,'%s%s'%(y3color,bpolymarkstyle),markeredgewidth=markeredgewidth) |
08-Oct-2019 18:56:31 | newylimits = recalcYlimitsFreq(chanrange, newylimits, phaseSolution2Y, sideband,plotrange,xchannels2,chanrangePercent=chanrangePercent) |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | pb.plot(pfrequencies[p], gphs[p],'%s%s'%(pcolor[p],phasemarkstyle), markersize=markersize,markeredgewidth=markeredgewidth) |
08-Oct-2019 18:56:31 | @@ -4645,7 +4656,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | SetNewYLimits([-minPhaseRange,minPhaseRange]) |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | # we are not overlaying any B or polynomial solutions 'phase vs. freq' |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | for p in range(nPolarizations): |
08-Oct-2019 18:56:31 | if (corrTypeToString(corr_type[p]) in polsToPlot): |
08-Oct-2019 18:56:31 | if (overlayAntennas or overlayTimes): |
08-Oct-2019 18:56:31 | @@ -4690,7 +4701,7 @@ def plotbandpass(caltable='', antenna='', field='', spw='', yaxis='amp', |
08-Oct-2019 18:56:31 | showBasebandNumber) |
08-Oct-2019 18:56:31 | titleString = "%sspw%s, field %d: %s%s" % (antennaString, |
08-Oct-2019 18:56:31 | spwString,uniqueFields[fieldIndex],fieldString,timeString) |
08-Oct-2019 18:56:31 | - pb.title(titleString,size=titlesize-int(len(titleString)/(maxCharsBeforeReducingTitleFontSize/subplotCols))) |
08-Oct-2019 18:56:31 | + pb.title(titleString,size=titlesize-int(len(titleString)//(maxCharsBeforeReducingTitleFontSize//subplotCols))) |
08-Oct-2019 18:56:31 | if (abs(plotrange[0]) > 0 or abs(plotrange[1]) > 0): |
08-Oct-2019 18:56:31 | SetNewXLimits([plotrange[0],plotrange[1]],18) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | @@ -5557,19 +5568,19 @@ def CalcAtmTransmission(chans,freqs,xaxis,pwv,vm, mymsmd,vis,asdm,antenna,timest |
08-Oct-2019 18:56:31 | midLatitudeWinter = 3 |
08-Oct-2019 18:56:31 | numchan = len(freqs) |
08-Oct-2019 18:56:31 | # Set the reference freq to be the middle of the middle two channels |
08-Oct-2019 18:56:31 | - reffreq=0.5*(freqs[numchan/2-1]+freqs[numchan/2]) |
08-Oct-2019 18:56:31 | + reffreq=0.5*(freqs[numchan//2-1]+freqs[numchan//2]) |
08-Oct-2019 18:56:31 | originalnumchan = numchan |
08-Oct-2019 18:56:31 | while (numchan > MAX_ATM_CALC_CHANNELS): |
08-Oct-2019 18:56:31 | - numchan /= 2 |
08-Oct-2019 18:56:31 | + numchan //= 2 |
08-Oct-2019 18:56:31 | # print("Reducing numchan to ", numchan) |
08-Oct-2019 18:56:31 | - chans = range(0,originalnumchan,(originalnumchan/numchan)) |
08-Oct-2019 18:56:31 | + chans = range(0,originalnumchan,(originalnumchan//numchan)) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | chansep = (freqs[-1]-freqs[0])/(numchan-1) |
08-Oct-2019 18:56:31 | nbands = 1 |
08-Oct-2019 18:56:31 | if (verbose): print("Opening casac.atmosphere()") |
08-Oct-2019 18:56:31 | myat = createCasaTool(attool) |
08-Oct-2019 18:56:31 | if (verbose): print("Opened") |
08-Oct-2019 18:56:31 | - if (type(casac.Quantity) == type): # casa 3.x |
08-Oct-2019 18:56:31 | + if quantity_as_casa_3x: # casa 3.x |
08-Oct-2019 18:56:31 | fCenter = casac.Quantity(reffreq,'GHz') |
08-Oct-2019 18:56:31 | fResolution = casac.Quantity(chansep,'GHz') |
08-Oct-2019 18:56:31 | fWidth = casac.Quantity(numchan*chansep,'GHz') |
08-Oct-2019 18:56:31 | @@ -5589,7 +5600,7 @@ def CalcAtmTransmission(chans,freqs,xaxis,pwv,vm, mymsmd,vis,asdm,antenna,timest |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | n = myat.getNumChan() |
08-Oct-2019 18:56:31 | if (verbose): print("numchan = %s" % (str(n))) |
08-Oct-2019 18:56:31 | - if cu.compare_version('<',[4,0,0]): |
08-Oct-2019 18:56:31 | + if compare_version('<',[4,0,0]): |
08-Oct-2019 18:56:31 | dry = np.array(myat.getDryOpacitySpec(0)['dryOpacity']) |
08-Oct-2019 18:56:31 | wet = np.array(myat.getWetOpacitySpec(0)['wetOpacity'].value) |
08-Oct-2019 18:56:31 | TebbSky = [] |
08-Oct-2019 18:56:31 | @@ -5648,7 +5659,7 @@ def CalcAtmTransmission(chans,freqs,xaxis,pwv,vm, mymsmd,vis,asdm,antenna,timest |
08-Oct-2019 18:56:31 | # freq = np.linspace(rf+((numchan-1)/2.)*chansepGHz, |
08-Oct-2019 18:56:31 | # rf-((numchan-1)/2.)*chansepGHz, numchan) |
08-Oct-2019 18:56:31 | # Therewas a 1-channel offset in CASA 5.0.x (CAS-10228), but it was fixed. |
08-Oct-2019 18:56:31 | -# if (cu.compare_version('<',[5,1,0])): |
08-Oct-2019 18:56:31 | +# if (compare_version('<',[5,1,0])): |
08-Oct-2019 18:56:31 | # freq += chansepGHz |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | if (verbose): print("Done CalcAtmTransmission") |
08-Oct-2019 18:56:31 | @@ -5985,7 +5996,7 @@ def showFDM(originalSpw, chanFreqGHz, baseband, showBasebandNumber, basebandDict |
08-Oct-2019 18:56:31 | y0,y1 = pb.ylim() |
08-Oct-2019 18:56:31 | yrange = y1 - y0 |
08-Oct-2019 18:56:31 | myxrange = x1 - x0 |
08-Oct-2019 18:56:31 | - pb.hold(True) |
08-Oct-2019 18:56:31 | + old_pb_hold(True) |
08-Oct-2019 18:56:31 | labelAbove = False # False means label to the right |
08-Oct-2019 18:56:31 | for i in range(len(originalSpw)): |
08-Oct-2019 18:56:31 | nchan = len(chanFreqGHz[i]) |
08-Oct-2019 18:56:31 | @@ -6243,12 +6254,12 @@ def stdInfo(a, sigma=3, edge=0, spw=-1, xant=-1, pol=-1): |
08-Oct-2019 18:56:31 | number and list of channels that exceed sigma*std, and the worst outlier. |
08-Oct-2019 18:56:31 | """ |
08-Oct-2019 18:56:31 | info = {} |
08-Oct-2019 18:56:31 | - if (edge >= len(a)/2): # protect against too large of an edge value |
08-Oct-2019 18:56:31 | + if (edge >= len(a)//2): # protect against too large of an edge value |
08-Oct-2019 18:56:31 | originalEdge = edge |
08-Oct-2019 18:56:31 | - if (len(a) == 2*(len(a)/2)): |
08-Oct-2019 18:56:31 | - edge = len(a)/2 - 1 # use middle 2 points |
08-Oct-2019 18:56:31 | + if (len(a) == 2*(len(a)//2)): |
08-Oct-2019 18:56:31 | + edge = len(a)//2 - 1 # use middle 2 points |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | - edge = len(a)/2 # use central point |
08-Oct-2019 18:56:31 | + edge = len(a)//2 # use central point |
08-Oct-2019 18:56:31 | if (edge < 0): |
08-Oct-2019 18:56:31 | edge = 0 |
08-Oct-2019 18:56:31 | print("stdInfo: WARNING edge value is too large for spw%d xant%d pol%d, reducing it from %d to %d." % (spw, xant, pol, originalEdge, edge)) |
08-Oct-2019 18:56:31 | @@ -6274,12 +6285,12 @@ def madInfo(a, madsigma=3, edge=0): |
08-Oct-2019 18:56:31 | of channels that exceed madsigma*MAD, and the worst outlier. |
08-Oct-2019 18:56:31 | """ |
08-Oct-2019 18:56:31 | info = {} |
08-Oct-2019 18:56:31 | - if (edge >= len(a)/2): # protect against too large of an edge value |
08-Oct-2019 18:56:31 | + if (edge >= len(a)//2): # protect against too large of an edge value |
08-Oct-2019 18:56:31 | originalEdge = edge |
08-Oct-2019 18:56:31 | - if (len(a) == 2*(len(a)/2)): |
08-Oct-2019 18:56:31 | - edge = len(a)/2 - 1 # use middle 2 points |
08-Oct-2019 18:56:31 | + if (len(a) == 2*(len(a)//2)): |
08-Oct-2019 18:56:31 | + edge = len(a)//2 - 1 # use middle 2 points |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | - edge = len(a)/2 # use central point |
08-Oct-2019 18:56:31 | + edge = len(a)//2 # use central point |
08-Oct-2019 18:56:31 | print("WARNING edge value is too large, reducing it from %d to %d." % (originalEdge, edge)) |
08-Oct-2019 18:56:31 | info['mad'] = mad(a[edge:len(a)-edge]) |
08-Oct-2019 18:56:31 | chan = [] |
08-Oct-2019 18:56:31 | @@ -6308,7 +6319,7 @@ def platformingCheck(a, threshold=DEFAULT_PLATFORMING_THRESHOLD): |
08-Oct-2019 18:56:31 | # print("Checking channels %d-%d for platforming" % (startChan,endChan)) |
08-Oct-2019 18:56:31 | if (startChan <= 0 or endChan >= len(a)): |
08-Oct-2019 18:56:31 | return |
08-Oct-2019 18:56:31 | - middleChan = (startChan+endChan)/2 |
08-Oct-2019 18:56:31 | + middleChan = (startChan+endChan)//2 |
08-Oct-2019 18:56:31 | channelRange1 = range(startChan,middleChan+1) |
08-Oct-2019 18:56:31 | channelRange2 = range(endChan,middleChan,-1) |
08-Oct-2019 18:56:31 | platforming = False |
08-Oct-2019 18:56:31 | @@ -6365,7 +6376,7 @@ def callFrequencyRangeForSpws(mymsmd, spwlist, vm, caltable=None): |
08-Oct-2019 18:56:31 | Uses msmd, unless the ms is not found, in which case it uses |
08-Oct-2019 18:56:31 | the spw information inside the (new-style) cal-table. |
08-Oct-2019 18:56:31 | """ |
08-Oct-2019 18:56:31 | - if (mymsmd != '' and cu.compare_version('>=',[4,1,0])): |
08-Oct-2019 18:56:31 | + if (mymsmd != '' and compare_version('>=',[4,1,0])): |
08-Oct-2019 18:56:31 | return(frequencyRangeForSpws(mymsmd,spwlist)) |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | freqs = [] |
08-Oct-2019 18:56:31 | @@ -6465,7 +6476,7 @@ def getBasebandDict(vis=None, spwlist=[], caltable=None, mymsmd=None): |
08-Oct-2019 18:56:31 | return |
08-Oct-2019 18:56:31 | if (type(bbs) == int): # old datasets will bomb on msmd.baseband() |
08-Oct-2019 18:56:31 | return(bbdict) |
08-Oct-2019 18:56:31 | - if (cu.compare_version('>=',[4,1,0]) and vis != None): |
08-Oct-2019 18:56:31 | + if (compare_version('>=',[4,1,0]) and vis != None): |
08-Oct-2019 18:56:31 | if (os.path.exists(vis)): |
08-Oct-2019 18:56:31 | needToClose = False |
08-Oct-2019 18:56:31 | if mymsmd is None or mymsmd == '': |
08-Oct-2019 18:56:31 | @@ -6529,7 +6540,7 @@ def createCasaTool(mytool): |
08-Oct-2019 18:56:31 | A wrapper to handle the changing ways in which casa tools are invoked. |
08-Oct-2019 18:56:31 | Todd Hunter |
08-Oct-2019 18:56:31 | """ |
08-Oct-2019 18:56:31 | - if (type(casac.Quantity) != type): # casa 4.x |
08-Oct-2019 18:56:31 | + if is_CASA6 or not quantity_as_casa_3x: # CASA 6, CASA 4.x |
08-Oct-2019 18:56:31 | myt = mytool() |
08-Oct-2019 18:56:31 | else: # casa 3.x |
08-Oct-2019 18:56:31 | myt = mytool.create() |
08-Oct-2019 18:56:31 | diff --git a/src/tasks/task_sdimaging.py b/src/tasks/task_sdimaging.py |
08-Oct-2019 18:56:31 | index b5f3326..6b22eb5 100644 |
08-Oct-2019 18:56:31 | --- a/src/tasks/task_sdimaging.py |
08-Oct-2019 18:56:31 | +++ b/src/tasks/task_sdimaging.py |
08-Oct-2019 18:56:31 | @@ -23,15 +23,15 @@ else: |
08-Oct-2019 18:56:31 | from cleanhelper import cleanhelper |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | @sdutil.sdtask_decorator |
08-Oct-2019 18:56:31 | -def sdimaging(infiles, outfile, overwrite, field, spw, antenna, scan, intent, |
08-Oct-2019 18:56:31 | - mode, nchan, start, width, veltype, outframe, |
08-Oct-2019 18:56:31 | - gridfunction, convsupport, truncate, gwidth, jwidth, |
08-Oct-2019 18:56:31 | - imsize, cell, phasecenter, projection, ephemsrcname, |
08-Oct-2019 18:56:31 | +def sdimaging(infiles, outfile, overwrite, field, spw, antenna, scan, intent, |
08-Oct-2019 18:56:31 | + mode, nchan, start, width, veltype, outframe, |
08-Oct-2019 18:56:31 | + gridfunction, convsupport, truncate, gwidth, jwidth, |
08-Oct-2019 18:56:31 | + imsize, cell, phasecenter, projection, ephemsrcname, |
08-Oct-2019 18:56:31 | pointingcolumn, restfreq, stokes, minweight, brightnessunit, clipminmax): |
08-Oct-2019 18:56:31 | with sdutil.sdtask_manager(sdimaging_worker, locals()) as worker: |
08-Oct-2019 18:56:31 | worker.initialize() |
08-Oct-2019 18:56:31 | worker.execute() |
08-Oct-2019 18:56:31 | - worker.finalize() |
08-Oct-2019 18:56:31 | + worker.finalize() |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | def is_string_type(val): |
08-Oct-2019 18:56:31 | """ |
08-Oct-2019 18:56:31 | @@ -83,7 +83,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | casalog.post("mode='%s': start=%s, width=%s, nchan=%d" % \ |
08-Oct-2019 18:56:31 | (self.mode, self.start, self.width, self.nchan)) |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | # check length of selection parameters |
08-Oct-2019 18:56:31 | if is_string_type(self.infiles): |
08-Oct-2019 18:56:31 | @@ -110,7 +110,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | if spw.strip() == '*': spw = '' |
08-Oct-2019 18:56:31 | # WORKAROUND for CAS-6422, i.e., ":X~Y" fails while "*:X~Y" works. |
08-Oct-2019 18:56:31 | if spw.startswith(":"): spw = '*' + spw |
08-Oct-2019 18:56:31 | - return spw |
08-Oct-2019 18:56:31 | + return spw |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | def __format_quantum_unit(self, data, unit): |
08-Oct-2019 18:56:31 | """ |
08-Oct-2019 18:56:31 | @@ -165,7 +165,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | antenna = self.get_selection_param_for_ms(file_idx, self.antenna) |
08-Oct-2019 18:56:31 | if antenna == -1: antenna = '' |
08-Oct-2019 18:56:31 | scan = self.get_selection_param_for_ms(file_idx, self.scanno) |
08-Oct-2019 18:56:31 | - intent = self.get_selection_param_for_ms(file_idx, self.intent) |
08-Oct-2019 18:56:31 | + intent = self.get_selection_param_for_ms(file_idx, self.intent) |
08-Oct-2019 18:56:31 | my_ms = ms() |
08-Oct-2019 18:56:31 | sel_ids = my_ms.msseltoindex(vis=vis, spw=spw, field=field, |
08-Oct-2019 18:56:31 | baseline=antenna, scan=scan) |
08-Oct-2019 18:56:31 | @@ -180,12 +180,12 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | try: spwinfo = my_ms.getspectralwindowinfo() |
08-Oct-2019 18:56:31 | except: raise |
08-Oct-2019 18:56:31 | finally: my_ms.close() |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | spwid = [int(idx) for idx in spwinfo.keys()] |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | raise RuntimeError("Invalid spw selction, %s ,for MS %d" (str(spw), file_idx)) |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | - return {'field': fieldid, 'spw': spwid, 'baseline': baseline, 'scan': scanid, 'intent': intent, 'antenna1': sel_ids['antenna1']} |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | + return {'field': fieldid, 'spw': spwid, 'baseline': baseline, 'scan': scanid, 'intent': intent, 'antenna1': sel_ids['antenna1']} |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | raise ValueError("Invalid file index, %d" % file_idx) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | @@ -252,8 +252,8 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | casalog.post("restfreq set to %s" % self.restfreq, "INFO") |
08-Oct-2019 18:56:31 | # REST_FREQUENCY column is optional (need retry if not exists) |
08-Oct-2019 18:56:31 | self.imager_param['restfreq'] = self.restfreq |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | - # |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | + # |
08-Oct-2019 18:56:31 | # spw (define representative spw id = spwid_ref) |
08-Oct-2019 18:56:31 | spwid_ref = selection_ids['spw'][0] if type(selection_ids['spw']) != int else selection_ids['spw'] |
08-Oct-2019 18:56:31 | # Invalid spw selection should have handled at msselectiontoindex(). |
08-Oct-2019 18:56:31 | @@ -303,7 +303,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | raise Exception("Internal error of getting frequency frame of spw=%d." % spwid_ref) |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | casalog.post("Using frequency frame defined by user, '%s'" % self.imager_param['outframe']) |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | # brightness unit |
08-Oct-2019 18:56:31 | if len(self.brightnessunit) > 0: |
08-Oct-2019 18:56:31 | if self.brightnessunit.lower() == 'k': |
08-Oct-2019 18:56:31 | @@ -399,7 +399,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | srestf = self.imager_param['restfreq'] if is_string_type(self.imager_param['restfreq']) else "%fHz" % self.imager_param['restfreq'] |
08-Oct-2019 18:56:31 | (imnchan, imstart, imwidth) = imhelper.setChannelizeDefault(self.mode, spwsel, self.field, self.nchan, self.start, self.width, self.imager_param['outframe'], self.veltype,self.imager_param['phasecenter'], srestf) |
08-Oct-2019 18:56:31 | del imhelper |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | # start and width |
08-Oct-2019 18:56:31 | if self.mode == 'velocity': |
08-Oct-2019 18:56:31 | startval = [self.imager_param['outframe'], imstart] |
08-Oct-2019 18:56:31 | @@ -415,10 +415,10 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | self.imager_param['start'] = startval |
08-Oct-2019 18:56:31 | self.imager_param['step'] = widthval |
08-Oct-2019 18:56:31 | self.imager_param['nchan'] = imnchan #self.nchan |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | self.imager_param['projection'] = self.projection |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | def execute(self): |
08-Oct-2019 18:56:31 | # imaging |
08-Oct-2019 18:56:31 | @@ -435,7 +435,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | nchan=-1, start=0, step=1, |
08-Oct-2019 18:56:31 | baseline=selection_ids['baseline'], |
08-Oct-2019 18:56:31 | scan=selection_ids['scan'], |
08-Oct-2019 18:56:31 | - intent=selection_ids['intent']) |
08-Oct-2019 18:56:31 | + intent=selection_ids['intent']) |
08-Oct-2019 18:56:31 | if not ok: |
08-Oct-2019 18:56:31 | raise ValueError("Selection is empty: you may want to review this MS selection") |
08-Oct-2019 18:56:31 | else: |
08-Oct-2019 18:56:31 | @@ -456,14 +456,10 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | intent=selection_ids['intent']) |
08-Oct-2019 18:56:31 | # need to do this |
08-Oct-2019 18:56:31 | self.is_imager_opened = True |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | # it should be called after infiles are registered to imager |
08-Oct-2019 18:56:31 | self._configure_map_property() |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | - print('-----------------------------------------------------------') |
08-Oct-2019 18:56:31 | - print('imager_param = ') |
08-Oct-2019 18:56:31 | - print(self.imager_param) |
08-Oct-2019 18:56:31 | - print('-----------------------------------------------------------') |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | casalog.post("Using phasecenter \"%s\""%(self.imager_param['phasecenter']), "INFO") |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | self.imager.defineimage(**self.imager_param)#self.__get_param()) |
08-Oct-2019 18:56:31 | @@ -516,21 +512,21 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | ###Leaving the original logic to calculate the number of masked pixels via |
08-Oct-2019 18:56:31 | ###product of median of and min_weight (which i don't understand the logic) |
08-Oct-2019 18:56:31 | ### if one wanted to find how many pixel were masked one could easily count the |
08-Oct-2019 18:56:31 | - ### number of pixels set to false |
08-Oct-2019 18:56:31 | - ### e.g after masking self.outfile below one could just do this |
08-Oct-2019 18:56:31 | + ### number of pixels set to false |
08-Oct-2019 18:56:31 | + ### e.g after masking self.outfile below one could just do this |
08-Oct-2019 18:56:31 | ### nmasked_pixels=tb.calc('[select from "'+self.outfile+'"/mask0'+'" giving [nfalse(PagedArray )]]') |
08-Oct-2019 18:56:31 | my_tb = table() |
08-Oct-2019 18:56:31 | nmask_pixels=0 |
08-Oct-2019 18:56:31 | nchan=stat['trc'][3]+1 |
08-Oct-2019 18:56:31 | casalog.filter('ERROR') ### hide the useless message of tb.calc |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | ### doing it by channel to make sure it does not go out of memory |
08-Oct-2019 18:56:31 | - ####tab.calc try to load the whole chunk in ram |
08-Oct-2019 18:56:31 | + ####tab.calc try to load the whole chunk in ram |
08-Oct-2019 18:56:31 | for k in range(nchan): |
08-Oct-2019 18:56:31 | nmask_pixels += my_tb.calc('[select from "'+weightfile+'" giving [ntrue(map[,,,'+str(k)+'] <='+str(median_weight*self.minweight)+')]]')['0'][0] |
08-Oct-2019 18:56:31 | casalog.filter() ####set logging back to normal |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | casalog.filter() ####set logging back to normal |
08-Oct-2019 18:56:31 | imsize=numpy.product(my_ia.shape()) |
08-Oct-2019 18:56:31 | my_ia.close() |
08-Oct-2019 18:56:31 | @@ -543,7 +539,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | ( masked_fraction ),"INFO") |
08-Oct-2019 18:56:31 | casalog.post("The weight image '%s' is returned by this task, if the user wishes to assess the results in detail." \ |
08-Oct-2019 18:56:31 | % (weightfile), "INFO") |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | # Calculate theoretical beam size |
08-Oct-2019 18:56:31 | casalog.post("Calculating image beam size.") |
08-Oct-2019 18:56:31 | if self.gridfunction.upper() not in ['SF']: |
08-Oct-2019 18:56:31 | @@ -656,7 +652,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | casalog.post("Calculating Pirimary beam size:") |
08-Oct-2019 18:56:31 | # CAS-5410 Use private tools inside task scripts |
08-Oct-2019 18:56:31 | my_qa = quanta() |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | pb_factor = 1.175 |
08-Oct-2019 18:56:31 | # Reference frequency |
08-Oct-2019 18:56:31 | ref_freq = self.restfreq |
08-Oct-2019 18:56:31 | @@ -703,13 +699,13 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | # CAS-5410 Use private tools inside task scripts |
08-Oct-2019 18:56:31 | my_qa = quanta() |
08-Oct-2019 18:56:31 | ret_dict = {} |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | colname = self.pointingcolumn.upper() |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | # MSs should be registered to imager |
08-Oct-2019 18:56:31 | if not self.is_imager_opened: |
08-Oct-2019 18:56:31 | raise RuntimeError('Internal error: imager should be opened here.') |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | if self.phasecenter == "": |
08-Oct-2019 18:56:31 | # defaut is J2000 |
08-Oct-2019 18:56:31 | base_mref = 'J2000' |
08-Oct-2019 18:56:31 | @@ -729,14 +725,14 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | base_mref = s |
08-Oct-2019 18:56:31 | break |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - mapextent = self.imager.mapextent(ref=base_mref, movingsource=self.ephemsrcname, |
08-Oct-2019 18:56:31 | + mapextent = self.imager.mapextent(ref=base_mref, movingsource=self.ephemsrcname, |
08-Oct-2019 18:56:31 | pointingcolumntouse=colname) |
08-Oct-2019 18:56:31 | if mapextent['status'] is True: |
08-Oct-2019 18:56:31 | qheight = my_qa.quantity(mapextent['extent'][1], 'rad') |
08-Oct-2019 18:56:31 | qwidth = my_qa.quantity(mapextent['extent'][0], 'rad') |
08-Oct-2019 18:56:31 | qcent0 = my_qa.quantity(mapextent['center'][0], 'rad') |
08-Oct-2019 18:56:31 | qcent1 = my_qa.quantity(mapextent['center'][1], 'rad') |
08-Oct-2019 18:56:31 | - scenter = '%s %s %s'%(base_mref, my_qa.formxxx(qcent0, 'hms'), |
08-Oct-2019 18:56:31 | + scenter = '%s %s %s'%(base_mref, my_qa.formxxx(qcent0, 'hms'), |
08-Oct-2019 18:56:31 | my_qa.formxxx(qcent1, 'dms')) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | casalog.post("- Pointing center: %s" % scenter) |
08-Oct-2019 18:56:31 | @@ -793,7 +789,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): |
08-Oct-2019 18:56:31 | self.observation_table = sdutil.get_subtable_name(keys['OBSERVATION']) |
08-Oct-2019 18:56:31 | self.pointing_table = sdutil.get_subtable_name(keys['POINTING']) |
08-Oct-2019 18:56:31 | self.data_desc_table = sdutil.get_subtable_name(keys['DATA_DESCRIPTION']) |
08-Oct-2019 18:56:31 | - self.pointing_table = sdutil.get_subtable_name(keys['POINTING']) |
08-Oct-2019 18:56:31 | + self.pointing_table = sdutil.get_subtable_name(keys['POINTING']) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | def _get_average_antenna_diameter(self, antenna): |
08-Oct-2019 18:56:31 | my_qa = quanta() |
08-Oct-2019 18:56:31 | diff --git a/src/tasks/task_tclean.py b/src/tasks/task_tclean.py |
08-Oct-2019 18:56:31 | index 006099c..6accde4 100644 |
08-Oct-2019 18:56:31 | --- a/src/tasks/task_tclean.py |
08-Oct-2019 18:56:31 | +++ b/src/tasks/task_tclean.py |
08-Oct-2019 18:56:31 | @@ -366,19 +366,15 @@ def tclean( |
08-Oct-2019 18:56:31 | t1=time.time(); |
08-Oct-2019 18:56:31 | casalog.post("***Time for pb-correcting images: "+"%.2f"%(t1-t0)+" sec", "INFO3", "task_tclean"); |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | - ## Close tools. |
08-Oct-2019 18:56:31 | + ##close tools |
08-Oct-2019 18:56:31 | # needs to deletools before concat or lock waits for ever |
08-Oct-2019 18:56:31 | imager.deleteTools() |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | if (pcube): |
08-Oct-2019 18:56:31 | print("running concatImages ...") |
08-Oct-2019 18:56:31 | casalog.post("Running virtualconcat (type=%s) of sub-cubes" % concattype,"INFO2", "task_tclean") |
08-Oct-2019 18:56:31 | - # fixed to move subcubes |
08-Oct-2019 18:56:31 | imager.concatImages(type=concattype) |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | # CAS-10721 |
08-Oct-2019 18:56:31 | if niter>0 and savemodel != "none": |
08-Oct-2019 18:56:31 | casalog.post("Please check the casa log file for a message confirming that the model was saved after the last major cycle. If it doesn't exist, please re-run tclean with niter=0,calcres=False,calcpsf=False in order to trigger a 'predict model' step that obeys the savemodel parameter.","WARN","task_tclean") |
08-Oct-2019 18:56:31 | diff --git a/tests/tasks/test_simobserve.py b/tests/tasks/test_simobserve.py |
08-Oct-2019 18:56:31 | index 8ab3e7e..6990daa 100644 |
08-Oct-2019 18:56:31 | --- a/tests/tasks/test_simobserve.py |
08-Oct-2019 18:56:31 | +++ b/tests/tasks/test_simobserve.py |
08-Oct-2019 18:56:31 | @@ -1286,7 +1286,7 @@ class simobserve_noise(simobserve_unittest_base): |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | #-----------------------------------------------------------------# |
08-Oct-2019 18:56:31 | # thermalnoise = "tsys-atm" |
08-Oct-2019 18:56:31 | - @unittest.skipIf(is_CASA6,"noise level differs by my nore than 10% error shown - needs to be fixed") |
08-Oct-2019 18:56:31 | + @unittest.skip("disabled pending change in CAS-12496") |
08-Oct-2019 18:56:31 | def testNZ_intAtm(self): |
08-Oct-2019 18:56:31 | """Test INT thermal noise (tsys-atm): standard parameter set""" |
08-Oct-2019 18:56:31 | project = self.project_int |
08-Oct-2019 18:56:31 | @@ -1695,8 +1695,7 @@ class simobserve_badinputs(simobserve_unittest_base): |
08-Oct-2019 18:56:31 | skymodel=skymodel) |
08-Oct-2019 18:56:31 | self.fail(self.failmsg) |
08-Oct-2019 18:56:31 | except Exception as e: |
08-Oct-2019 18:56:31 | - #pos=str(e).find("Image %s cannot be opened; its type is unknown" % skymodel) |
08-Oct-2019 18:56:31 | - pos=str(e).find("Unable to open image.") |
08-Oct-2019 18:56:31 | + pos=str(e).find("Unable to open image %s." % skymodel) |
08-Oct-2019 18:56:31 | msg = self.errmsg % str(e) |
08-Oct-2019 18:56:31 | self.assertNotEqual(pos,-1,msg=msg) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | diff --git a/tests/tasks/test_tclean.py b/tests/tasks/test_tclean.py |
08-Oct-2019 18:56:31 | index 978c5d2..c8f33b2 100644 |
08-Oct-2019 18:56:31 | --- a/tests/tasks/test_tclean.py |
08-Oct-2019 18:56:31 | +++ b/tests/tasks/test_tclean.py |
08-Oct-2019 18:56:31 | @@ -171,14 +171,14 @@ class testref_base(unittest.TestCase): |
08-Oct-2019 18:56:31 | shutil.copytree(os.path.join(refdatapath,self.msfile), self.msfile) |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | def prepCfcache(self,cfcache=""): |
08-Oct-2019 18:56:31 | - if (os.path.exists(self.cfcache)): |
08-Oct-2019 18:56:31 | + if (os.path.exists(self.cfcache)): |
08-Oct-2019 18:56:31 | os.system('rm -rf ' + self.cfcache) |
08-Oct-2019 18:56:31 | - if cfcache!="": |
08-Oct-2019 18:56:31 | + if cfcache!="": |
08-Oct-2019 18:56:31 | self.cfcache=cfcache |
08-Oct-2019 18:56:31 | - if (os.path.exists(self.cfcache)): |
08-Oct-2019 18:56:31 | + if (os.path.exists(self.cfcache)): |
08-Oct-2019 18:56:31 | os.system('rm -rf ' + self.cfcache) |
08-Oct-2019 18:56:31 | - shutil.copytree(os.path.join(refdatapath,self.cfcache), self.cfcache) |
08-Oct-2019 18:56:31 | - |
08-Oct-2019 18:56:31 | + shutil.copytree(os.path.join(refdatapath,self.cfcache), self.cfcache) |
08-Oct-2019 18:56:31 | + |
08-Oct-2019 18:56:31 | def delData(self,msname=""): |
08-Oct-2019 18:56:31 | if msname != "": |
08-Oct-2019 18:56:31 | self.msfile=msname |
08-Oct-2019 18:56:31 | @@ -1940,12 +1940,15 @@ class test_cube(testref_base): |
08-Oct-2019 18:56:31 | imnat=self.img+"_nat" |
08-Oct-2019 18:56:31 | imbriggs0=self.img+"_briggs0" |
08-Oct-2019 18:56:31 | imbriggs_2=self.img+"_briggs_2" |
08-Oct-2019 18:56:31 | + imbriggs_3=self.img+"_briggs_3" |
08-Oct-2019 18:56:31 | retnat = tclean(vis=self.msfile,imagename=imnat,imsize=100,cell='8.0arcsec',specmode='cube',deconvolver='hogbom',niter=1,threshold='0Jy',interactive=0, weighting='natural', parallel=self.parallel) |
08-Oct-2019 18:56:31 | ret0 = tclean(vis=self.msfile,imagename=imbriggs0,imsize=100,cell='8.0arcsec',specmode='cube', perchanweightdensity=True,deconvolver='hogbom',niter=1,threshold='0Jy',interactive=0, weighting='briggs', robust=0, parallel=self.parallel) |
08-Oct-2019 18:56:31 | ret_2=tclean(vis=self.msfile,imagename=imbriggs_2,imsize=100,cell='8.0arcsec',specmode='cube', perchanweightdensity=True,deconvolver='hogbom',niter=1,threshold='0Jy',interactive=0, weighting='briggs', robust=-2.0, parallel=self.parallel) |
08-Oct-2019 18:56:31 | - self.assertTrue(os.path.exists(imnat+'.image') and os.path.exists(imbriggs0+'.image') and os.path.exists(imbriggs_2+'.image') ) |
08-Oct-2019 18:56:31 | + ret_3=tclean(vis=self.msfile,imagename=imbriggs_3,imsize=100,cell='8.0arcsec',specmode='cube', perchanweightdensity=True,deconvolver='hogbom',niter=1,threshold='0Jy',interactive=0, weighting='briggs', robust=0.0, uvtaper=['50arcsec'], parallel=self.parallel) |
08-Oct-2019 18:56:31 | + self.assertTrue(os.path.exists(imnat+'.image') and os.path.exists(imbriggs0+'.image') and os.path.exists(imbriggs_2+'.image') and os.path.exists(imbriggs_3+'.image') ) |
08-Oct-2019 18:56:31 | self.assertTrue(self.th.check_beam_compare(imbriggs0+'.image', imnat+'.image', operator.lt)) |
08-Oct-2019 18:56:31 | self.assertTrue(self.th.check_beam_compare(imbriggs_2+'.image', imbriggs0+'.image', operator.lt)) |
08-Oct-2019 18:56:31 | + self.assertTrue(self.th.check_beam_compare(imbriggs0+'.image', imbriggs_3+'.image', operator.lt)) |
08-Oct-2019 18:56:31 | # def test_cube_D3(self): |
08-Oct-2019 18:56:31 | # """ EMPTY : [cube] Test_Cube_D3 : specmode cubesrc - Doppler correct to a SOURCE ephemeris""" |
08-Oct-2019 18:56:31 | # ret = tclean(vis=self.msfile,field='1',spw='0:105~135',specmode='cubesrc',nchan=30,start=105,width=1,veltype='radio',imagename=self.img,imsize=256,cell='0.01arcmin',phasecenter=1,deconvolver='hogbom',niter=10) |
08-Oct-2019 18:56:31 | Argument values: |
08-Oct-2019 18:56:31 | casatasks |
08-Oct-2019 18:56:31 | /export/home/cbt-el7-6/bamboohome/xml-data/build-dir/CASA-CTB-JOB1/casatasks |
08-Oct-2019 18:56:31 | master |
08-Oct-2019 18:56:31 | None |
08-Oct-2019 18:56:31 | Last Tag: 2019.158 |
08-Oct-2019 18:56:31 | New Tag: 2019.161 |
08-Oct-2019 18:56:31 | Creating a new tag |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | None |
08-Oct-2019 18:56:31 | Push enabled. Pushing new tag upstream. |
08-Oct-2019 18:56:31 | To ssh://git@open-bitbucket.nrao.edu:7999/casa/casatasks.git |
08-Oct-2019 18:56:31 | * [new tag] 2019.161 -> 2019.161 |
08-Oct-2019 18:56:31 | |
08-Oct-2019 18:56:31 | None |
08-Oct-2019 18:56:31 | Finished task 'Create wheel' with result: Success |
08-Oct-2019 18:56:31 | Running post build plugin 'Docker Container Cleanup' |
08-Oct-2019 18:56:31 | Beginning to execute external process for build 'CASA - Casa6 Tasks Wheel Build - Build and Package RHEL6 #160 (CASA-CTB-JOB1-160)' ... running command line: /bin/docker rm -f task-wheel-container ... in: /export/home/cbt-el7-6/bamboohome/xml-data/build-dir/CASA-CTB-JOB1 |
08-Oct-2019 18:56:33 | task-wheel-container |
08-Oct-2019 18:56:33 | Running post build plugin 'NCover Results Collector' |
08-Oct-2019 18:56:33 | Running post build plugin 'Clover Results Collector' |
08-Oct-2019 18:56:33 | Running post build plugin 'npm Cache Cleanup' |
08-Oct-2019 18:56:33 | Running post build plugin 'Artifact Copier' |
08-Oct-2019 18:56:33 | Publishing an artifact: EL6 wheel |
08-Oct-2019 18:56:33 | Finished publishing of artifact Non required shared artifact: [EL6 wheel], pattern: [*-any.whl] anchored at: [wheeldirectory/] in 193.3 ms |
08-Oct-2019 18:56:33 | Finalising the build... |
08-Oct-2019 18:56:33 | Stopping timer. |
08-Oct-2019 18:56:33 | Build CASA-CTB-JOB1-160 completed. |
08-Oct-2019 18:56:33 | Running on server: post build plugin 'NCover Results Collector' |
08-Oct-2019 18:56:33 | Running on server: post build plugin 'Build Hanging Detection Configuration' |
08-Oct-2019 18:56:33 | Running on server: post build plugin 'Clover Delta Calculator' |
08-Oct-2019 18:56:33 | Running on server: post build plugin 'Maven Dependencies Postprocessor' |
08-Oct-2019 18:56:33 | All post build plugins have finished |
08-Oct-2019 18:56:33 | Generating build results summary... |
08-Oct-2019 18:56:33 | Saving build results to disk... |
08-Oct-2019 18:56:33 | Logging substituted variables... |
08-Oct-2019 18:56:33 | Indexing build results... |
08-Oct-2019 18:56:33 | Finished building CASA-CTB-JOB1-160. |