Skip to main content

Use CASA6 to read visibilities from Measurement Sets

Project description

visread

Python package Documentation Status

A minimal tool built on CASA6 to read visibilities directly from calibrated CASA Measurement Sets

Introduction

The purpose of this package is to provide a quick and easy read("myFile.ms") function to load visibilities from a calibrated CASA Measurement Set file into memory in a Python program. You may wish to plot the baseline distributions, analyze the visibilities themselves, or synthesize images from them using software like MPoL.

The visibilities are returned as an object.

Code Example

import visread
vis = visread.read("myFile.ms")
print(vis)

More information is provided in the Documentation.

Currently, there is only one primary visibility container for spectral line measurement sets, whose attributes are driven by the development needs of the MPoL project. A set of single-channel continuum visibilities is just a subset of this.

If you identify and configure an additional visibility container (i.e., polarization), pull requests are welcome.

Installation

Because this package relies on CASA6, it is unfortunately subject to the stringent package requirements currently imposed by the modular CASA environment. As of January 2021, these are Python=3.6 and libgfortran3. This means that CASA6 and by extension this package will not work on Python 3.7, 3.8, or 3.9. More information on these requirements is here. Beyond this CASA dependency, the visread package itself is not tied to Python=3.6, so as the CASA requirements advance, so too will this package.

Following standard practice, it's recommended that you first create and activate a Python virtual environment specific to your current project whatever it may be. The CASA docs explicitly recommend using venv instead of a conda environment (or a virtualenv), though you may find success in some instances.

In the following example of a virtual environment, the first line uses the venv tool to create a subdirectory named venv, which hosts the virtual environment files. The second line activates this environment in your current shell session. Keep in mind that this is something you'll need to do for every shell session, since the point of virtual environments is to create an environment specific to your project.

$ python3 -m venv venv
$ source venv/bin/activate

Then you can install

$ pip install --extra-index-url https://casa-pip.nrao.edu/repository/pypi-casa-release/simple visread

Development

If you're interested in extending the package, you can install it locally for development

$ pip install --extra-index-url https://casa-pip.nrao.edu/repository/pypi-casa-release/simple -e .[dev]

If you make a useful change, please consider submitting a pull request to the github repo!

Lineage

The code in this package is fairly simple, but it is also built using CASA knowledge gained from a number of collaborators, who are credited in the CONTRIBUTORS.md file. You may also be interested in investigating the vis_sample and UVHDF5 packages, as they provide some similar capabilities with additional functionality.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visread-0.0.1.dev4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

visread-0.0.1.dev4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file visread-0.0.1.dev4.tar.gz.

File metadata

  • Download URL: visread-0.0.1.dev4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for visread-0.0.1.dev4.tar.gz
Algorithm Hash digest
SHA256 1e6153e0d70976780400706640fe61ce8b442bd98d63cfd09d2a46f0f307b05e
MD5 1603c01713ede7659f573ef44e411662
BLAKE2b-256 6fe2d5d25ac066e866a217d95a903dc698c75fcc2513602aba3110770a597796

See more details on using hashes here.

File details

Details for the file visread-0.0.1.dev4-py3-none-any.whl.

File metadata

  • Download URL: visread-0.0.1.dev4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for visread-0.0.1.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 a70b24d764a8e61850d2ee18b5407f388c14693936f333fc29c738eaae0cadc3
MD5 aafcda894a3ac3d53ff75656b05254e9
BLAKE2b-256 78e8d0b1e2073cea5936e703da05dd5e9671a2d489138143cba0be240469379e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page