Outdoor scene flux levels (rypflux)¶
The module provides photonrate flux levels for outdoor scenes, including reflected and self-emitted radiance.
Overview¶
Provides a simple, order-of-magnitude estimate of the photon flux and electron count in a detector for various sources and scene lighting. All models are based on published information or derived herein, so you can check their relevancy and suitability for your work.
For a detailed theoretical derivation and more examples of use see: https://nbviewer.org/github/NelisW/ComputationalRadiometry/blob/master/07-Optical-Sources.ipynb
See the __main__ function for examples of use.
This package was partly developed to provide additional material in support of students and readers of the book Electro-Optical System Analysis and Design: A Radiometry Perspective, Cornelius J. Willers, ISBN 9780819495693, SPIE Monograph Volume PM236, SPIE Press, 2013. http://spie.org/x648.html?product_id=2021423&origin_id=x646
Module classes¶
- class PFlux[source]¶
Bases:
objectProvides a combined thermal and reflected photon irradiance estimate.
The class name derives from (P)hoton (Flux).
See here: https://github.com/NelisW/ComputationalRadiometry/blob/master/07-Optical-Sources.ipynb for mathematical derivations and more detail.
- lllPhotonrates(specranges=None)[source]¶
Calculate the approximate photon rate radiance for low-light conditions.
The colour temperature of various sources is used to predict the photon flux. The calculation uses the colour temperature of the source and the ratio of the real low-light luminance to the luminance of a Planck radiator at the same colour temperature.
This procedure critically depends on the sources’ spectral radiance in the various different spectral bands. For natural scenes the spectral shape is modelled by a Planck curve at the appropriate colour temperature.
Steps followed:
Calculate the photon rate for the scene at the appropriate colour temperature, spectrally weighted by the eye’s luminous efficiency response, for both photopic and scotopic vision.
Weight the photopic and scotopic photon rates according to illumination level.
Determine the ratio k of low-light-level scene illumination to photon irradiance. k is calculated in the visual band and then applied to scale all other spectral bands.
Use Planck radiation at the appropriate colour temperature to calculate radiance in any spectral band, scaled by k.
The
specrangesdict maps band name to a three-element list[spectral_vector, response_vector, type_str]wheretype_stris'wl'(wavelength in µm) or'wn'(wavenumber in cm⁻¹). Example:numpts = 300 specranges = { 'VIS': [np.linspace(0.43, 0.69, numpts).reshape(-1, 1), np.ones((numpts, 1)), 'wl'], 'NIR': [np.linspace(0.7, 0.9, numpts).reshape(-1, 1), np.ones((numpts, 1)), 'wl'], 'SWIR': [np.linspace(1.0, 1.7, numpts).reshape(-1, 1), np.ones((numpts, 1)), 'wl'], 'MWIR': [np.linspace(3.6, 4.9, numpts).reshape(-1, 1), np.ones((numpts, 1)), 'wl'], 'LWIR': [np.linspace(7.5, 10, numpts).reshape(-1, 1), np.ones((numpts, 1)), 'wl'], }
If
specrangesisNonethe predefined values above are used.The function returns a Pandas DataFrame with columns for the integrated spectral radiance in each band, plus
'Irradiance-lm/m2','ColourTemp','FracPhotop', and'k'. Rows are indexed by illumination-condition name and sorted in ascending order of irradiance.- Parameters:
specranges (|) – User-supplied spectral-band definition dict.
defaults. (| See format description above. Pass None to use built-in)
- Returns:
Pandas DataFrame with radiance in the specified spectral bands.
- Return type:
- pd.DataFrame
- Raises:
| No exception is raised. –