pyrsr 0.7.0
A package providing relative spectral response functions for remote sensing instruments.
License: Apache-2.0
Requires Python: >=3.7
Keywords: pyrsr,relative spectral response,remote sensing,sensors

=====
pyrsr
=====

A package providing relative spectral response functions for remote sensing instruments.

* Free software: Apache-2.0
* Documentation: https://geomultisens.git-pages.gfz-potsdam.de/pyrsr/doc/
* Submit feedback by filing an issue `here <https://git.gfz-potsdam.de/geomultisens/pyrsr/issues>`__.


Status
------

.. image:: https://git.gfz-potsdam.de/geomultisens/pyrsr/badges/master/pipeline.svg
        :target: https://git.gfz-potsdam.de/geomultisens/pyrsr/commits/master
.. image:: https://git.gfz-potsdam.de/geomultisens/pyrsr/badges/master/coverage.svg
        :target: https://geomultisens.git-pages.gfz-potsdam.de/pyrsr/coverage/
.. image:: https://img.shields.io/pypi/v/pyrsr.svg
        :target: https://pypi.python.org/pypi/pyrsr
.. image:: https://img.shields.io/pypi/l/pyrsr.svg
        :target: https://git.gfz-potsdam.de/geomultisens/pyrsr/blob/master/LICENSE
.. image:: https://img.shields.io/pypi/pyversions/pyrsr.svg
        :target: https://img.shields.io/pypi/pyversions/pyrsr.svg
.. image:: https://img.shields.io/pypi/dm/pyrsr.svg
        :target: https://pypi.python.org/pypi/pyrsr

See also the latest coverage_ report and the pytest_ HTML report.


Features
--------

Quick usage example for getting the spectral response functions of Sentinel-2A:

.. code-block::

    >>> from pyrsr import RelativeSpectralResponse
    >>> RSR = RelativeSpectralResponse(satellite='Sentinel-2A', sensor='MSI')
    >>> RSR.plot_rsrs()

.. image:: https://git.gfz-potsdam.de/geomultisens/pyrsr/raw/master/docs/images/S2A_RSRs.png

.. code-block::

    >>> RSR.rsrs

    {'1': array([ 0.0001003 ,  0.00023005,  0.00020481, ...,  0.        ,
                  0.        ,  0.        ]),
     '2': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '3': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '4': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '5': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '6': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '7': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '8': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '8A': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '9': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '10': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '11': array([ 0.,  0.,  0., ...,  0.,  0.,  0.]),
     '12': array([ 0.00000000e+00,   0.00000000e+00,   0.00000000e+00, ...,
                   4.06617574e-05,   2.94133865e-05,   1.28975620e-05])}


List of supported sensors:

* Terra ASTER
* Landsat-4 TM
* Landsat-5 TM
* Landsat-7 ETM+
* Landsat-8 OLI_TIRS
* Aqua MODIS
* Terra MODIS
* RapidEye-5 MSI
* Sentinel-2A MSI
* Sentinel-2B MSI
* SPOT-1 HRV1
* SPOT-1 HRV2
* SPOT-2 HRV1
* SPOT-2 HRV2
* SPOT-3 HRV1
* SPOT-3 HRV2
* SPOT-4 HRVIR1
* SPOT-4 HRVIR2
* SPOT-5 HRG1
* SPOT-5 HRG2


Credits
-------

The pyrsr package was developed within the context of the GeoMultiSens project funded
by the German Federal Ministry of Education and Research (project grant code: 01 IS 14 010 A-C).

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _coverage: https://geomultisens.git-pages.gfz-potsdam.de/pyrsr/coverage/
.. _pytest: https://geomultisens.git-pages.gfz-potsdam.de/pyrsr/test_reports/report.html


=======
History
=======

0.7.0 (2022-07-22)
------------------

* Added Landsat-9 support (!7).
* Migrated to pytest (!8).
* Dropped Python 2.7 and 3.6 support due to end of life status. Updated classifiers in setup.py.

0.6.1 (2021-12-02)
------------------

* Replaced deprecated numpy data types.


0.6.0 (2021-10-12)
------------------

