colour.IES_TM2714_Spd

class colour.IES_TM2714_Spd(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 power 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 power 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

Examples

>>> from os.path import dirname, join
>>> directory = join(dirname(__file__), 'tests', 'resources')
>>> spd = IES_TM2714_Spd(join(directory, 'Fluorescent.spdx'))
>>> spd.read()
True
>>> spd.header.manufacturer
'Unknown'
>>> # Doctests ellipsis for Python 2.x compatibility.
>>> spd[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]

Methods

__init__([path, header, spectral_quantity, …])
align(shape[, interpolator, …]) Aligns the spectral power 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, must be reimplemented by sub-classes.
domain_distance(a) Returns the euclidean distance between given array and independent domain \(x\) closest element.
extrapolate(shape[, extrapolator, …]) Extrapolates the spectral power 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 power 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 power 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 power distribution wavelengths to given spectral shape.
trim_wavelengths(shape)
write() Write the spd spectral data to XML file path.
zeros()