# Known Issues

Important information concerning this version of CASA

## Summary Most Important Issues (details below)

• A patch version CASA 5.4.0-70 was released to address a bug affecting in particular mosaics (see 'general' section).
• Wideband mosaicing in tclean is still in its commissioning phase and not officially endorsed in CASA 5.4.0.
• stawt may fail when (1) excludechans does not include all the spw that are in the MS (CASA 5.4.0 only), or (2) the correlator integration time changes within an MS and statwt is run with timebin set to an integer value (CASA 5.4 only).
• VLA data taken on 20 September 2017 and later contain an additional Tcal entry for solar observations. CASA 5.0 and earlier will fail in gencal to calculate requantizer gains. Use CASA 5.1 and later for such data.
• The task clean is no longer being actively maintained; instead, tclean is now the recommended task for imaging.
• Currently, gaincal will not find good solutions if any correlation (including cross-correlation) in the data is completely flagged. As an interim solution one may split the unflagged data in a separate file and then perform gaincal
• When using tclean with parameter savemodel set to other than the default 'none', care has to be taken to ensure that the model was actually saved (see below for more details).
• Plotting the virtual model in plotms fails when it was created in clean with imagermode='mosaic' and ftmachine='mosaic', or gridmode='aprojection'. And it also fails in tclean when gridder='mosaic' or gridder='awproject'
• CASA is not using LD_LIBRARY_PATH anymore but CASALD_LIBRARY_PATH to avoid confusion.
• cvel is calculating the velocity incorrectly for ephemeris objects. We recommend to use mstransform or its offspring cvel2, although the latter should be used with care as it is not fully commissioned yet.
• When running CASA with the pipeline option 'casa --pipeline', plotcal may not show all plots and comes up with an error message. Use CASA without '--pipeline' when performing interactive data reduction.
• The line tool in the MAC viewer plots unreadable hex numbers.
• The packaged CASA Docs documentation within CASA is still experimental. On LINUX Red Hat, it may be necessary to set the browser variable to default for xdg-open, otherwise doc() and doc('taskname') may not work (this issue is known to occur with NRAO's internal default installation of Firefox for Red Hat 6 and lower). An easy workaround solution is to use the online CASA Docs at http://casa.nrao.edu/casadocs.
• fixvis uses the small angle approximation and may be incorrect for large phase shifts. Use tclean for phase center shifts during imaging when applicable.

### Observatory coordinate definition

• A bug was found in large mosaic cubes, where the signal-to-noise in the first pointing of a 'field' (for ALMA typically a corner) can be noticeably higher than in the rest of the cube. Because this bug affects ALMA Cycle-6 operations, separate CASA 5.4.0-70 (ALMA) and CASA 5.4.1-32 (VLA) versions are officially released, and we recommend users to download these new release versions. More details can be found in the Release Notes.
• For data from the Submillimeter Array (SMA), the coordinates of the SMA are incorrectly defined in CASA 5.3 and 5.4. This may affect the diurnal Earth rotation correction, which may be noticeable for observations with high spectral resolution (~1 km/s or less). A work-around is to edit the local Observatories table using the tb tool to adjust the height to 6.382248e+6 meters (i.e., the height above geocenter) in cases where an accuracy of order 0.1 km/s is required. CASA 5.2 and below were not affected by this, and CASA 5.5 will have the adjusted height included. The CASA team is in the process of verifying the definition of observatory coordinates in CASA.

### NFS mounted disks

• It is not recommended that you run CASA (e.g. have your data) on disks that are NFS mounted. It can be done, but in some cases the files will be NFS locked and this can crash CASA or its tasks. In this case, you have to restart CASA.
• If you receive messages like xvfb timeout you may try to clean out your /tmp folder, then restart CASA.

### Ipython:

• Due to changes in the new version of IPython, CASA 5.1 no longer includes the current directory in the PYTHONPATH. In the previous versions of CASA, to import a file named "filename.py" from the current directory, one would merely type in CASA: import filename

That no longer works because the current directory is not searched as a possible location for Python files. So, you must now add the current directory to the PYTHONPATH. This may be done by including in your .casa/init.py file a line calling the sys.path.append() function with two single quote characters (not a double quotation mark) as the argument: sys.path.append('')

Alternatively, after starting CASA, one could simply issue a command to update the path by typing
import sys
sys.path = [''] + sys.path
where the characters within the brackets are again two single quotes representing the empty string, which means "current directory" to Python.
• A bug in ipython (v. 5.1.0) can cause error messages like below. This error occassionally happens when using tget. This is an ipython issue when the databases are not synchronized in their line numbering and will start a new log file. The next ipython update will likely contain a fix.

ERROR! Session/line number was not unique in database. History logging moved to new session 318

CASA <2>:

ERROR! Session/line number was not unique in database. History logging moved to new session 318

• Files in the current directory with the same name as ipython files will cause errors like this error that occurs when a new.py file exists in the current directory:
AttributeError                            Traceback (most recent call last)
/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in enable_matplotlib(self, gui)
2945                 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
2946
-> 2947         pt.activate_matplotlib(backend)
2948         pt.configure_inline_support(self, backend)
2949

/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in activate_matplotlib(backend)
292     matplotlib.rcParams['backend'] = backend
293
--> 294     import matplotlib.pyplot
295     matplotlib.pyplot.switch_backend(backend)
296

/lib/python2.7/site-packages/matplotlib/pyplot.py in <module>()
21 from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike
22 from matplotlib import docstring
---> 23 from matplotlib.figure import Figure, figaspect
24 from matplotlib.backend_bases import FigureCanvasBase

/lib/python2.7/site-packages/matplotlib/figure.py in <module>()
16 import artist
17 from artist import Artist, allow_rasterization
---> 18 from axes import Axes, SubplotBase, subplot_class_factory
19 from cbook import flatten, allequal, Stack, iterable, is_string_like
20 import _image

/lib/python2.7/site-packages/matplotlib/axes.py in <module>()
8452
8453 # This is provided for backward compatibility
-> 8454 Subplot = subplot_class_factory()
8455
8456 docstring.interpd.update(Axes=martist.kwdoc(Axes))


## Calibration

#### statwt

• In statwt, using the parameter excludechans results in a conformance error if not all spw are included. This is a bug introduced during a period where statwt underwent major reform, and only occurs for CASA 5.4.0. There are three possible workaround solutions: (1) force to include all spw (with appropriate channel selection) in excludechans; (2) use CASA 5.4.1 or later; (3) use oldstatwt in CASA 5.4.0, which is identical to statwt in CASA 5.3 and earlier. For the last two options, the parameter excludechans (i.e., excluding the channels from the fit) is replaced by the parameter fitspw (i.e., including the channels to be fitted).
• In CASA 5.4, statwt will fail when the correlator integration time (INTERVAL) changes by more than 25% deviations from the median within an MS and statwt is run with timebin set to an integer value. As an interim solution for the most common case of timebin=1, once can set timebin=0.001s (this will be temporarily made default in CASA 5.4.1). If integer timebins are required, please select only parts of the MeasurementSet that have a uniform integration time for each execution of statwt. Multiple statwt executions may be needed to cover all MS rows with different integration (INTERVAL) values. In earlier versions of CASA, statwt did not support the use of integer values for timebin.

#### bandpass

• Currently, bandpass will not find good solutions if any correlation (including cross-correlation) in the data is completely flagged. As an interim solution one may split the unflagged data in a separate file and then perform bandpass

#### polcal

• Polarization position angle calibration poltype='X' or 'Xf' will be sensitive to any unmodelled position shift in the specified calibrator linear polarization model relative to the centroid location of total intensity (typically the phase center).  Excess phase due to the position shift will introduce a bias in the cross-hand phase calibration (which is the same as position angle calibration in the circular feed basis).   For this reason, it is best to use truly point-like (in all polarizations) calibrators, if possible, or accurate resolved models.

#### setjy

• Sometimes setjy does not properly overwrite a current model in the header of the ms (virtual scratch column). It is recommended to use delmod if a model exists and shall be overwritten.

#### plotcal (also check the matplotlib section for plotcal issues)

• When plotcal does not release a calibration table properly but keeps it locked, try to hit the quit button in the plotcal GUI first. Then redisplay the table.
• If you use plotcal on a caltable, it will then be put into the cache of the table system. If you try to re-run a solve (e.g. gaincal, bandpass, blcal, polcal) with the same caltable name and append=F to overwrite, then when it tries to delete the original caltable it cannot due to the cache. You will see an error like:

SEVERE  gaincal::Calibrater::solve
Caught exception: Invalid Table operation: SetupNewTable
(is in the table cache)

Either use a different output caltable name, or restart your CASA session (exit and start again) to free up the cache. You can use the rmtables task to delete tables.

• BPOLY solutions from bandpass must be plotted versus frequency and not channel. BPOLY and B solutions can only be overlaid if xaxis = 'freq'.
• GSPLINE and G solutions from gaincal can be overlaid, though this has not been extensively tested.
• Currently, plotcal needs to know the MS from which the caltable was derived to get indexing information. It does this using the name stored inside the table, which does not include the full path, but assumes the MS is in the same directory as the cal-table and has the same name it had when the caltable was created.
• If there are flagged channels at the lower edge of the data, say, 0~4, and you select a channel and 'locate' it from plotcal, it will give the incorrect channel number (will count from the first unflagged channel, not zero).

#### uvcontsub

• fitorder should be kept low (<= 1) unless the line band is relatively narrow compared to the fit bands. If the image rms markedly rises in the middle line channels after uvcontsub, fitorder should probably be lowered.
• fitorder > 0 does not work with solint > 'int'

#### mstransform

• SPW combination (combinespws=True) requires that all the SPWs selected have the same number of channels.

#### CASA cal library

• The CASA cal library (docallib=True in applycal, gaincal, bandpass, etc.) may exhibit problems when calibration is unavailable for a subset of MS spectral windows.  Use of spwmap to (transparently, harmless) supply nominal calibration for these spectral windows may help avoid this problem.  For antenna position corrections, try spwmap=[0] to relieve a variety of this problem.

#### VLA Switched Power

• In CASA v4.2.2 and higher, the weight calibration for EVLA switched power/Tsys corrections is still being investigated. Visibility corrections are ok. Since switched power calibration is not used by the EVLA pipeline (except for requantizer gain corrections, for which this problem is irrelevant), and since calwt=F remains the general recommendation, users should rely on statwt to generate appropriate data weights.

## Synthesis Imaging

#### clean

• The task clean is no longer being actively maintained; instead, tclean is now the recommended task for imaging.
• In the clean task, when the modelimage parameter is specified, and a previous model exists on disk with the name 'imagename.model', they are both added before prediction. This can happen if you restart clean to continue a deconvolution, but don't set modelimage='' before doing so.
• clean expects that all input polarizations are present. E.g. if you have RR and LL dual polarization data and you flagged parts of RR but not LL, clean will ignore both polarizations in slice. It is possible to split out a polarization product with split and image separately. But you will not be able to combine these part-flagged data in the uv-domain. Note: this is not the case for tclean, which now has a ‘pseudoI’ option to work with partially flagged data.
• Facets do not always work on Mac OS X. This is frequently due to a built in limit for the number of open files. Per default the setting is usually 256 (use ulimit -a to check). For facets in clean it might be required to set to a higher number, e.g. ulimit -n 2048. All commands must be issued from a bash shell outside CASA.
• Mask editing in interactive clean does not work reliably when the input MS is in reference frames other than LSRK or TOPO. Two incarnations of the problem were encountered so far: (a) when working in GEO, as on solar system objects, mask editing is impossible. (b) When working in BARY, masks created in CASA 4.0 cannot be edited when they are used as input masks for interactive clean in CASA 4.1. and higher.
• The Mac OS compilers are different to Linux compilers and some options are not available (e.g. opemmp and sincos). This causes some of the clean procedures, in particularly mosaicking, to be slower on MacOS than on Linux.

#### tclean

• Wideband mosaicing in tclean is still in its commissioning phase and not officially endorsed in CASA 5.4.0. Gridder='mosaic' will not give reliable spectral indices. Development/commissioning of wideband mosaicing is ongoing and will be available in a next CASA release. See page on Wide-Band Imaging for details.
• In tclean, the use of virtual model column for nterms > 1 and/or gridder = 'mosaic' may cause a bug that may crash CASA
• In tclean, the mosweight parameter for multi-field imaging has a new default value of mosweight=True as of CASA 5.4. This new mosweight default is invoked for any multi-field imaging, but currently has the unwanted behavior that it only shows up on the command line when using gridder=‘mosaic’. The new default setting of mosweight=True in tclean optimizes noise characteristics for Briggs/uniform weighting, but one should be aware that it has the following disadvantages:
• it may potentially cause memory issues for large VLA mosaics
• the major and minor axis of the synthesized beam may be up to ~10% larger than with mosweight=False

Please change to mosweight=False to get around these issues.

• In tclean, whenever the parameter savemodel is set to other than the default 'none', the following warning message will appear in the CASA logger:

WARN tclean::task_tclean:: 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.

If the "Saving model column" message is indeed missing, follow the workaround instructions: repeat the preceding tclean command (do not remove any of its products), setting niter=0, calcpsf=False, calcres=False, and mask='' (also make sure to leave the default restart=True). This operation, which starts from the .psf and .residual on disk is fairly fast and will force the saving of the model. One can easily check the status of the model by plotting it with ydatacolumn='model' in plotms. Note, however that the preceding model will appear until it is overwritten by a new model or delmod or clearcal is run.

One known occasion where this problem occurs is with the following usage of multi-scale clean (with usemask='user', deconvolver='multiscale' and savemodel='modelcolumn' or 'virtual'): if the residual image contains data-values outside the masked region that are higher than the clean threshold, the model is not saved and the above workaround solution has to be implemented.

#### imregrid

• Position-velocity (PV) images are not supported by imregrid, because their coordinate systems are nonstandard, lacking a direction coordinate and having a linear coordinate.

## Visualization

#### viewer

• The CASA viewer does not yet support the entire region shapes and parameters at this stage.
• Viewer may not properly open saved region files.
• With the new region panel being used now, It may be advisable to rename the \$HOME/.casa/viewer/rc file that stores previous configurations of the viewer.
• Viewer - labels are not shown - this can be caused by a conflict between an installed version of PGPLOT and the version of PGPLOT that comes with the non-root version of CASA. If you do have PGPLOT installed in a standard location (e.g. /usr/lib), you may try moving it aside and see if it resolves the problems. If you do encounter this problem, please report it to the CASA team.
• Some X11 settings can make the viewer unstable. We identified that the line
in /etc/X11/xorg.conf
is such a setting. If you don't need this line for aother applications, it would be better to have it removed.
• The viewer can only load MeasurementSets (MS) for which all spectral windows have the same channel width. If this is not the case, an ArrayColumn error will appear. To get around this, use SPLIT to place the spectral windows of interest in a separate MS, or try the table browser tool.
• When exiting CASA after using the viewer, a message similar to the following may appear: proc vtool_1EziEss1P2tH0PxJbGHzzQ is being killed. This is a cosmetic issue and can be ignored.
• For some OSs and window managers, parts of the display may be eclipsing interactive elements. We recommend to change the window manager styles for these cases.
• When multiple animators are open, it can happen that it is not possible to make them active, when the 'Images' animator is inactive. Active the 'Images' animator first to enable the other animators.
• MeasurementSet with sizes of tens of Gb may not visualize the full data set properly on all machines, which can give the appearance that part of the data is flagged.
• In plotms, the feature to add rows/columns is not working properly, and users have little control over where to put multi-plots. A solution for this is in progress and expected for an upcoming CASA release.

#### plotms

• In RedHat 7 we found that in some circumstances the vertical tab of tghe viewer appears on the right hand side instead of the left hand side. This eclipses the scrollbar and makes it difficult to use. To fix, add the following to the top of ~/.config/Trolltech.conf

[Qt]

style=GTK+

## Analysis

#### uvmodelfit

• When running uvmodelfit, the output componentlist does not contain the uncertainty in flux that the task calculates (and displays at the end of the fitting process).

## Simulation

#### simobserve / simanalyze

• When cleaning with a simulated MS, it should be considered best practice to declare the phasecenter parameter using the 'J2000 xx:xx:xx.xxx +xxx.xx.xx.xxx' notation to account for possible rounding errors that can create an offset in the image.
• corruption of simulated MS by an atmospheric phase screen is only available from the toolkit. simobserve and sm: Under some circumstances, running sm.setnoise and sm.corrupt, or simobserve with thermal noise, twice using the same project name, the noise can be applied a second time, doubling the noise level. Be sure to use different project names for creating different simulations with noise. See casaguides.nrao.edu for the latest simulation information

## Single Dish

#### general

• Difficulty in allocating memory to import/processing of Band 9 (fast-mapped, double-circle) data. Use high-performance machines as workaround.
• Please avoid using spectral window and channel selection by frequency range. It may occasionally fail. So far, this has only been reported on Mac OS but it may happen on Linux, too.

#### sdimaging

• sdimaging task may fail when more than several MSes are chosen as inputs (infiles) to create single output image. It is because the file descriptor opened by the task exceeds the limit defined by OSes. You can relax the limit of the number of open file descriptors by the command, e.g., ulimit -n 4096 . Note the typical number of file descriptors opened by the task is 35/MS.
• tsdimaging is still experimental. Correction of moving sources will not be correct.

#### plotprofilemap

• The task intermittently seg faults on Mac OS.

#### The following issues in the previous releases are fixed

• The sdbaseline task fails with blmode = 'apply' and selected data contains SPWs with different number of channels.
• Spectra with only one polarization cannot be calibrated in sdcal and sdgaincal.
• The importnro task fails when data contains a disabled array.