* Fixed wrong wavelength and RSRs in case of micrometers.
* Added RelativeSpectralResponse.fwhm attribute that holds the full width half maximum.


0.5.0 (2021-09-27)
------------------

* Added .idea folder to .gitignore and removed already committed files.
* Replaced GitLab URLs due to changes on the server side.
* CI now uses Mambaforge.
* 'make lint' now also directly prints the logs. 'make clean-test' now also removes .coverage.
* Switched to Apache 2.0 license.


0.4.2 (2020-12-10)
------------------

* Added URL checker and corresponding CI job.
* Fixed all dead links.
* Removed travis related files.
* Fixed PEP8 style issues.


0.4.1 (2020-11-28)
------------------

* Fixed wrong values for LBA_sorted for Landsat-7 and Landsat-8, SPOT-1-5 (wrong PAN position).
* Added TestRelativeSpectralResponse.sort_by_cwl().


0.4.0 (2020-11-10)
------------------

* Replaced deprecated 'source activate' by 'conda activate'.
* Added Terra and Aqua MODIS spectral response functions (bands 1-16 only).


0.3.8 (2020-10-12)
------------------

* Use SPDX license identifier and set all files to GLP3+ to be consistent with license headers in the source files.
* Exclude tests from being installed via 'pip install'.


0.3.7 (2019-09-29)
-------------------

* Updated S2B band 1 RSR.


0.3.6 (2020-09-25)
------------------

* Moved matplotlib import to function level to avoid static TLS ImportError.


0.3.5 (2020-09-24)
------------------

* Moved scipy import to function level to avoid static TLS ImportError.


0.3.4 (2020-09-15)
------------------

* Updated deprecated HTTP links.


0.3.3 (2020-03-31)
------------------

* Added quick usage example to README.rst.
* Improved list of compatible sensors.
* Updated development status.


0.3.2 (2020-03-31)
------------------

* Fixed title underscore too short.


0.3.1 (2020-03-31)
------------------

* Fixed issue #9 (ValueError: No sensor specifications for combination 'Sentinel-2B' 'MSI' 'S2B20' found).
* Updated HISTORY.rst


0.3.0 (2020-03-27)
------------------

* Revised RSR_reader.
* RSR_reader now accepts a logger and may ignore missing files.
* Added list of supported sensors to README.rst.
* Fixed pipeline badge.
* Updated HISTORY.rst


0.2.10 (2019-09-24)
-------------------

* Updated S2A band 1 RSR.


0.2.9 (2019-08-23)
------------------

* Fixed missing LayerBandsAssignment and wrong bandnames.


0.2.8 (2019-08-23)
------------------

* Fixed missing LayerBandsAssignment and wrong bandnames.


0.2.7 (2019-08-22)
------------------

* Fixed FileNotFoundError in case the requested satellite is 'RapidEye-5'.


0.2.6 (2019-08-22)
------------------

* Cleaned up and added some comments.


0.2.5 (2019-08-22)
------------------

* Added setuptools-git to setup requirements.


0.2.4 (2019-08-22)
------------------

* Fixed missing package data.


0.2.3 (2019-08-22)
------------------

* Fixed missing data.


0.2.2 (2019-08-22)
------------------

* Fixed missing data.


0.2.1 (2019-08-22)
------------------

* Moved references.


0.2.0 (2019-08-22)
------------------

New features:

* First working version.
* Made RelativeSpectralResponse importable on the top level of the package.
* Added 'RSR' as alias for RelativeSpectralResponse.
* Implemented sensor specifications and possibility to ignore pan and thermal bands.
* Added possibility to ignore bands removed by AC.
* Added copyright and license notes.
* Added CI setup files. Added rules to Makefile. Added test requirements.
* Added .gitlab-ci.yml
* Updated README.rst.
* Added Sentinel-2 reference.
* Added references.

Bug fixes and enhancements:

* Refactored the term 'srf' to 'rsr'.
* Fix LayerBandsAssignment not properly passed through.
* Fixed CI setup.
* Fixed wrong links.
* Updated Sentinel-2A and -2B RSRs. (fixes issue #1).


0.1.0 (2019-08-19)
------------------

* First release on PyPI.