Skip to main content

Why are the fluxes in my CASA 5.1 simulated mosaic image incorrect, and how can I fix it? - Knowledgebase / Cycle 6 - ALMA Science

Why are the fluxes in my CASA 5.1 simulated mosaic image incorrect, and how can I fix it?

Authors list
We have recently identified a bug in CASA 5.1 which seriously affects mosaic imaging of simulated data.  Earlier CASA releases are not affected by the issue.  The simulated visibilities themselves are not adversely affected, nor is imaging a single field of a simulated mosaic in non-mosaic mode (gridder='standard' in TCLEAN) adversely affected. Specifically, images of simulated data made with gridder='mosaic' in TCLEAN will be affected. The manifestation of the issue is that the apparent brightness of sources in the image can be wrong in a position-dependent way across a mosaic by factors of a few or more. Mosaic imaging of real VLA or ALMA data is not affected by this issue. 

This issue was fixed in CASA 5.3. If you need to use CASA 5.1, the workaround is to remove the POINTING table from the MS. The recommended method for doing so is:

tb.open('"msName"/POINTING', nomodify = False)
a = tb.rownumbers()
tb.removerows(a)
tb.close()

This sequence should take of order a second to execute. If it takes longer you may have a problem with a table lock.

Detailed Information: the mosaic imaging bug is only triggered in the CASA 5.1.* releases, when the recently added internal VI2 framework is used, and when the cadence of updates in the pointing table identically matches the integration time of the data. For real ALMA data the cadence of pointing information (48 ms) is considerably higher than the shortest available integration times (~1 second), so the bug is not triggered.  Similarly the pointing information for the VLA antennas is updated much more quickly than the shortest integration times for visibilities. Measurement Sets created by simobserve(), however, do trigger it because the simulated pointing table and visibility integration times are exactly synchronized.