STScI tools and algorithms used in calibration pipelines
Project description
STCAL
STScI Calibration algorithms and tools.
[!IMPORTANT] STCAL requires Python 3.10 or above and a C compiler for dependencies.
[!IMPORTANT] Linux and MacOS platforms are tested and supported. Windows is not currently supported.**
[!WARNING] Installation on MacOS Mojave 10.14 will fail 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
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
Built Distributions
Hashes for stcal-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87446e19558c79e7243f74054be68f9c96ee3b3f1552ba6caa72133c0bcddd38 |
|
MD5 | cdab282cac02a3cc61e9406d1b511639 |
|
BLAKE2b-256 | 8a19de172df3aa862d20622e6f8237437e2e8acddb403491b509fb257d46aa5c |
Hashes for stcal-1.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4006708919818b63320d83d9608bf658d346db959649911eb1fe8fa487943408 |
|
MD5 | f47077893b3c4415cb4138963b50a72e |
|
BLAKE2b-256 | 949d9abc5ca35bfac1ccb8b38c7290836a8251b8a462694fc4e6a7496071769a |
Hashes for stcal-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d82b3a926b3f24927f9aaa9786d4c50f7f5d11b55f77c48001665434bc0cba5c |
|
MD5 | 76c8b1eb24719e0c4c827d181e4eca1b |
|
BLAKE2b-256 | 2c8a397ceb4242def81a60751f133380f69f6f754550337bbd8e04d67ea145df |
Hashes for stcal-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb476fbb7a7e19d307c4e8de65d6bb26dc0823ad9671c1ee0f15de46c97f3d1 |
|
MD5 | 87ecda26af991dedbf7db3f8b054af34 |
|
BLAKE2b-256 | 6a9fab4aff4d2979d541647796b95ce3cdf70f15c3bfcac07a19466481f9a74e |
Hashes for stcal-1.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 078966075f032243508eafccf4286966070f7446533eff6604317f18ce4dbb36 |
|
MD5 | eaae603ee0d64beb0a18aab344d752f9 |
|
BLAKE2b-256 | 79c2e9b641295a5011e644bc36a7e1be86f7daf53f7296d7d1d77865f6282f0b |
Hashes for stcal-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a808cae3446f3964b37f99057726e6411d6ae1eda536df200b11ac142de717e3 |
|
MD5 | 0ea0e6c89ad4482e0729cc5ff7668d6a |
|
BLAKE2b-256 | a5e314bec5f38a3ec2e62cd9c189cbebdb0909e2674f7a558c28a515ab7ed132 |
Hashes for stcal-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ff7463910170697df040f76b02a7080219f0ab8f2923b35425533e9f04c4fe7 |
|
MD5 | f1b7654266a03a140c6cff3b48d2111b |
|
BLAKE2b-256 | beeae233a5cb937ef9e81891c7563f44b53250795983ea92ee0343b49974775d |
Hashes for stcal-1.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73e6e83f4c8f6041f06574b2622f4132ed510740bc8f5ab23983479a80902737 |
|
MD5 | 1bd7b5cb5e3585c5eda041d59e7fc178 |
|
BLAKE2b-256 | 8ef2a9136169d62f39bf93ba1e1eccfe13ef234eaaa2b5c35d9ca8f14d9b428f |
Hashes for stcal-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8548cd1d1c77e2e1de2ca309c241637459974e1879f5999713680d96ed387e83 |
|
MD5 | 7b673d1ddfb5fe3b86689e51b9db724c |
|
BLAKE2b-256 | add639b1310232af8d14aae34ff2dff5da10d1723c24b6c87d2e95d0a47524a1 |