Skip to main content

CASCADe filtering: Calibration of trAnsit Spectroscopy using CAusal Data filtering module.

Project description

pipeline status

CASCADe-filtering

This package is a sub package of the CASCADe package, developed within the EC Horizons 2020 project Exoplanets A . It contains functionality to detect and flag cosmic ray hits in spectral images, and to create cleaned and filtered spectral images, which can be used for spectral extraction.

Installing CASCADe-filtering

The easiest way to install the CASCADe-filtering package is to create an Anaconda environment, download the distribution from PyPi, and install the package in the designated Anaconda environment with the following commands:

conda create --name cascade-filtering python=3.9 ipython
conda activate cascade-filtering
pip install CASCADe-filtering

This will install all code and scripts you need for the package to work.

Installing the CASCADe-filtering examples

The CASCADe-filtering package comes with several examples, demonstrating how to detect and filter cosmic hits from spectroscopic images. If the package is installed from PypPi, the example jupyter notebooks and simulated data need be downloaded from the GitLab repository. To initialize the data download one can use the following bash command in the Anaconda environment:

setup_cascade-filtering.py

or alternatively from within the python interpreter:

from cascade_filtering.initialize import setup_examples
setup_examples()

The additional downloaded data also includes examples and observational data to try out the CASCADe package, which are explained below.

NOTE: The data files will be downloaded by default to a CASCADeSTORAGE/ directory in the users home directory. If a different location is preferred, please read the section on how to set the CASCADe CASCADE_STORAGE_PATH environment variable first. For details in the environment variables we refer to the documentation of the CASCADe main package.

Installing alternatives for the CASCADe-filtering package

The CASCADe-filtering code can also be downloaded from GitLab directly by either using git or pip. To download and install with a single command using pip, type in a terminal the following command

pip install git+git://gitlab.com/jbouwman/CASCADe-filtering.git@main

which will download the latest version. For other releases replace the main branch with one of the available releases on GitLab. Alternatively, one can first clone the repository and then install, either using the HTTPS protocol:

git clone https://gitlab.com/jbouwman/CASCADe-filtering.git

or clone using SSH:

git clone git@gitlab.com:jbouwman/CASCADe-filtering.git

Both commands will download a copy of the files in a folder named after the project's name. You can then navigate to the directory and start working on it locally. After accessing the root folder in a terminal, type

pip install .

to install the package.

In case one is installing CASCADe-filtering directly from GitLab, and one is using Anaconda, make sure a cascade environment is created and activated before using our package. For convenience, in the CASCADe-filtering main package directory an environment.yml can be found. You can use this yml file to create or update the cascade Anaconda environment. If you not already had created an cascade environment execute the following command:

conda env create -f environment.yml

In case you already have an cascade environment, you can update the necessary packages with the following command (also use this after updating CASCADe-filtering itself):

conda env update -f environment.yml

Make sure the CASCADe-filtering - package is in your path. You can either set a PYTHONPATH environment variable pointing to the location of the CASCADe -filtering package on your system, or when using anaconda with the following command:

conda develop <path_to_the_CASCADe_package_on_your_system>/CASCADe-filtering

Using CASCADe-filtering

The CASCADe-filtering distribution comes with several working examples and test data sets which can be found in the examples directory of the CASCADe-filtering distribution on GitLab, or have been installed locally with the commands outlined above. The example jupyter notebooks explain and demonstrate the basic usage of the filtering modules, and use simulated JWST/MIRI low resolution spectroscopic data as an example how to identify and remove cosmic hits. To run the examples make sure that the conda cascade-filtering environment can be found by the jupyter server. This can be achieved with the following command:

python -m ipykernel install --user --name=cascade-filtering

after which the notebooks can be viewed and excecuted with jupyter which can be started with.

jupyter notebooks

Documentation

The full documentation can be found online at:


https://jbouwman.gitlab.io/CASCADe-filtering/


Alternatively, the documentation can be found in the docs directory of the CASCADe-filtering GitLab repository. After cloning the git repository, the full documentation can be generated by executing in the in the docs directory the following commands:

make html
make latexpdf

The generated HTML and PDF files will be located in the build/html and build/latex sub-directories of the main documentation directory, respectively.

Documentation on the CASCADe main package can be found at:


https://jbouwman.gitlab.io/CASCADe/


Acknowledgments

The CASCADe-filtering code was developed by Jeroen Bouwman, with contributions from the following collaborators:

Juergen Schreiber (MPIA)

This work was supported by the European Unions Horizon 2020 Research and Innovation Programme, under Grant Agreement N 776403.

Publications

https://ui.adsabs.harvard.edu/abs/2021AJ....161..284M/abstract

https://ui.adsabs.harvard.edu/abs/2021A%26A...646A.168C/abstract

https://ui.adsabs.harvard.edu/abs/2020ASPC..527..179L/abstract

https://exoplanet-talks.org/talk/271

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

cascade_filtering-1.0.4.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

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

cascade_filtering-1.0.4-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file cascade_filtering-1.0.4.tar.gz.

File metadata

  • Download URL: cascade_filtering-1.0.4.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for cascade_filtering-1.0.4.tar.gz
Algorithm Hash digest
SHA256 9d708f5c9daefd4c3c1f48e4ce9a850e564e920c3cf38211c682a26139de0dab
MD5 e5f59778217fda6910b236510bacaab7
BLAKE2b-256 8a65ef65eab037b3022f071d9b7810a55ca708477ad6976d49ae04bf7f77c400

See more details on using hashes here.

File details

Details for the file cascade_filtering-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for cascade_filtering-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d50a5f503f35facbeb002d4519a140bc9b8f73bcb72f55aa750d051d3afd2aae
MD5 83acff1f1976e74dac4c924bc2c26e92
BLAKE2b-256 603b2c7998dd7f383e06e1018a3524362118b7ba86460dbc65a8fccc14fef9e4

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