Skip to main content

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/firefox

    • bash$ $BROWSER > /dev/null 2>&1 &

  • Konqueror does not work. We only test with Chrome and Firefox.

  • node.js version 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)

Source distribution for casagui 0.4.3
File Size Uploaded
casagui-0.4.3.tar.gz 9.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for casagui 0.4.3
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.96

2 release files

0.3.87

2 release files

0.3.81

2 release files

0.3.79

2 release files

0.3.78

2 release files

0.3.74

2 release files

0.3.73

2 release files

0.3.72

2 release files

0.3.71

2 release files

0.3.57

2 release files

0.3.56

2 release files

0.3.55

2 release files

0.3.54

2 release files

0.3.53

2 release files

0.3.52

2 release files

0.3.51

2 release files

0.3.50

2 release files

0.3.49

2 release files

0.3.48

2 release files

0.3.47

2 release files

0.3.46

2 release files

0.3.45

2 release files

0.3.44

2 release files

0.3.43

2 release files

0.3.42

2 release files

0.3.41

2 release files

0.3.40

2 release files

0.3.39

2 release files

0.3.38

2 release files

0.3.37

2 release files

0.3.19

2 release files

0.3.18

2 release files

0.3.17

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.59

2 release files

0.2.58

2 release files

0.2.56

2 release files

0.2.55

2 release files

0.2.54

2 release files

0.2.51

2 release files

0.2.50

2 release files

0.2.49

2 release files

0.2.48

2 release files

0.2.47

2 release files

0.2.45

2 release files

0.2.44

2 release files

0.2.43

2 release files

0.2.38

2 release files

0.2.37

2 release files

0.2.36

2 release files

0.2.35

2 release files

0.2.30

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.27

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.24

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page