starred-astro


Namestarred-astro JSON
Version 1.4.3 PyPI version JSON
download
home_pageNone
SummaryA two-channel deconvolution method with Starlet regularization
upload_time2024-06-01 17:47:46
maintainerNone
docs_urlNone
authorMartin Millon, Frédéric Dux
requires_pythonNone
licenseNone
keywords deconvolution astronomy starlet image processing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # STARRED: STARlet REgularized Deconvolution 

[![pipeline status](https://gitlab.com/cosmograil/starred/badges/main/pipeline.svg)](https://gitlab.com/cosmograil/starred/commits/main)
[![coverage report](https://gitlab.com/cosmograil/starred/badges/main/coverage.svg)](https://cosmograil.gitlab.io/starred/coverage/)
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05340/status.svg)](https://doi.org/10.21105/joss.05340)
[![pypi](https://img.shields.io/pypi/v/starred-astro.svg)](https://pypi.org/project/starred-astro/)

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`:

```bash
$ pip install starred-astro
```

### Through Anaconda
We provide an Anaconda environment that satisfies all the dependencies in `starred-env.yml`. 
```bash
$ 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.

```bash
# 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:
```bash
$ git clone https://gitlab.com/cosmograil/starred
$ cd starred 
$ pip install .
```

or if you need to install it for your user only: 
```bash
$ 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: 
``` bash 
$ 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.

> [Start here to grasp the basic STARRED workflow](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/start_here.ipynb).

More example notebooks going in more detail of how the internals work can be found in the [notebooks](https://gitlab.com/cosmograil/starred/-/tree/main/notebooks/more_examples) directory: 
* [Ground-based narrow PSF generation](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/1_WFI%20narrow%20PSF%20generation.ipynb)
* [Ground-based joint deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/2_DESJ0602-4335%20joint%20deconvolution.ipynb)
* [Another ground-based joint deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/3_Another%20lensed%20quasar%20-%20joint%20deconvolution.ipynb)
* [JWST PSF generation and deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/4_JWST%20deconvolution.ipynb)
* [DES2038 joint deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/5_DES2038_from_WFI_joint_deconvolution.ipynb)
* [HST PSF reconstruction](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/6_HST-PSF%20reconstruction.ipynb)
* [JWST PSF reconstruction](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/7_JWST-PSF_reconstruction.ipynb)

The mathematical formalism along with further examples are also presented
in [Millon et al. (2024)](https://arxiv.org/abs/2402.08725). All the examples and tests presented in this paper can be
reproduced from this repository:

* [STARRED Examples](https://gitlab.com/cosmograil/starred-examples)

You can also run STARRED from the command line by following
these [instructions](https://gitlab.com/cosmograil/starred/-/tree/main/scripts?ref_type=heads).

Finally, the full documentation can be found [here](https://cosmograil.gitlab.io/starred/) and a video presentation of
STARRED is accessible on [Youtube](https://www.youtube.com/watch?v=04FKFMBpSlo).

## Attribution

If you use this code, please cite [Michalewicz et al. 2023](https://joss.theoj.org/papers/10.21105/joss.05340)
and [Millon et al. 2024](https://arxiv.org/abs/2402.08725)
as indicated in the [documentation](https://cosmograil.gitlab.io/starred/citing.html).

## 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](LICENSE)).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "starred-astro",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "deconvolution, astronomy, starlet, image processing",
    "author": "Martin Millon, Fr\u00e9d\u00e9ric Dux",
    "author_email": "Kevin Michalewicz <kevinmicha@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f2/52/acce1361431e7b4b0f66e3b343712736d92370ec343cb1d93f0ca8699561/starred_astro-1.4.3.tar.gz",
    "platform": null,
    "description": "# STARRED: STARlet REgularized Deconvolution \n\n[![pipeline status](https://gitlab.com/cosmograil/starred/badges/main/pipeline.svg)](https://gitlab.com/cosmograil/starred/commits/main)\n[![coverage report](https://gitlab.com/cosmograil/starred/badges/main/coverage.svg)](https://cosmograil.gitlab.io/starred/coverage/)\n[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.05340/status.svg)](https://doi.org/10.21105/joss.05340)\n[![pypi](https://img.shields.io/pypi/v/starred-astro.svg)](https://pypi.org/project/starred-astro/)\n\nSTARlet 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. \n\n## Installation \n\n### Through PyPI\n\nSTARRED releases are distributed through the Python Package Index (PyPI). To install the latest version use `pip`:\n\n```bash\n$ pip install starred-astro\n```\n\n### Through Anaconda\nWe provide an Anaconda environment that satisfies all the dependencies in `starred-env.yml`. \n```bash\n$ git clone https://gitlab.com/cosmograil/starred.git\n$ cd starred\n$ conda env create -f starred-env.yml\n$ conda activate starred-env\n$ pip install .\n```\nIn case you have an NVIDIA GPU, this should automatically download the right version of JAX as well as cuDNN.\nNext, you can run the tests to make sure your installation is working correctly.\n\n```bash\n# While still in the STARRED directory:\n$ pytest . \n```\n\n### Manually handling the dependencies\nIf you want to use an existing environment, just omit the Anaconda commands above:\n```bash\n$ git clone https://gitlab.com/cosmograil/starred\n$ cd starred \n$ pip install .\n```\n\nor if you need to install it for your user only: \n```bash\n$ python setup.py install --user \n```\n\nSTARRED runs much faster on GPUs, so make sure you install a version of JAX that is compatible \nwith your version of CUDA and cuDNN: \n``` bash \n$ pip install \"jax[cuda11_cudnn86]\" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n```\n\n## Requirements \n\nSTARRED requires the following Python packages: \n* `astropy`\n* `dill`\n* `jax`\n* `jaxlib`\n* `jaxopt`\n* `matplotlib`\n* `numpy`\n* `scipy`\n* `optax`\n* `pyregion`\n* `tqdm`\n* `h5py`\n\nAdditionnaly, the following package needs to be installed if you want to sample posterior distribution: \n* `emcee`\n* `mclmc`\n\n## Example Notebooks and Documentation\n\nWe provide several notebooks to help you get started.\n\n> [Start here to grasp the basic STARRED workflow](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/start_here.ipynb).\n\nMore example notebooks going in more detail of how the internals work can be found in the [notebooks](https://gitlab.com/cosmograil/starred/-/tree/main/notebooks/more_examples) directory: \n* [Ground-based narrow PSF generation](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/1_WFI%20narrow%20PSF%20generation.ipynb)\n* [Ground-based joint deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/2_DESJ0602-4335%20joint%20deconvolution.ipynb)\n* [Another ground-based joint deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/3_Another%20lensed%20quasar%20-%20joint%20deconvolution.ipynb)\n* [JWST PSF generation and deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/4_JWST%20deconvolution.ipynb)\n* [DES2038 joint deconvolution](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/5_DES2038_from_WFI_joint_deconvolution.ipynb)\n* [HST PSF reconstruction](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/6_HST-PSF%20reconstruction.ipynb)\n* [JWST PSF reconstruction](https://gitlab.com/cosmograil/starred/-/blob/main/notebooks/more_examples/7_JWST-PSF_reconstruction.ipynb)\n\nThe mathematical formalism along with further examples are also presented\nin [Millon et al. (2024)](https://arxiv.org/abs/2402.08725). All the examples and tests presented in this paper can be\nreproduced from this repository:\n\n* [STARRED Examples](https://gitlab.com/cosmograil/starred-examples)\n\nYou can also run STARRED from the command line by following\nthese [instructions](https://gitlab.com/cosmograil/starred/-/tree/main/scripts?ref_type=heads).\n\nFinally, the full documentation can be found [here](https://cosmograil.gitlab.io/starred/) and a video presentation of\nSTARRED is accessible on [Youtube](https://www.youtube.com/watch?v=04FKFMBpSlo).\n\n## Attribution\n\nIf you use this code, please cite [Michalewicz et al. 2023](https://joss.theoj.org/papers/10.21105/joss.05340)\nand [Millon et al. 2024](https://arxiv.org/abs/2402.08725)\nas indicated in the [documentation](https://cosmograil.gitlab.io/starred/citing.html).\n\n## License\nSTARRED is a free software. You can redistribute it and/or modify it under the terms of the \nGNU General Public License as published by the Free Software Foundation.\n\nSTARRED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without \neven the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \nGeneral Public License for more details ([LICENSE.txt](LICENSE)).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A two-channel deconvolution method with Starlet regularization",
    "version": "1.4.3",
    "project_urls": {
        "homepage": "https://starred-astro.github.io",
        "repository": "https://github.com/starred/starred-astro"
    },
    "split_keywords": [
        "deconvolution",
        " astronomy",
        " starlet",
        " image processing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8656e620d018099ecfd19a14f7b645d259e6cc82781e64859f73760be9fcbe2a",
                "md5": "b718f92f009e35684157dee164878bfc",
                "sha256": "90c066406bad92e7f2502f22b6b5dc619212b537cda8c298380f26b3192621dd"
            },
            "downloads": -1,
            "filename": "starred_astro-1.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b718f92f009e35684157dee164878bfc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 110797,
            "upload_time": "2024-06-01T17:47:43",
            "upload_time_iso_8601": "2024-06-01T17:47:43.726762Z",
            "url": "https://files.pythonhosted.org/packages/86/56/e620d018099ecfd19a14f7b645d259e6cc82781e64859f73760be9fcbe2a/starred_astro-1.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f252acce1361431e7b4b0f66e3b343712736d92370ec343cb1d93f0ca8699561",
                "md5": "9d187a5c3b75986b4d57ed36a9439a46",
                "sha256": "063d9dab3b774a56f733e35fe4f4f4ac47d6b3429e8f962c9baa5c7a6494e95a"
            },
            "downloads": -1,
            "filename": "starred_astro-1.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "9d187a5c3b75986b4d57ed36a9439a46",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 94888,
            "upload_time": "2024-06-01T17:47:46",
            "upload_time_iso_8601": "2024-06-01T17:47:46.181413Z",
            "url": "https://files.pythonhosted.org/packages/f2/52/acce1361431e7b4b0f66e3b343712736d92370ec343cb1d93f0ca8699561/starred_astro-1.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-01 17:47:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "starred",
    "github_project": "starred-astro",
    "github_not_found": true,
    "lcname": "starred-astro"
}
        
Elapsed time: 3.01273s