Skip to main content

PyWI CTA wrapper - a signal processing library for Imaging Atmospheric Cherenkov Telescopes

Project description

https://travis-ci.org/jeremiedecock/pywi-cta.svg?branch=master

PyWI CTA - A CTA wrapper for PyWI

Copyright (c) 2016-2018 Jeremie DECOCK (www.jdhp.org)

Description

PyWI-CTA is a ctapipe wrapper for PyWI.

Features

The PyWI and PyWI-CTA libraries contain:

  • wavelet transform and wavelet filtering functions for image multiresolution analysis and filtering;

  • additional filter to remove some image components (non-significant pixels clusters);

  • a set of generic filtering performance estimators (MSE, angular precision, energy loss, contamination rate, …), some relying on the scikit-image Python library (supplementary estimators can be easily added to meet particular needs);

  • a graphical user interface to visualize the filtering process in the wavelet transformed space;

  • an Evolution Strategies (ES) algorithm known in the mathematical optimization community for its good convergence rate on generic derivative-free continuous global optimization problems (Beyer, H. G. (2013) “The theory of evolution strategies”, Springer Science & Business Media);

  • additional tools to manage and monitor the parameter optimization.

Dependencies

PyWI-CTA has the following strict requirements:

PyWI-CTA also depends on other packages for optional features:

However, note that these only need to be installed if those particular features are needed. pywicta will import even if these dependencies are not installed.

Installation

PyWI-CTA and its dependencies may be installed using the Anaconda or Miniconda package system. We recommend creating a conda virtual environment first, to isolate the installed version and dependencies from your master environment (this is optional).

The following command will set up a conda virtual environment, add the necessary package channels, and download PyWI-CTA and its dependencies. The file environment.yml can be found in this repository. Note this is beta stage software and is not yet stable enough for end-users (expect large API changes until the first stable 1.0 release).

conda env create -n pywi-cta -f environment.yml
source activate pywi-cta
pip install pywicta --no-deps

If you have already installed ctapipe following the official installation procedure, you can add PyWI-CTA to the cta virtual environment like this:

source activate cta
pip install pywicta --no-deps

Developers should follow the development install instructions found in the documentation.

Cosmostat iSAP Sparce2D installation (optional)

  1. Download http://www.cosmostat.org/wp-content/uploads/2014/12/ISAP_V3.1.tgz (see http://www.cosmostat.org/software/isap/)

  2. Unzip this archive, go to the “sparse2d” directory and compile the sparse2d library. It should generate two executables named mr_transform and mr_filter:

    tar -xzvf ISAP_V3.1.tgz
    cd ISAP_V3.1/cxx
    tar -xzvf sparse2d_V1.1.tgz
    cd sparse2d
    compile the content of this directory

An automated compilation and installation script for Linux is available here (author: Tino Michael).

Getting started: tutorial Notebooks

PyWI-CTA provides some Jupyter notebooks that can be used as examples or tutorials: https://github.com/jeremiedecock/pywi-cta-notebooks. New users should check them in the following order:

Recommended JupyterLab extensions for these tutorials (type the following commands in a terminal within the right conda environment):

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install @jupyterlab/toc
jupyter labextension install @ijmbarr/jupyterlab_spellchecker

Console usage example

PyWI-CTA can also be used through console commands. The following is an usage example:

  1. Get a simtel file (e.g. from there)

  2. In your system terminal, from the directory that contains the sample image, type the following commands (where SIMTEL_FILE is the path to your simtel file):

    pywicta-starlet -f common_hard_filtering -t 13.,1.5 -L mask --camid LSTCam --max-images 1 --plot SIMTEL_FILE
    pywicta-mrtransform -f common_hard_filtering -t 13.,1.5 -L mask --camid LSTCam --max-images 1 --plot SIMTEL_FILE
    pywicta-mrfilter -K -k -C1 -m3 -n4 -s2,4.5,3.5,3 --kill-isolated-pixels --camid LSTCam --max-images 1 --plot SIMTEL_FILE
  3. Type pywicta-starlet -h, pywicta-mrtransform -h or pywicta-mrfilter -h to display the list of available options and their documentation.

Analysis results

Notebooks containing the analysis results can be found there: https://gitlab.com/jdhp/pywi-cta-analysis

Bug reports

To search for bugs or report them, please use the PyWI Bug Tracker at:

https://github.com/jeremiedecock/pywi-cta/issues

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

pywicta-0.4.dev3.tar.gz (1.9 MB view details)

Uploaded Source

File details

Details for the file pywicta-0.4.dev3.tar.gz.

File metadata

  • Download URL: pywicta-0.4.dev3.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for pywicta-0.4.dev3.tar.gz
Algorithm Hash digest
SHA256 5f022dea3eec7f39c0bc254e7a46daf553f18c44d584f20f73bb1915db0908d5
MD5 39e047f1f39ad926a25b598073e1b9ac
BLAKE2b-256 0f2a711d80f539fa08197f7ce6e18a55757e3d9c22c9a943ec5843cf1159ffb4

See more details on using hashes here.

Supported by

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