Skip to main content

CASA Operational Configuration Package

Project description

casaconfig

Runtime data necessary for CASA operation.

  • Latest documentation Documentation Status
  • Stable documentation Documentation Status

Release Instructions

  1. Create a release branch with a version name (ie v1.6.2)
  2. Ensure the version number in setup.py on the branch is set correctly
  3. Create a tag of the release branch (ie v1.6.2-1)
  4. Github Action runs automatically to publish a pip package to pypi

Installation

$: pip install casaconfig

Usage

The Python package installs with an empty __data__ subdirectory. The contents must be populated by calling pull_data() to download the tables from the Github repo data folder.

from casaconfig import pull_data
pull_data()

Within this folder is a stale version of the IERS measures tables needed for accurate measurement. Generally users will want to update to the latest measures data and keep current each day.

from casaconfig import measures_update
measures_update()

A default config.py necessary for CASA operation is included in this package. Users may make their own local copy with any desired modifications.

from casaconfig import write_default_config
write_default_config('~/.casa/config.py')
$: cat ~/.casa/config.py

import os, time, pkg_resources

# list of paths where CASA should search for data subdirectories
datapath = [pkg_resources.resource_filename('casaconfig', '__data__/')]

# location of required runtime measures data, takes precedence over location(s) in datapath list
measurespath = os.path.expanduser("~/.casa/measures")

# automatically update measures data if not current (measurespath must be user-writable)
measures_update = True

# log file path/name
logfile='casalog-%s.log' % time.strftime("%Y-%m-%d", time.localtime())

# do not create a log file when True, If True, then any logfile value is ignored and there is no log file
nologfile = False

# print log output to terminal when True (in addition to any logfile and CASA logger)
log2term = False

# do not start the CASA logger when True
nologger = False

# avoid starting GUI tools when True. If True then the CASA logger is not started even if nologger is False
nogui = False

# the IPython prompt color scheme. Must be one of "Neutral", "NoColor", "Linux" or "LightBG", default "Neutral"
# if an invalid color is given a warning message is printed and logged but CASA continues using the default color
colors = "LightBG"

# startup without a graphical backend if True
agg = False

# attempt to load the pipeline modules and set other options appropriate for pipeline use if True
# when pipeline is True then agg will be assumed to be true even if agg is set to False here or on the command line
pipeline = False

# create and use an IPython log using the iplogfile path 
iplog = True

# IPython log path/name used when iplog is True
iplogfile = 'ipython-%s.log' % time.strftime("%Y-%m-%d", time.localtime())

# allow anonymous usage reporting
telemetry_enabled = True

# location to place telemetry data prior to reporting
telemetry_log_directory = os.path.expanduser("~/.casa/telemetry")

# maximum size of telemetry recording
telemetry_log_limit = 1650

# telemetry recording size that triggers a report
telemetry_log_size_interval = 30

# telemetry recording report frequency
telemetry_submit_interval = 20

# allow anonymous crash reporting
crashreporter_enabled = True

# include the users local site-packages in the python path if True. 
# normally these are excluded to avoid any conflicts with CASA modules
user_site = False

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

casaconfig-0.0.49.tar.gz (12.4 kB view details)

Uploaded Source

File details

Details for the file casaconfig-0.0.49.tar.gz.

File metadata

  • Download URL: casaconfig-0.0.49.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

File hashes

Hashes for casaconfig-0.0.49.tar.gz
Algorithm Hash digest
SHA256 5f3e7f87b4d1bb557c1e23fa8dddb205cd5f5523bd7ab2fd5e7718fcea9a2a64
MD5 dc8c8d5583dcdf69e2ce4fb48a292f81
BLAKE2b-256 a21703c4c805c0e92c37de7b002c78c825c44d1b8c864180fefbefb595965322

See more details on using hashes here.

Supported by

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