colour.SpectralDistribution_UPRTek#
- class colour.SpectralDistribution_UPRTek(path: str | Path, **kwargs: Any)[source]#
Bases:
SpectralDistribution_IESTM2714
Implement support to read and write IES TM-27-14 spectral data XML file from a UPRTek Pseudo-XLS file.
Attributes
Methods
Examples
>>> from os.path import dirname, join >>> from colour import SpectralShape >>> directory = join(dirname(__file__), "tests", "resources") >>> sd = SpectralDistribution_UPRTek( ... join(directory, "ESPD2021_0104_231446.xls") ... ) >>> print(sd.align(SpectralShape(380, 780, 10))) ... UPRTek ====== Path : ... Spectral Quantity : irradiance Reflection Geometry : None Transmission Geometry : None Bandwidth (FWHM) : None Bandwidth Corrected : None Header ------ Manufacturer : UPRTek Catalog Number : None Description : None Document Creator : None Unique Identifier : None Measurement Equipment : CV600 Laboratory : None Report Number : None Report Date : 2021/01/04_23:14:46 Document Creation Date : None Comments : {...} Spectral Data ------------- [[ 3.80000000e+02 3.02670000e-02] [ 3.90000000e+02 3.52230000e-02] [ 4.00000000e+02 1.93250000e-02] [ 4.10000000e+02 2.94260000e-02] [ 4.20000000e+02 8.76780000e-02] [ 4.30000000e+02 6.32578000e-01] [ 4.40000000e+02 3.62565900e+00] [ 4.50000000e+02 1.42069180e+01] [ 4.60000000e+02 1.70112970e+01] [ 4.70000000e+02 1.19673130e+01] [ 4.80000000e+02 8.42736200e+00] [ 4.90000000e+02 7.97729800e+00] [ 5.00000000e+02 8.71903600e+00] [ 5.10000000e+02 9.55321500e+00] [ 5.20000000e+02 9.90610500e+00] [ 5.30000000e+02 9.91394400e+00] [ 5.40000000e+02 9.74738000e+00] [ 5.50000000e+02 9.53404900e+00] [ 5.60000000e+02 9.27392200e+00] [ 5.70000000e+02 9.02323400e+00] [ 5.80000000e+02 8.91788800e+00] [ 5.90000000e+02 9.11454600e+00] [ 6.00000000e+02 9.55787100e+00] [ 6.10000000e+02 1.00600760e+01] [ 6.20000000e+02 1.04846200e+01] [ 6.30000000e+02 1.05679540e+01] [ 6.40000000e+02 1.04359870e+01] [ 6.50000000e+02 9.82122300e+00] [ 6.60000000e+02 8.77578300e+00] [ 6.70000000e+02 7.56471800e+00] [ 6.80000000e+02 6.29808600e+00] [ 6.90000000e+02 5.15623400e+00] [ 7.00000000e+02 4.05390600e+00] [ 7.10000000e+02 3.06638600e+00] [ 7.20000000e+02 2.19250000e+00] [ 7.30000000e+02 1.53922800e+00] [ 7.40000000e+02 1.14938200e+00] [ 7.50000000e+02 9.05095000e-01] [ 7.60000000e+02 6.90947000e-01] [ 7.70000000e+02 5.08426000e-01] [ 7.80000000e+02 4.11766000e-01]]
>>> sd.header.comments '{"Model Name": "CV600", "Serial Number": "19J00789", "Time": "2021/01/04_23:14:46", "Memo": [], "LUX": 695.154907, "fc": 64.605476, "CCT": 5198.0, "Duv": -0.00062, "I-Time": 12000.0, "X": 682.470886, "Y": 695.154907, "Z": 631.635071, "x": 0.339663, "y": 0.345975, "u\'": 0.209915, "v\'": 0.481087, "LambdaP": 456.0, "LambdaPValue": 18.404581, "CRI": 92.956993, "R1": 91.651062, "R2": 93.014732, "R3": 97.032013, "R4": 93.513229, "R5": 92.48259, "R6": 91.48687, "R7": 93.016129, "R8": 91.459312, "R9": 77.613075, "R10": 86.981613, "R11": 94.841324, "R12": 74.139542, "R13": 91.073837, "R14": 97.064323, "R15": 88.615669, "TLCI": 97.495056, "TLMF-A": 1.270032, "SSI-A": 44.881924, "Rf": 87.234917, "Rg": 98.510712, "IRR": 2.607891}' >>> sd.metadata.keys() dict_keys(['Model Name', 'Serial Number', 'Time', 'Memo', 'LUX', 'fc', 'CCT', 'Duv', 'I-Time', 'X', 'Y', 'Z', 'x', 'y', "u'", "v'", 'LambdaP', 'LambdaPValue', 'CRI', 'R1', 'R2', 'R3', 'R4', 'R5', 'R6', 'R7', 'R8', 'R9', 'R10', 'R11', 'R12', 'R13', 'R14', 'R15', 'TLCI', 'TLMF-A', 'SSI-A', 'Rf', 'Rg', 'IRR']) >>> sd.write(join(directory, "ESPD2021_0104_231446.spdx")) ...
- __str__() str [source]#
Return a formatted string representation of the UPRTek spectral distribution.
- Returns:
Formatted string representation.
- Return type:
Examples
>>> from os.path import dirname, join >>> from colour import SpectralShape >>> directory = join(dirname(__file__), "tests", "resources") >>> sd = SpectralDistribution_UPRTek( ... join(directory, "ESPD2021_0104_231446.xls") ... ) >>> print(sd.read().align(SpectralShape(380, 780, 10))) ... UPRTek ====== Path : ... Spectral Quantity : irradiance Reflection Geometry : None Transmission Geometry : None Bandwidth (FWHM) : None Bandwidth Corrected : None Header ------ Manufacturer : UPRTek Catalog Number : None Description : None Document Creator : None Unique Identifier : None Measurement Equipment : CV600 Laboratory : None Report Number : None Report Date : 2021/01/04_23:14:46 Document Creation Date : None Comments : {...} Spectral Data ------------- [[ 3.80000000e+02 3.02670000e-02] [ 3.90000000e+02 3.52230000e-02] [ 4.00000000e+02 1.93250000e-02] [ 4.10000000e+02 2.94260000e-02] [ 4.20000000e+02 8.76780000e-02] [ 4.30000000e+02 6.32578000e-01] [ 4.40000000e+02 3.62565900e+00] [ 4.50000000e+02 1.42069180e+01] [ 4.60000000e+02 1.70112970e+01] [ 4.70000000e+02 1.19673130e+01] [ 4.80000000e+02 8.42736200e+00] [ 4.90000000e+02 7.97729800e+00] [ 5.00000000e+02 8.71903600e+00] [ 5.10000000e+02 9.55321500e+00] [ 5.20000000e+02 9.90610500e+00] [ 5.30000000e+02 9.91394400e+00] [ 5.40000000e+02 9.74738000e+00] [ 5.50000000e+02 9.53404900e+00] [ 5.60000000e+02 9.27392200e+00] [ 5.70000000e+02 9.02323400e+00] [ 5.80000000e+02 8.91788800e+00] [ 5.90000000e+02 9.11454600e+00] [ 6.00000000e+02 9.55787100e+00] [ 6.10000000e+02 1.00600760e+01] [ 6.20000000e+02 1.04846200e+01] [ 6.30000000e+02 1.05679540e+01] [ 6.40000000e+02 1.04359870e+01] [ 6.50000000e+02 9.82122300e+00] [ 6.60000000e+02 8.77578300e+00] [ 6.70000000e+02 7.56471800e+00] [ 6.80000000e+02 6.29808600e+00] [ 6.90000000e+02 5.15623400e+00] [ 7.00000000e+02 4.05390600e+00] [ 7.10000000e+02 3.06638600e+00] [ 7.20000000e+02 2.19250000e+00] [ 7.30000000e+02 1.53922800e+00] [ 7.40000000e+02 1.14938200e+00] [ 7.50000000e+02 9.05095000e-01] [ 7.60000000e+02 6.90947000e-01] [ 7.70000000e+02 5.08426000e-01] [ 7.80000000e+02 4.11766000e-01]]
- read() SpectralDistribution_UPRTek [source]#
Read and parses the spectral data from a given UPRTek CSV file.
- Returns:
UPRTek spectral distribution.
- Return type:
Examples
>>> from os.path import dirname, join >>> from colour import SpectralShape >>> directory = join(dirname(__file__), "tests", "resources") >>> sd = SpectralDistribution_UPRTek( ... join(directory, "ESPD2021_0104_231446.xls") ... ) >>> print(sd.read().align(SpectralShape(380, 780, 10))) ... UPRTek ====== Path : ... Spectral Quantity : irradiance Reflection Geometry : None Transmission Geometry : None Bandwidth (FWHM) : None Bandwidth Corrected : None Header ------ Manufacturer : UPRTek Catalog Number : None Description : None Document Creator : None Unique Identifier : None Measurement Equipment : CV600 Laboratory : None Report Number : None Report Date : 2021/01/04_23:14:46 Document Creation Date : None Comments : {...} Spectral Data ------------- [[ 3.80000000e+02 3.02670000e-02] [ 3.90000000e+02 3.52230000e-02] [ 4.00000000e+02 1.93250000e-02] [ 4.10000000e+02 2.94260000e-02] [ 4.20000000e+02 8.76780000e-02] [ 4.30000000e+02 6.32578000e-01] [ 4.40000000e+02 3.62565900e+00] [ 4.50000000e+02 1.42069180e+01] [ 4.60000000e+02 1.70112970e+01] [ 4.70000000e+02 1.19673130e+01] [ 4.80000000e+02 8.42736200e+00] [ 4.90000000e+02 7.97729800e+00] [ 5.00000000e+02 8.71903600e+00] [ 5.10000000e+02 9.55321500e+00] [ 5.20000000e+02 9.90610500e+00] [ 5.30000000e+02 9.91394400e+00] [ 5.40000000e+02 9.74738000e+00] [ 5.50000000e+02 9.53404900e+00] [ 5.60000000e+02 9.27392200e+00] [ 5.70000000e+02 9.02323400e+00] [ 5.80000000e+02 8.91788800e+00] [ 5.90000000e+02 9.11454600e+00] [ 6.00000000e+02 9.55787100e+00] [ 6.10000000e+02 1.00600760e+01] [ 6.20000000e+02 1.04846200e+01] [ 6.30000000e+02 1.05679540e+01] [ 6.40000000e+02 1.04359870e+01] [ 6.50000000e+02 9.82122300e+00] [ 6.60000000e+02 8.77578300e+00] [ 6.70000000e+02 7.56471800e+00] [ 6.80000000e+02 6.29808600e+00] [ 6.90000000e+02 5.15623400e+00] [ 7.00000000e+02 4.05390600e+00] [ 7.10000000e+02 3.06638600e+00] [ 7.20000000e+02 2.19250000e+00] [ 7.30000000e+02 1.53922800e+00] [ 7.40000000e+02 1.14938200e+00] [ 7.50000000e+02 9.05095000e-01] [ 7.60000000e+02 6.90947000e-01] [ 7.70000000e+02 5.08426000e-01] [ 7.80000000e+02 4.11766000e-01]]