A two-channel deconvolution method with Starlet regularization
Project description
STARRED: STARlet REgularized Deconvolution
STARlet REgularized Deconvolution (STARRED) is a Python deconvolution method powered by Starlet regularization and JAX automatic differentiation. It uses a Point Spread Function (PSF) narrower than the original one as kernel.
Installation
Through PyPI
STARRED releases are distributed through the Python Package Index (PyPI). To install the latest version use pip
:
$ pip install starred-astro
Through Anaconda
We provide an Anaconda environment that satisfies all the dependencies in starred-env.yml
.
$ git clone https://gitlab.com/cosmograil/starred.git
$ cd starred
$ conda env create -f starred-env.yml
$ conda activate starred-env
$ pip install .
In case you have an NVIDIA GPU, this should automatically download the right version of JAX as well as cuDNN. Next, you can run the tests to make sure your installation is working correctly.
# While still in the STARRED directory:
$ pytest .
Manually handling the dependencies
If you want to use an existing environment, just omit the Anaconda commands above:
$ git clone https://gitlab.com/cosmograil/starred
$ cd starred
$ pip install .
or if you need to install it for your user only:
$ python setup.py install --user
STARRED runs much faster on GPUs, so make sure you install a version of JAX that is compatible with your version of CUDA and cuDNN:
$ pip install "jax[cuda11_cudnn86]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
Requirements
STARRED requires the following Python packages:
astropy
dill
jax
jaxlib
jaxopt
matplotlib
numpy
scipy
optax
pyregion
tqdm
h5py
Additionnaly, the following package needs to be installed if you want to sample posterior distribution:
emcee
mclmc
Example Notebooks and Documentation
We provide several notebooks to help you get started.
More example notebooks going in more detail of how the internals work can be found in the notebooks directory:
- Ground-based narrow PSF generation
- Ground-based joint deconvolution
- Another ground-based joint deconvolution
- JWST PSF generation and deconvolution
- DES2038 joint deconvolution
- HST PSF reconstruction
- JWST PSF reconstruction
The mathematical formalism along with further examples are also presented in Millon et al. (2024). All the examples and tests presented in this paper can be reproduced from this repository:
You can also run STARRED from the command line by following these instructions.
Finally, the full documentation can be found here and a video presentation of STARRED is accessible on Youtube.
Attribution
If you use this code, please cite Michalewicz et al. 2023 and Millon et al. 2024 as indicated in the documentation.
License
STARRED is a free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.
STARRED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details (LICENSE.txt).
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 Distribution
File details
Details for the file starred_astro-1.4.3.tar.gz
.
File metadata
- Download URL: starred_astro-1.4.3.tar.gz
- Upload date:
- Size: 94.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063d9dab3b774a56f733e35fe4f4f4ac47d6b3429e8f962c9baa5c7a6494e95a |
|
MD5 | 9d187a5c3b75986b4d57ed36a9439a46 |
|
BLAKE2b-256 | f252acce1361431e7b4b0f66e3b343712736d92370ec343cb1d93f0ca8699561 |
File details
Details for the file starred_astro-1.4.3-py3-none-any.whl
.
File metadata
- Download URL: starred_astro-1.4.3-py3-none-any.whl
- Upload date:
- Size: 110.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90c066406bad92e7f2502f22b6b5dc619212b537cda8c298380f26b3192621dd |
|
MD5 | b718f92f009e35684157dee164878bfc |
|
BLAKE2b-256 | 8656e620d018099ecfd19a14f7b645d259e6cc82781e64859f73760be9fcbe2a |