.. automodule:: spectro

Spectro function and classes
****************************

This module supports the functions convex_hull_removal and the
classes SpectrumConvexHullQuotient, FeaturesConvexHullQuotient and USGS06SpecLib.

See the file :download:`test_hull.py<../tests/test_hull.py>`
for a SpectrumConvexHullQuotient and FeaturesConvexHullQuotient example. The file :download:`test_spectro.py<../tests/test_spectro.py>` is the example for the USGS06SpecLib class.

.. note:: The ENVI file reader is not available for Python 3.3 and make the USGS library reader useless. To turn around the problem you can use a JSON version of the USGS library. Following is the explaination on how to do this.

To run the USGS06SpecLib class on Python 3.3 you need a JSON version of the library:

* Download the ENVI version of the library.
* Run the program USGS_ENVI_to_JSON.py on it. You can find the program in the util folder.
* And use the class spectro.JSONReader to load the JSON file, see test_hull.py for an example.

------------------------------

FeaturesConvexHullQuotient
==========================

.. autoclass:: spectro.FeaturesConvexHullQuotient
    :members:

------------------------------

SpectrumConvexHullQuotient
==========================

.. autoclass:: spectro.SpectrumConvexHullQuotient
    :members:

------------------------------

convex_hull_removal
===================

.. autofunction:: spectro.convex_hull_removal

------------------------------

USGS06SpecLib
=============

.. autoclass:: spectro.EnviReader
    :members:

.. autoclass:: spectro.JSONReader
    :members:

.. autoclass:: spectro.USGS06SpecLib
    :members:
