colour.SpectralDistribution_IESTM2714

class colour.SpectralDistribution_IESTM2714(path=None, header=None, spectral_quantity=None, reflection_geometry=None, transmission_geometry=None, bandwidth_FWHM=None, bandwidth_corrected=None)[source]

Defines a IES TM-27-14 spectral distribution.

This class can read and write IES TM-27-14 spectral data XML files.

Parameters
  • path (unicode, optional) – Spectral data XML file path.

  • header (IES_TM2714_Header, optional) – IES TM-27-14 spectral distribution header.

  • spectral_quantity (unicode, optional) – {‘flux’, ‘absorptance’, ‘transmittance’, ‘reflectance’, ‘intensity’, ‘irradiance’, ‘radiance’, ‘exitance’, ‘R-Factor’, ‘T-Factor’, ‘relative’, ‘other’}, Quantity of measurement for each element of the spectral data.

  • reflection_geometry (unicode, optional) – {‘di:8’, ‘de:8’, ‘8:di’, ‘8:de’, ‘d:d’, ‘d:0’, ‘45a:0’, ‘45c:0’, ‘0:45a’, ‘45x:0’, ‘0:45x’, ‘other’}, Spectral reflectance factors geometric conditions.

  • transmission_geometry (unicode, optional) – {‘0:0’, ‘di:0’, ‘de:0’, ‘0:di’, ‘0:de’, ‘d:d’, ‘other’}, Spectral transmittance factors geometric conditions.

  • bandwidth_FWHM (numeric, optional) – Spectroradiometer full-width half-maximum bandwidth in nanometers.

  • bandwidth_corrected (bool, optional) – Specifies if bandwidth correction has been applied to the measured data.

Notes

Reflection Geometry

  • di:8: Diffuse / eight-degree, specular component included.

  • de:8: Diffuse / eight-degree, specular component excluded.

  • 8:di: Eight-degree / diffuse, specular component included.

  • 8:de: Eight-degree / diffuse, specular component excluded.

  • d:d: Diffuse / diffuse.

  • d:0: Alternative diffuse.

  • 45a:0: Forty-five degree annular / normal.

  • 45c:0: Forty-five degree circumferential / normal.

  • 0:45a: Normal / forty-five degree annular.

  • 45x:0: Forty-five degree directional / normal.

  • 0:45x: Normal / forty-five degree directional.

  • other: User-specified in comments.

Transmission Geometry

  • 0:0: Normal / normal.

  • di:0: Diffuse / normal, regular component included.

  • de:0: Diffuse / normal, regular component excluded.

  • 0:di: Normal / diffuse, regular component included.

  • 0:de: Normal / diffuse, regular component excluded.

  • d:d: Diffuse / diffuse.

  • other: User-specified in comments.

mapping
path
header
spectral_quantity
reflection_geometry
transmission_geometry
bandwidth_FWHM
bandwidth_corrected
read()[source]
write()[source]

References

[IESCCommitteeTM2714WGroup14]

Examples

>>> from os.path import dirname, join
>>> directory = join(dirname(__file__), 'tests', 'resources')
>>> sd = SpectralDistribution_IESTM2714(
...     join(directory, 'Fluorescent.spdx')).read()
>>> sd.header.manufacturer
'Unknown'
>>> # Doctests ellipsis for Python 2.x compatibility.
>>> sd[501.7]  
0.0950000...
__init__(path=None, header=None, spectral_quantity=None, reflection_geometry=None, transmission_geometry=None, bandwidth_FWHM=None, bandwidth_corrected=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([path, header, spectral_quantity, …])

Initialize self.

align(shape[, interpolator, …])

Aligns the spectral distribution in-place to given spectral shape: Interpolates first then extrapolates to fit the given range.

arithmetical_operation(a, operation[, in_place])

Performs given arithmetical operation with \(a\) operand, the operation can be either performed on a copy or in-place.

clone()

copy()

Returns a copy of the sub-class instance.

domain_distance(a)

Returns the euclidean distance between given array and independent domain \(x\) closest element.

extrapolate(shape[, extrapolator, …])

Extrapolates the spectral distribution in-place according to CIE 15:2004 and CIE 167:2005 recommendations or given extrapolation arguments.

fill_nan([method, default])

Fill NaNs in independent domain \(x\) variable and corresponding range \(y\) variable using given method.

get()

interpolate(shape[, interpolator, …])

Interpolates the spectral distribution in-place according to CIE 167:2005 recommendation or given interpolation arguments.

is_uniform()

Returns if independent domain \(x\) variable is uniform.

normalise([factor])

Normalises the spectral distribution using given normalization factor.

read()

Reads and parses the spectral data XML file path.

signal_unpack_data([data, domain, dtype])

Unpack given data for continuous signal instantiation.

to_series()

Converts the continuous signal to a Pandas Series class instance.

trim(shape)

Trims the spectral distribution wavelengths to given spectral shape.

trim_wavelengths(shape)

write()

Write the spectral distribution spectral data to XML file path.

zeros()

Attributes

bandwidth_FWHM

Getter and setter property for the full-width half-maximum bandwidth.

bandwidth_corrected

Getter and setter property for whether bandwidth correction has been applied to the measured data.

data

domain

Getter and setter property for the continuous signal independent domain \(x\) variable.

dtype

Getter and setter property for the continuous signal dtype.

extrapolator

Getter and setter property for the continuous signal extrapolator type.

extrapolator_args

Getter and setter property for the continuous signal extrapolator instantiation time arguments.

function

Getter and setter property for the continuous signal callable.

header

Getter and setter property for the header.

interpolator

Getter and setter property for the continuous signal interpolator type.

interpolator_args

Getter and setter property for the continuous signal interpolator instantiation time arguments.

items

mapping

Getter and setter property for the mapping structure.

name

Getter and setter property for the abstract continuous function name.

path

Getter and setter property for the path.

range

Getter and setter property for the continuous signal corresponding range \(y\) variable.

reflection_geometry

Getter and setter property for the reflection geometry.

shape

Getter and setter property for the spectral distribution shape.

spectral_quantity

Getter and setter property for the spectral quantity.

strict_name

Getter and setter property for the spectral distribution strict name.

title

transmission_geometry

Getter and setter property for the transmission geometry.

values

Getter and setter property for the spectral distribution values.

wavelengths

Getter and setter property for the spectral distribution wavelengths \(\lambda_n\).