Installation

EnPT can be installed in two different ways:

  • as a standalone package which can be used via the Python API or from the command line

  • along with the EnMAP-Box (a QGIS plugin) which provides a GUI for EnPT.

Installing EnPT as a standalone package (backend code only)

Using Anaconda or Miniconda (slower)

Using conda (latest version recommended), EnPT is installed as follows:

$ conda create --name enpt -c conda-forge enpt
$ conda activate enpt

Optional: Install Polymer for advanced atmospheric correction over water surfaces

For atmospheric correction of water surfaces using the Polymer algorithm instead of SICOR (which is mainly designed for land surfaces), the additional package polymer is required. The Polymer atmospheric correction is made available in EnPT by the ACwater package, a wrapper developed by AWI Bremerhaven, which is already contained in the default EnPT installation.

  1. To install the optional package polymer, first activate the previously created enpt conda environment:

    $ mamba activate enpt
    
  2. Then register at the HYGEOS support forum, download polymer from there (EnPT was tested with polymer v4.16.1, later versions may fail), unpack it and run the following commands from the unpacked root directory of polymer:

    $ make
    $ make auxdata_common
    $ make ancillary
    $ mkdir -p ANCILLARY/ERA5
    $ pip install -e .
    

Note

When using a conda environment on Linux or Mac OSX, the needed compilers to build polymer should be already installed. On Windows, you need to install the Microsoft build tools for visual studio including the C++ build tools, the latest versions of MSVCv142 - VS 2019 C++ x64/x86 build tools and Windows 10 SDK (see here for details). However, polymer is currently not Windows compatible and will likely not run as expected.

Apart from that, you need to register at the CDS registration page and install a CDS API key. This is required to automatically download atmospheric AUX data at runtime, which are needed to run Polymer. Further details are given in the ACwater Polymer installation instructions.

Installing EnPT along with QGIS and the EnMAP-Box (backend + GUI)

If you want to use EnPT including the GUI in the EnMAP-Box, it is highly recommended to install QGIS, the EnMAP-Box requirements, the EnPT backend code and the EnPT GUI into a single conda environment within Mambaforge.

To do so, run the following command on a Mambaforge conda command line:

$ mamba env create -n enpt_full -f https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT/raw/main/tests/gitlab_CI_docker/context/environment_enpt_full.yml

Then activate the newly created conda environment and start QGIS:

$ mamba activate enpt_full
$ qgis

The EnMAP-Box QGIS plugin can then be installed via the QGIS Plugin manager and the EnPT GUI can be started from within the EnMAP-Box as described here.

If you want to use advanced atmospheric correction over water surfaces, please install the optional requirement polymer into the enpt_full environment as described above.

Hint

Contributors of the EnPT source code or plugins may install EnPT along with all packages needed for development with:

$ mamba env create -n enpt_full -f https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT/raw/main/tests/gitlab_CI_docker/context/environment_enpt_full_dev.yml

Note

EnPT has been tested with Python 3.8+ on Linux, Windows and Mac OSX.