Skip to content

API Reference

This page lists public methods related to the scene life cycle. For usage suggestions and complete examples, see Core Concepts ; for installation and backend inspection, see Installation and Environment Configuration .

Scene

Scene.simulate(...)

Scene.simulate(sensor_or_process, **kwargs)

Perform sensor simulations or process calculations. If the scene has not yet been built, it will be built automatically before the first simulation. The return type is determined by the sensor or process.

Scene.build()

Scene.build()

Verify scenes ahead of time, load geometry, upload assets, and build native acceleration structures. Reuse the existing native scene when repeatedly calling the unchanged built scene.

Scene.rebuild()

Scene.rebuild()

Forces the geometry to be re-read or uploaded and the acceleration structure rebuilt. Changes such as geometry files that apply to the same path are replaced by external programs cannot be automatically observed by Scene.

Scene.update_instances()

Scene.update_instances()

Submit position, rotation, or scale updates done via InstanceHandle and restructure the top-level acceleration structure. Scene.build() must be executed before calling; Scene.rebuild() should be used when moving TurbidBoundary instances.

Lighting and Atmosphere

Illumination

less.Illumination(source=..., atmosphere=...)

Combined top-of-atmosphere incident sources and atmospheric models. source is usually less.Sun; atmosphere Can use less.PrescribedAtmosphere, less.SimpleSpectralAtmosphere, less.HosekWilkieAtmosphereless.Atmosphereless.SixSAtmosphere Or less.NoAtmosphere for vacuum.

NoAtmosphere

less.NoAtmosphere()

Vacuum boundary: TOA Direct sunlight is not attenuated and sky scattering is zero.

Sun

less.Sun(
    zenith=30,
    azimuth=150,
    spectrum=None,
    wavelengths=None,
    irradiance=None,
)

Defines the solar direction and top-of-atmosphere beam normal spectral irradiance. Use LESS built-in sun when spectrum is not provided Spectrum; explicit irradiance has units W m⁻² nm⁻¹. Scalar applies to all bands; It is recommended to provide wavelengths for the spectrum array, otherwise the array length must be consistent with the number of solution bands.

PrescribedAtmosphere

less.PrescribedAtmosphere(
    wavelengths=None,
    direct_beam_transmittance=0.7,
    diffuse_horizontal_transmittance=0.15,
)

direct_beam_transmittance is the ratio of the surface beam normal direct irradiance to the TOA beam normal irradiance. diffuse_horizontal_transmittance is the horizontal scattered irradiance of the ground surface and TOA sunlight on the horizontal plane The ratio of projected irradiance; it is not the surface scattering ratio. If the sun’s zenith angle is θ:

E_direct_normal_surface = E_toa_normal × direct_beam_transmittance
E_diffuse_horizontal_surface = E_toa_normal × cos(θ)
                               × diffuse_horizontal_transmittance

The two dimensionless coefficients can be scalars; the spectral array should be provided with reference wavelengths, and band by band The sum cannot be greater than 1.

Other atmospheric models

  • less.SimpleSpectralAtmosphere(turbidity=...): Quickly simplify spectral atmospheres and isotropic skies.
  • less.HosekWilkieAtmosphere(turbidity=...): Visible light Hosek–Wilkie direction sky.
  • less.Atmosphere.standard(...): LESS built-in layered atmosphere and surface-sensor propagation.
  • less.Illumination(source=less.Sun(zenith=30.0, azimuth=180.0), atmosphere=less.SixSAtmosphere()): Calculates direct and scattered light from the surface using the optional 6S model.

For a complete example, see Atmospheric Model and Earth-Atmosphere Transport .