.. PySptools documentation master file, created by
   sphinx-quickstart on Sun Sep 29 09:27:46 2013.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

.. meta::
	:description: Python tools for hyperspectral imaging
	:keywords: python, telops, hyperspectral imaging, signal processing, library, endmembers, unmixing, pysptools, sam, sid, atgp, N-FINDR, NFINDR, spectroscopy, target detection, georessources, geoimaging, chemical imaging, pharmaceutical, pharma, minerals, spectral, remote sensing, hyperspectral drill core imaging

Welcome to the PySptools documentation
**************************************

Tools for hyperspectral imaging ::

	Documentation at 2015-01-15.

.. figure:: .\pic\pic_burner1.png
   :scale: 100 %
   :align: center
   :alt: stacked abundance maps

Hyperspectral imaging is used to **visualize chemistry**, the spatial relation between chemicals and the proportion of them. PySptools is a python module that implements spectral and hyperspectral algorithms. Specializations of the library are the endmembers extraction, unmixing process, supervised classification, target detection, noise reduction, convex hull removal and features extraction at spectrum level. The library is designed to be easy to use and almost all functionality has a plot function to save you time with the data analysis process. The actual sources of the algorithms are the Matlab Hyperspectral Toolbox of Isaac Gerg, the pwctools of M. A. Little, the Endmember Induction Algorithms toolbox (EIA) and the HySime Matlab module of José Bioucas-Dias and José Nascimento. You can download PySptools from the PySptools
Project Page hosted by Sourceforge.net or from the pypi packages repository.

`Project web site <http://ctherien.weebly.com/>`_

New for version 0.13.0 (beta)
=============================

* The class classification.SVC adapt the scikit-learn implementation of Support Vector Machines to the analysis of hyperspectral cubes.

* An example of using the SVC class with the Pine Creek cube.

Examples
========

A simple comparaison between ATGP and NFINDR.

.. figure:: .\pic\pic_picture4.png
   :scale: 100 %
   :align: center
   :alt: detection map

   :doc:`NFINDR and ATGP<example1>`

Methanol gas synthetic images made by unmixing. The data used for the demonstration is acquired with a `Telops Hyper-Cam <http://www.telops.com/>`_ instrument.

.. figure:: .\pic\pic_burner2.png
   :scale: 100 %
   :align: center
   :alt: Telops image of methanol gas escaped form a burner

   :doc:`Methanol gas<example2>`

Quartz classification of a drill core datacube. The data used for the demonstration is acquired with a `Telops Hyper-Cam <http://www.telops.com/>`_ instrument.

.. figure:: .\hem\hem_hematite.png
   :scale: 100 %
   :align: center
   :alt: Telops image of a drill core

   :doc:`Hematite drill core <example3>`

Smokestack effluents analysis. The data used for the demonstration is acquired with a `Telops Hyper-Cam <http://www.telops.com/>`_ instrument.

.. figure:: .\smk\smk_sm1.png
   :scale: 100 %
   :align: center
   :alt: Telops image of a smokestack

   :doc:`Smokestack <example4>`

Some examples of convex hull removal and features extraction.

.. figure:: .\pic\pic_picture5.png
   :scale: 100 %
   :align: center
   :alt: Convex hull plot

   :doc:`Convex hull <example5>`

Following examples use the IPython Notebook.

* Methanol gas `example <nbex_methanol_burner.html>`_
* Hematite drill core `example <nbex_hematite.html>`_
* Convex hull `example <nbex_convexhull.html>`_
* Pine Creek `example 1 <nbex_pine_creek1.html>`_
* Pine Creek `example 2 <nbex_pine_creek2.html>`_
* Pine Creek `example 3 <nbex_pine_creek3.html>`_
* Support Vector Classification `example <nbex_pine_creek4.html>`_ (new)


Documentation
=============

:doc:`Download and installation<installation>`

:doc:`Introduction<introduction>`

*Summary of functions and classes by modules*

1. :doc:`abundance_maps (linear unmixing)<abundance_maps_front>`

* FCLS (function and class)
* NNLS (function and class)
* UCLS (function and class)

2. :doc:`classification<classification_front>`

* NormXCorr (class)
* KMeans (class)
* SAM (class)
* SID (class)
* SVC (class) (new)

3. :doc:`detection<detection_front>`

* ACE (function and class)
* CEM (function and class)
* GLRT (function and class)
* MatchedFilter (function and class)
* OSP (function and class)

4. :doc:`distance<distance>`

* chebyshev (function)
* NormXCorr (function)
* SAM (function)
* SID (function)

5. :doc:`eea (endmembers extraction algorithms)<eea_front>`

* ATGP (function and class)
* FIPPI (function and class)
* NFINDR (function and class)
* PPI (function and class)

6. :doc:`formatting<formatting>`

* convert2d (function)
* convert3d (function)
* normalize (function)

7. :doc:`material_count<material_count_front>`

* HfcVd (function and class)
* HySime (function and class)

8. :doc:`noise<noise_front>`

* Savitzky Golay filter (class)
* MNF (class)
* Whiten (function and class)

9. :doc:`sigproc<sigproc>`

* bilateral (function)

10. :doc:`spectro<spectro>`

* convex_hull_removal (function)
* FeaturesConvexHullQuotient (class)
* SpectrumConvexHullQuotient (function with a class interface)
* USGS06SpecLib (class)

11. :doc:`util<util>`

* load_ENVI_file (function) (Python 2.7 only)
* load_ENVI_spec_lib (function) (Python 2.7 only)
* corr (function)
* cov (function)
* display_linear_stretch (function)
* plot_linear_stretch (function)

:doc:`Glossary<glossary>`

:doc:`Release notes<release_notes>`

:doc:`Links<links>`

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
