Skip to main content

STScI tools and algorithms used in calibration pipelines

Project description

STCAL

Documentation Status

CI

codecov

STScI Calibration algorithms and tools.

STScI Logo

STCAL requires Python 3.9 or above and a C compiler for dependencies.

Linux and MacOS platforms are tested and supported. Windows is not currently supported.

If installing on MacOS Mojave 10.14, you must install into an environment with python 3.9. Installation will fail on python 3.10 due to lack of a stable build for dependency opencv-python.

STCAL is intended to be used as a support package for calibration pipeline software, such as the JWST and Roman calibration pipelines. STCAL is a separate package because it is also intended to be software that can be reused by multiple calibration pipelines. Even though it is intended to be a support package for calibration pipelines, it can be installed and used as a stand alone package. This could make usage unwieldy as it is easier to use STCAL through calibration software. The main use case for stand alone installation is for development purposes, such as bug fixes and feature additions. When installing calibration pipelines that depend on STCAL this package automatically gets installed as a dependency.

Installation

The easiest way to install the latest stcal release into a fresh virtualenv or conda environment is

pip install stcal

Detailed Installation

The stcal package can be installed into a virtualenv or conda environment via pip. We recommend that for each installation you start by creating a fresh environment that only has Python installed and then install the stcal package and its dependencies into that bare environment. If using conda environments, first make sure you have a recent version of Anaconda or Miniconda installed. If desired, you can create multiple environments to allow for switching between different versions of the stcal package (e.g. a released version versus the current development version).

In all cases, the installation is generally a 3-step process:

  • Create a conda environment
  • Activate that environment
  • Install the desired version of the stcal package into that environment

Details are given below on how to do this for different types of installations, including tagged releases and development versions. Remember that all conda operations must be done from within a bash/zsh shell.

Installing latest releases

You can install the latest released version via pip. From a bash/zsh shell:

conda create -n <env_name> python
conda activate <env_name>
pip install stcal

You can also install a specific version, for example stcal 1.3.2:

conda create -n <env_name> python
conda activate <env_name>
pip install stcal==1.3.2

Installing the development version from Github

You can install the latest development version (not as well tested) from the Github master branch:

conda create -n <env_name> python
conda activate <env_name>
pip install git+https://github.com/spacetelescope/stcal

Installing for Developers

If you want to be able to work on and test the source code with the stcal package, the high-level procedure to do this is to first create a conda environment using the same procedures outlined above, but then install your personal copy of the code overtop of the original code in that environment. Again, this should be done in a separate conda environment from any existing environments that you may have already installed with released versions of the stcal package.

As usual, the first two steps are to create and activate an environment:

conda create -n <env_name> python
conda activate <env_name>

To install your own copy of the code into that environment, you first need to fork and clone the stcal repo:

cd <where you want to put the repo>
git clone https://github.com/spacetelescope/stcal
cd stcal

Note: python setup.py install and python setup.py develop commands do not work.

Install from your local checked-out copy as an "editable" install:

pip install -e .

If you want to run the unit or regression tests and/or build the docs, you can make sure those dependencies are installed too:

pip install -e ".[test]"
pip install -e ".[docs]"
pip install -e ".[test,docs]"

Need other useful packages in your development environment?

pip install ipython jupyter matplotlib pylint ipdb

Contributions and Feedback

We welcome contributions and feedback on the project. Please follow the contributing guidelines to submit an issue or a pull request.

We strive to provide a welcoming community to all of our users by abiding with the Code of Conduct.

If you have questions or concerns regarding the software, please open an issue at https://github.com/spacetelescope/stcal/issues.

Unit Tests

Unit tests can be run via pytest. Within the top level of your local stcal repo checkout:

pip install -e ".[test]"
pytest

Need to parallelize your test runs over all available cores?

pip install pytest-xdist
pytest -n auto

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

stcal-1.4.4.tar.gz (669.8 kB view details)

Uploaded Source

Built Distributions

stcal-1.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (706.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

stcal-1.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (681.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

stcal-1.4.4-cp310-cp310-macosx_10_9_x86_64.whl (349.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

stcal-1.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (710.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

stcal-1.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (684.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

stcal-1.4.4-cp39-cp39-macosx_10_9_x86_64.whl (350.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file stcal-1.4.4.tar.gz.

File metadata

  • Download URL: stcal-1.4.4.tar.gz
  • Upload date:
  • Size: 669.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for stcal-1.4.4.tar.gz
Algorithm Hash digest
SHA256 80d9fa8b3966a4df0de1b9c53962b8ebd7bec4742b11cac9e7b9e9da606c340c
MD5 bd766c9b337b04605ea776a6fd23d848
BLAKE2b-256 6c8305406bdb6fee2726e8fa8df3c7c92f8ad7c07c4bf6b1336cf1d8f688099f

See more details on using hashes here.

File details

Details for the file stcal-1.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for stcal-1.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5c510847c25002d4a2eea111e95f192d33f4d5a8bfb4acabeffcf3c865b657c1
MD5 0e09a16fd6835b66f0c6f37c91fa9a59
BLAKE2b-256 7cff7f52b436f8ffde3fa499dea4933d2791cc10f94f9991caff419ecc406180

See more details on using hashes here.

File details

Details for the file stcal-1.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for stcal-1.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 cf34f74e6c357cc25c2f00e2d1b5a9db969c2d366b55e90d7d6f02d42437c7f3
MD5 99193f7884ec3d5c55d4be226cd4b244
BLAKE2b-256 ae9fe70f0be2348f1c4bdedf5a7166b4e1b410f1c1a7923c9e88df774042d446

See more details on using hashes here.

File details

Details for the file stcal-1.4.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for stcal-1.4.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7c08a2d61b1c5892c8497882a4bba33e8fd6e9aaa13b8c0dce55bf2b0b986819
MD5 13997dbf625685d90508ff3358822a51
BLAKE2b-256 b55bb969f0826279a39e1dd16882293d0c604501c538055d8c552b7731d8dcdd

See more details on using hashes here.

File details

Details for the file stcal-1.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for stcal-1.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a08ae99c6adead342553a6fe336cb7c16a5fde4caac9bb36f2b2402f877586a4
MD5 c56c441b6bef5775a451e828f5fbaf23
BLAKE2b-256 8bc450b250e7f2b85cb14d7c8f3c53d2c615db9bace54119260812cf25affc1d

See more details on using hashes here.

File details

Details for the file stcal-1.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for stcal-1.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 9c4174950601dd7756675f8a5d900a0fb47b4b61f8e56f8fd1665c5e917c8432
MD5 337eb4437df9da97bfed29a0db7243be
BLAKE2b-256 ec85d38280ca622f321b1749a05c36363be8e7d25f1a02962edbf680ef553802

See more details on using hashes here.

File details

Details for the file stcal-1.4.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for stcal-1.4.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d59d2219d764ac8a8ec360a3a545a09ca7881dd270caf2fbd3838c88559daf0
MD5 4610153425a4cc631c2b22d6a947e4e4
BLAKE2b-256 a9f0b75808f3eff27c3488a1025f1622707c10ee348ce741ff61fca7ff290537

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page