colour.SpectralDistribution_Sekonic

class colour.SpectralDistribution_Sekonic(path: str, **kwargs: Any)[source]

Bases: colour.io.uprtek_sekonic.SpectralDistribution_UPRTek

Implement support to read and write IES TM-27-14 spectral data XML file from a Sekonic CSV file.

Parameters
  • path (str) – Path for Sekonic CSV file.

  • kwargs (Any) –

Attributes

Methods

Examples

>>> from os.path import dirname, join
>>> from colour import SpectralShape
>>> directory = join(dirname(__file__), 'tests', 'resources')
>>> sd = SpectralDistribution_Sekonic(
...     join(directory, 'RANDOM_001_02._3262K.csv'))
>>> print(sd.read().align(SpectralShape(380, 780, 10)))
[[  3.80000000e+02   1.69406589e-21]
 [  3.90000000e+02   2.11758237e-22]
 [  4.00000000e+02   1.19813650e-05]
 [  4.10000000e+02   1.97110530e-05]
 [  4.20000000e+02   2.99661440e-05]
 [  4.30000000e+02   6.38192720e-05]
 [  4.40000000e+02   1.68909683e-04]
 [  4.50000000e+02   3.31902935e-04]
 [  4.60000000e+02   3.33143020e-04]
 [  4.70000000e+02   2.30227481e-04]
 [  4.80000000e+02   1.66981976e-04]
 [  4.90000000e+02   1.64439844e-04]
 [  5.00000000e+02   2.01534538e-04]
 [  5.10000000e+02   2.57840526e-04]
 [  5.20000000e+02   3.04612651e-04]
 [  5.30000000e+02   3.41368344e-04]
 [  5.40000000e+02   3.63639323e-04]
 [  5.50000000e+02   3.87050648e-04]
 [  5.60000000e+02   4.21619130e-04]
 [  5.70000000e+02   4.58150520e-04]
 [  5.80000000e+02   5.01176575e-04]
 [  5.90000000e+02   5.40883630e-04]
 [  6.00000000e+02   5.71256795e-04]
 [  6.10000000e+02   5.83703280e-04]
 [  6.20000000e+02   5.57688472e-04]
 [  6.30000000e+02   5.17328095e-04]
 [  6.40000000e+02   4.39994939e-04]
 [  6.50000000e+02   3.62766819e-04]
 [  6.60000000e+02   2.96465587e-04]
 [  6.70000000e+02   2.43966802e-04]
 [  6.80000000e+02   2.04134776e-04]
 [  6.90000000e+02   1.75304012e-04]
 [  7.00000000e+02   1.52887544e-04]
 [  7.10000000e+02   1.29795619e-04]
 [  7.20000000e+02   1.03122693e-04]
 [  7.30000000e+02   8.77607820e-05]
 [  7.40000000e+02   7.61524130e-05]
 [  7.50000000e+02   7.06516880e-05]
 [  7.60000000e+02   3.72199210e-05]
 [  7.70000000e+02   3.63058860e-05]
 [  7.80000000e+02   3.55755470e-05]]
>>> sd.header.comments 
>>> sd.metadata.keys() 
>>> sd.write(join(directory, 'RANDOM_001_02._3262K.spdx')
... 
__init__(path: str, **kwargs: Any)[source]
Parameters
  • path (str) –

  • kwargs (Any) –

read() colour.io.uprtek_sekonic.SpectralDistribution_Sekonic[source]

Read and parses the spectral data from a given Sekonic Pseudo-XLS file.

Returns

Sekonic spectral distribution.

Return type

colour.SpectralDistribution_Sekonic

Examples

>>> from os.path import dirname, join
>>> from colour import SpectralShape
>>> directory = join(dirname(__file__), 'tests', 'resources')
>>> sd = SpectralDistribution_Sekonic(
...     join(directory, 'RANDOM_001_02._3262K.csv'))
>>> print(sd.read().align(SpectralShape(380, 780, 10)))
[[  3.80000000e+02   1.69406589e-21]
 [  3.90000000e+02   2.11758237e-22]
 [  4.00000000e+02   1.19813650e-05]
 [  4.10000000e+02   1.97110530e-05]
 [  4.20000000e+02   2.99661440e-05]
 [  4.30000000e+02   6.38192720e-05]
 [  4.40000000e+02   1.68909683e-04]
 [  4.50000000e+02   3.31902935e-04]
 [  4.60000000e+02   3.33143020e-04]
 [  4.70000000e+02   2.30227481e-04]
 [  4.80000000e+02   1.66981976e-04]
 [  4.90000000e+02   1.64439844e-04]
 [  5.00000000e+02   2.01534538e-04]
 [  5.10000000e+02   2.57840526e-04]
 [  5.20000000e+02   3.04612651e-04]
 [  5.30000000e+02   3.41368344e-04]
 [  5.40000000e+02   3.63639323e-04]
 [  5.50000000e+02   3.87050648e-04]
 [  5.60000000e+02   4.21619130e-04]
 [  5.70000000e+02   4.58150520e-04]
 [  5.80000000e+02   5.01176575e-04]
 [  5.90000000e+02   5.40883630e-04]
 [  6.00000000e+02   5.71256795e-04]
 [  6.10000000e+02   5.83703280e-04]
 [  6.20000000e+02   5.57688472e-04]
 [  6.30000000e+02   5.17328095e-04]
 [  6.40000000e+02   4.39994939e-04]
 [  6.50000000e+02   3.62766819e-04]
 [  6.60000000e+02   2.96465587e-04]
 [  6.70000000e+02   2.43966802e-04]
 [  6.80000000e+02   2.04134776e-04]
 [  6.90000000e+02   1.75304012e-04]
 [  7.00000000e+02   1.52887544e-04]
 [  7.10000000e+02   1.29795619e-04]
 [  7.20000000e+02   1.03122693e-04]
 [  7.30000000e+02   8.77607820e-05]
 [  7.40000000e+02   7.61524130e-05]
 [  7.50000000e+02   7.06516880e-05]
 [  7.60000000e+02   3.72199210e-05]
 [  7.70000000e+02   3.63058860e-05]
 [  7.80000000e+02   3.55755470e-05]]