Skip to main content

A two-channel deconvolution method with Starlet regularization

Project description

STARRED: STARlet REgularized Deconvolution

pipeline status coverage report Python 3.11 License: GPL v3 DOI pypi

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.

The main Documentation can be found here

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. Refer to the installation page of the JAX documentation.

Requirements

STARRED requires the following Python packages:

  • astropy
  • dill
  • jax
  • jaxlib
  • jaxopt
  • matplotlib
  • numpy
  • scipy
  • optax
  • tqdm
  • h5py

Additionnaly, the following package needs to be installed if you want to sample posterior distribution:

  • emcee
  • mclmc

Other optional dependencies are required for specific functionalities:

  • scikit-image for the reconstruction of the narrow PSF from a PSF model.
  • pyregion for the reading of DS9 region files.

Example Notebooks and Documentation

We provide several notebooks to help you get started.

Start here to grasp the basic STARRED workflow.

More example notebooks going in more detail of how the internals work can be found in the notebooks directory:

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. STARRED is now fully integrated into lightcurver,
which helps you producing light curves by preparing your data in the correct format to be analyzed by STARRED and ensure accurate epoch-to-epoch photometric calibration.

Finally, the full documentation can be found here and a video presentation of STARRED is accessible on Youtube.

STARRED users community

If you want to join the STARRED users community on Slack to ask questions, propose future developments or share your latest results, please send an email to this address to get an invitation link.

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


Download files

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

Source Distribution

starred_astro-1.4.8.tar.gz (150.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

starred_astro-1.4.8-py3-none-any.whl (163.3 kB view details)

Uploaded Python 3

File details

Details for the file starred_astro-1.4.8.tar.gz.

File metadata

  • Download URL: starred_astro-1.4.8.tar.gz
  • Upload date:
  • Size: 150.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for starred_astro-1.4.8.tar.gz
Algorithm Hash digest
SHA256 f40ce39cc660a8334bff3fd8fac4437abca44957b220f75aa55dc1e9175c3daf
MD5 d2015fe39fce45b0ab0d0d51badb6e0b
BLAKE2b-256 f74422a7c65bd07bfcd57863df1d8b7c9f989d467b35696b05a83482630dbd0f

See more details on using hashes here.

File details

Details for the file starred_astro-1.4.8-py3-none-any.whl.

File metadata

  • Download URL: starred_astro-1.4.8-py3-none-any.whl
  • Upload date:
  • Size: 163.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for starred_astro-1.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4e58c2b52a3e09cabd84bcff1a25889fd70e9a4cd9f2d8f0230732fd720c757b
MD5 5ef18a3ce13e5affb06e79d1aad14956
BLAKE2b-256 5194d3c16c804d08dcd0ee327290a4b5cb913d768177394a245a2509cc740975

See more details on using hashes here.

Supported by

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