Skip to content

pytools4dart: python API for DART simulator


licence python build status version

The python package pytools4dart was developed to address scripted simulations, especially for simulations with dimensions, number of parameters or complexity not manageable with DART graphical interface. Typical examples are the production of a 3D mockups with thousands of voxels or objects and thousands of optical properties (e.g. voxelised lidar data intersected with crown specific bio-chemical traits), or the specification of hundreds of spectral bands to simulate a hyperspectral sensor.

Package pytools4dart extends DART to complex and massive simulation with the power of python for pre/post processing and analysis, by making possible the connection to any other python packages (rasterio, laspy, scikitlearn, ...). It also extends DART to computing on headless server, typically HPC servers. And with python scripting, it allows for easy lightweight version control, e.g. with git, to keep track of your simulation history.


The python API covers most of DART features and more:

  • Configurable with any version of DART
  • Create, load, compare DART simulations
  • Full Parametrisation of any type of simulation
  • Proxies & Summaries of most used parameters: scene elements (sizes, objects, properties), sensor bands, light source
  • DART Runners: run simulations step by step (direction, phase, ...) or fully, run/resume sequence processing, on remote server
  • Sequence Generator
  • Pre/Post-Processing tools:
    • hyperspectral tools (hstools): read ENVI .hdr files, extract wavelengths and bandwidths, stack band images to ENVI file
    • voxreader : load voxelisation file/data, intersect with polygons/raster to define properties, export to simulation plots
    • DART2LAS: lidar processing tools
      • extract returns with gaussian decomposition of lidar waveforms (accelerated with C++ backend)
      • convert lidar simulation results to LAS files (full-waveform and returns only)
    • Prospect: generate thousands of optical properties from bio-chemical traits
  • Examples : several documented use cases to facilitate the development of your own simulations.

Check website for details and user guides.


Recommended installation is under conda (with mamba, much faster than conda to solve environment).

Execute the following in a terminal (or Miniforge prompt in Windows):

conda install mamba -n base -c conda-forge # only if conda was installed without mamba
mamba env create -n myptd -f
conda activate myptd
python -c 'import pytools4dart as ptd; ptd.configure(r"<path to DART directory>")' # e.g. r"~/DART", r"C:\DART"

Requirements under Windows: Visual Studio C++ compiler, see Win10 video tutorial

For other installation modes (virtualenv, graphical interface, package update) and details (requirements, tests, uninstall, etc.), see installation guide.


If you use pytools4dart, please cite the following references:

Florian de Boissieu, Eric Chraibi, Claudia Lavalley, and Jean-Baptiste FĂ©ret, 2019, pytools4dart: Python API to DART Radiative Transfer Simulator.


The development was partially supported by CNES TOSCA program for projects HYPERTROPIK and LEAF-EXPEVAL, and french ANR JC program for BioCop project.

We thank our colleagues from DART development team at CESBIO who provided insight and expertise that greatly assisted the development of this package.

We also thank Yingjie WANG for his previous work on python interface to DART simulator.