01 - Introduction¶
What is LESS¶
LESS is a three-dimensional radiative transfer model for remote sensing research. It uses Monte Carlo ray tracing to follow radiation through terrain, vegetation and other objects, and simulates optical images, multi-angle reflectance, LiDAR, thermal infrared, energy balance, photosynthesis, chlorophyll fluorescence, and microwave scattering and emission.
LESS 3 has a single Python interface and runs on three compute backends:
- OptiX: NVIDIA GPUs;
- Vulkan: NVIDIA, AMD and Intel GPUs that support ray queries;
- Embree: the CPU, no graphics card needed.
All three backends take the same scenes and parameters and return the same results. The backend only decides which hardware does the work; it does not change the physics.
What you can simulate¶
| Application | Main results |
|---|---|
| Optical remote sensing | RGB, multispectral and hyperspectral images, multi-angle reflectance, pushbroom images |
| Radiation measurements | Upwelling and downwelling irradiance maps, point irradiance radiometers |
| LiDAR | Discrete point clouds and full waveforms |
| Thermal infrared | Thermal images from prescribed or energy-balance temperatures |
| Fluorescence | Leaf fluorescence sources and fluorescence images |
| Microwave | Radar backscattering coefficients, passive microwave brightness temperatures |
| Vegetation processes | 3-D radiation field, absorbed photosynthetically active radiation, leaf temperature, photosynthesis and stomatal conductance |
How a simulation is put together¶
A simulation in LESS has three parts:
- The scene: terrain, vegetation and other objects, together with properties that describe how they interact with radiation;
- The illumination: the sun and the atmosphere;
- An observation or a process: a sensor (camera, LiDAR, radar …) or a physical process (radiation field, energy balance, photosynthesis).
Once a scene is built, any number of sensors and processes can use it. Changing the illumination, the properties or the sensor does not require rebuilding the geometry.
Choosing a backend¶
less.Scene() picks an available backend automatically. You can also choose one:
import less
scene = less.Scene(backend="optix") # NVIDIA GPU
scene = less.Scene(backend="vulkan") # GPU with ray queries
scene = less.Scene(backend="embree") # CPU
To check before running whether a feature is available on this machine, use can_use():
A simulation in ten lines¶
The following code simulates flat ground with a reflectance of 0.3 and produces an RGB image:
import less
scene = less.Scene()
scene.size = 10.0
scene.terrain = less.Terrain(property=less.Lambertian(reflectance=0.3))
scene.illumination = less.Illumination(
source=less.Sun(zenith=30, azimuth=150), atmosphere=less.NoAtmosphere())
image = scene.simulate(less.OpticalImager(
less.Orthographic(image_size=256), bands=[650, 550, 450], quality=32))
image.save("first_image.png")
First simulation explains this code line by line.
Version¶
This tutorial covers LESS 3.1.0. The Python package is called less3d; in code it is imported as import less.