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: http://nbviewer.jupyter.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 pyradi.rypflux.PFlux

Provides 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)

Calculate the approximate photon rate radiance for low light conditions

The colour temperature of various sources are used to predict the photon flux. The calculation uses the colour temperature of the source and the ratio of real low light luminance to the luminance of a Planck radiator at the same temperature as the source colour temperature.

This procedure critically depends on the sources’ spectral radiance in the various different spectral bands. For this calculation the approach is taken that for natural scenes the spectral shape can be modelled by a Planck curve at the appropriate colour temperature.

The steps followed are as follows:

  1. Calculate the photon rate for the scene at the appropriate colour temperature, spectrally weighted by the eye’s luminous efficiency response. Do this for photopic and scotopic vision.
  2. Weigh the photopic and scotopic photon rates according to illumination level
  3. Determine the ratio k of low light level scene illumination to photon irradiance. This factor k is calculated in the visual band, but then applied to scale the other spectral bands by the same scale.
  4. Use Planck radiation at the appropriate colour temperature to calculate the radiance in any spectral band, but then scale the value with the factor k.

The specranges format is a dictionary where the key is the spectral band, and the entry against each key is a list containing two items: the spectral vector and the associated spectral band definition. The third entry in the list must be ‘wn’ (=wavenumber) or ‘wl’ (=wavelength) to signify the type of spectral variable One simple example definition is as follows:

numpts = 300
specranges = {
    key: [wavelength vector, response vector ], 
    '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 specranges is None, the predefined values are used, as shown above.

The function returns scene radiance in a Pandas datatable with the following columns containing the spectrally weighted integrated radiance:

u'Irradiance-lm/m2', u'ColourTemp', u'FracPhotop', u'k',
u'Radiance-q/(s.m2.sr)-NIR', u'Radiance-q/(s.m2.sr)-VIS',
u'Radiance-q/(s.m2.sr)-MWIR', u'Radiance-q/(s.m2.sr)-LWIR',
u'Radiance-q/(s.m2.sr)-SWIR'

and rows with the following index:

u'Overcast night', u'Star light', u'Quarter moon', u'Full moon',
u'Deep twilight', u'Twilight', u'Very dark day', u'Overcast day',
u'Full sky light', u'Sun light'
Args:
specranges (dictionary): User-supplied dictionary defining the spectral
responses. See the dictionary format above and an example in the code.
Returns:
Pandas dataframe with radiance in the specified spectral bands.
The dataframe contains integrated and spectral radiance.
Raises:
No exception is raised.