This is a pre-alpha, prototype package. It is not useful for external users, and all applications being built with it are currently in various phases of prototyping.
Introduction
For some time, the GUIs provided by CASA have been based upon Qt. While Qt works well, the compiled nature of C++ code made building and distributing the GUIs for each architecture a hurdle. This in turn caused the GUIs we developed to tend toward large, monolithic applications which were difficult to integrate and control from Python. We first used DBus to control our Qt application. Qt provides a nice interface to DBus, but it became clear that DBus development had slowed and that DBus was unlikely to make major inroads outside of the Linux Desktop. At that point, we switched to gRPC. gRPC supports a variety of platforms and languages. It also has significant support behind it. However despite the improved technology, it was still difficult to incorporate a scripting interface which allowed a stand-alone C++/Qt process to be controlled by a separate Python process at a low enough level to be practically useful for control at the level of granularity we desire.
Similar to the CASA visualization development experience, the CASA framework as a whole has experienced the ups and downs of the large C++ development experience. Experience with a Python parallelization trade study which CASA conducted indicated that the loss of CPU throughput in a switch from C++ to pure Python can be made up for in gains made in the selection of parallelization framework like Dask along with just in time compilation with something like Numba. In addition to the focus of the trade study, additional gains are possible by mixing in GPU resources.
These experiences have led CASA to begin a multi-year transition from being a large C++ framework attached to Python to being a pure-Python framework for processing radio astronomy data. This package is visualization portion of that transition.
After an abbreviated trade study where we considered a few pure-Python visualization frameworks, we selected Bokeh as the basis for creating new visualization infrastructure for CASA. The choice of Bokeh was made based upon its extensibility, its community support (including NumFocus), and its limited external dependencies (just JavaScript and a modern web browser). A stand-alone application can be created by using the Bokeh server. These options allow for GUIs to be created and used interactively from a Python command line session, as a stand-alone mini web server, integrated into a desktop application (using Electron) or as part of a Jupyter Notebook.
Beyond this architectural flexibility, our intention is to create a toolbox of Bokeh based components which can be combined to create a collection of visualization tools which can be used in each of these settings (Python command line, Notebook and desktop application) so that we maintain smaller, reusable tools instead of very large monolithic applications. Interactive clean is our path-finder application of this approach and is currently the only example available.
Installation
casagui is available from PyPI.
Interactive Clean
Requirements
Python 3.8 or greater
casatools and casatasks built from CAS-13743
Install
bash$ casa-CAS-13743-2-py3.8/bin/pip3 install casagui
Caveats
Remote access is slow, later a desktop application will be developed (using the same Bokeh toolbox) to improve this situation, but for now if running remotely, it is best to pre-start your preferred browser on the host where you will be running interactive clean. For example
bash$ export BROWSER=/opt/local/bin/firefoxbash$ $BROWSER > /dev/null 2>&1 &
Konqueror does not work. We only test with Chrome and Firefox.
node.jsversion 14.0.0 or higher is required
Simple Usage Example
A simple example of the use of interactive clean is:
CASA <1>: from casagui.apps import InteractiveClean
CASA <2>: InteractiveClean( vis=ms_path, imagename=img, imsize=512, cell='12.0arcsec',
specmode='cube', interpolation='nearest', nchan=5, start='1.0GHz',
width='0.2GHz', pblimit=-1e-05, deconvolver='hogbom', threshold='0.001Jy',
niter=50, cycleniter=10, cyclefactor=3, scales=[0,3,10] )( )
In general, the InteractiveClean constructor takes a subset of parameters accepted
by tclean.
All of the masks used in running interactive clean are available from the
InteractiveClean object. To get access to the list of masks, you would create
the object as a separate statement:
CASA <2>: ic = InteractiveClean( vis=ms_path, imagename=img, imsize=512, cell='12.0arcsec',
specmode='cube', interpolation='nearest', nchan=5, start='1.0GHz',
width='0.2GHz', pblimit=-1e-05, deconvolver='hogbom', threshold='0.001Jy',
niter=50, cycleniter=10, cyclefactor=3, scales=[0,3,10] )( )
CASA <2>: ic( )
CASA <3>: print(ic.masks( ))
Visibility Plotting: MsRaster
Install
See https://casagui.readthedocs.io/en/latest/applications/ms_raster.html#installation
Simple Usage Example
A simple example of the use of MsRaster to create visibility raster plots:
>>> from casagui.apps import MsRaster >>> msr = MsRaster(ms=myms) >>> msr.plot() # default time vs. baseline plot >>> msr.show() # open plot in browser tab
Release files for casagui 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| casagui-0.4.3.tar.gz | 9.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| casagui-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 MB
Release files / casagui-0.4.3.tar.gz
| Download URL | casagui-0.4.3.tar.gz |
|---|---|
| Size | 9.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3fdb2e9f795516a86f22b9793e41b1174874d3828592f912db5f64a87704ade
|
|
BLAKE2b-256 checksum How to use checksums |
9813908ed37defd9d8c7fa0e769e03f42814ac3afbe0b01964043810571c2575
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2025.
Transparency logRelease files / casagui-0.4.3-py3-none-any.whl
| Download URL | casagui-0.4.3-py3-none-any.whl |
|---|---|
| Size | 9.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
387b9335171fec2e756e0fe306479d621567a8a5bc822ff19c2e7109c76aeba1
|
|
BLAKE2b-256 checksum How to use checksums |
bbb548f17fb7802ea9d3c64e8b2c03c461ea3e02d20519600e6604a1ee414f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2025.
Transparency log