Defines the IES_TM2714_Spd class handling IES TM-27-14 spectral data XML files.
References
[1] | IES Computer Committee, & TM-27-14 Working Group. (2014). IES Standard Format for the Electronic Transfer of Spectral Data Electronic Transfer of Spectral Data (pp. 1–16). ISBN:978-0879952952 |
Bases: colour.io.ies_tm2714.IES_TM2714_ElementSpecification
IES TM-27-14 spectral data XML file element specification.
Parameters: |
|
---|
Bases: object
Defines the header object for a IES TM-27-14 spectral power distribution.
Parameters: |
|
---|
Examples
>>> IES_TM2714_Header('colour-science')
<...IES_TM2714_Header object at 0x...>
>>> IES_TM2714_Header('colour-science').manufacturer
'colour-science'
Property for self.__catalog_number private attribute.
Returns: | self.__catalog_number. |
---|---|
Return type: | unicode |
Property for self.__comments private attribute.
Returns: | self.__comments. |
---|---|
Return type: | unicode |
Property for self.__description private attribute.
Returns: | self.__description. |
---|---|
Return type: | unicode |
Property for self.__document_creation_date private attribute.
Returns: | self.__document_creation_date. |
---|---|
Return type: | unicode |
Property for self.__document_creator private attribute.
Returns: | self.__document_creator. |
---|---|
Return type: | unicode |
Property for self.__laboratory private attribute.
Returns: | self.__laboratory. |
---|---|
Return type: | unicode |
Property for self.__manufacturer private attribute.
Returns: | self.__manufacturer. |
---|---|
Return type: | unicode |
Property for self.mapping attribute.
Return type: | Structure |
---|
Warning
IES_TM2714_Header.mapping is read only.
Property for self.__measurement_equipment private attribute.
Returns: | self.__measurement_equipment. |
---|---|
Return type: | unicode |
Property for self.__report_date private attribute.
Returns: | self.__report_date. |
---|---|
Return type: | unicode |
Property for self.__report_number private attribute.
Returns: | self.__report_number. |
---|---|
Return type: | unicode |
Property for self.__unique_identifier private attribute.
Returns: | self.__unique_identifier. |
---|---|
Return type: | unicode |
Bases: colour.colorimetry.spectrum.SpectralPowerDistribution
Defines a IES TM-27-14 spectral power distribution.
This class can read and write IES TM-27-14 spectral data XML files.
Parameters: |
|
---|
Notes
Reflection Geometry
Transmission Geometry
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]
array(0.095...)
Property for self.__bandwidth_FWHM private attribute.
Returns: | self.__bandwidth_FWHM. |
---|---|
Return type: | numeric |
Property for self.__bandwidth_corrected private attribute.
Returns: | self.__bandwidth_corrected. |
---|---|
Return type: | bool |
Property for self.__header private attribute.
Returns: | self.__header. |
---|---|
Return type: | IES_TM2714_Header |
Property for self.mapping attribute.
Return type: | Structure |
---|
Warning
IES_TM2714_Spd.mapping is read only.
Property for self.__path private attribute.
Returns: | self.__path. |
---|---|
Return type: | unicode |
Reads and parses the spectral data XML file path.
Returns: | Definition success. |
---|---|
Return type: | bool |
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.description
'Rare earth fluorescent lamp'
>>> # Doctests ellipsis for Python 2.x compatibility.
>>> spd[400]
array(0.034...)
Property for self.__reflection_geometry private attribute.
Returns: | self.__reflection_geometry. |
---|---|
Return type: | unicode |
Property for self.__spectral_quantity private attribute.
Returns: | self.__spectral_quantity. |
---|---|
Return type: | unicode |
Property for self.__transmission_geometry private attribute.
Returns: | self.__transmission_geometry. |
---|---|
Return type: | unicode |
Write the spd spectral data to XML file path.
Returns: | Definition success. |
---|---|
Return type: | bool |
Examples
>>> from os.path import dirname, join
>>> from shutil import rmtree
>>> from tempfile import mkdtemp
>>> directory = join(dirname(__file__), 'tests', 'resources')
>>> spd = IES_TM2714_Spd(join(directory, 'Fluorescent.spdx'))
>>> spd.read()
True
>>> temporary_directory = mkdtemp()
>>> spd.path = join(temporary_directory, 'Fluorescent.spdx')
>>> spd.write()
True
>>> rmtree(temporary_directory)