Python for ENVI-met

Starting with Version 5, ENVI-met integrates scrpting and analysis using the powerful Python system.

Over the last years, Python has established itself as universal scripting language for all thinkable use cases. Python covers an endless list of areas of expertise rangeing from data analysis and visiualision, application scripting or AI engineering. To cut a long story short, there is almost no thinkable area of computer science where we might miss Python versions or Python integrations of the up-to-date code libraries or cutting edge technologies.

From the perspecitve of ENVI-met, there are numerous ways we can benefit form the Python developements:

  • Processing, Analysis and Visiulaisation of model data
  • Controlling and scripting the behaviour of ENVI-met applicatons
  • Extending the data interfaces of applications using Python libraries and packages

This page relates to the general aspects of using the Python system in ENVI-met.

General aspects

Using the internal Python distribution

ENVI-met ships with a small 64Bit Python distribution ensuring that minimal requirements and software dependencies are satisfied. However, in almost all cases, you will need to install addtional packages into the Python system that has become quasi-standard over the time. Typical packages that are required for almost all scripts are NumPy, MatPlotLib or Pandas. These packages need to be installed into the ENVI-met Python distribution after installing ENVI-met itelf to use most of the scripts related to ENVI-met. The ENVI-met Python distribution is completly local to ENVI-met, which means it does not interfere with other Python distributions you might have on your system. On the downside of this approach you will need to install additional packages into the local Python distribution.

ENVI-met DataStudio will support you in an automated install of the most required packages for ENVI-met. If DataStudio recognizes that e.g. Pandas is missing, if will promt you to enter a quick install routine to add the missing modules (Internet access requird)

Using my own Python distribution

Many users already do have a working Python installation on their computers including all the packages and libraries they need for their daily work. There is no need to double a Python distribution. Using the Workspace Manager, you can direct ENVI-met any time to use your personal installed Python distribution instesd of using and manage the embedded ENVI-met Python version.

Scripting ENVI-met apps in Python

All ENVI-met applications that support an interaction with Python include the DataStudio Module (DataStudio for Python). While the interface is the same for all applications and the Lightbox function is working project wide, each version of DataStudio can only control the application and offer the objects for the application it is designed for.

For example, the DataStudio integrated into LEONARDO will allow you to access almost all objects and modules related to the LEONARDO software plus those available in all instances of DataStudio. However, scripts making use of these LEONARDO specific objects can only be run in LEONARDO.

The same applies for example for DataStudio for Monde: These scripts will not run in other DataStudio Versions if they use Monde objects. Therefore the script management of ENVI-met is very strict concerning the usage scope of a script. As a consequence it is (-at the moment-) not possible to create a script that calls e.g. Monde and LEONARDO functionalities at the same time (these scripts would also be hard to mange so most likely we will implement some kind of subroutine calls in the next versions)

In addition, ENVI-met related objects are only available inside the ENVI-met DataStudio biotope. In the future we will also provide standalone packages for accessing fundamental operations such as reading and analysing EDX fies from other Python environments, but this is up-to-come.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information