package documentation

Polygeist Colour Transforms Library Copyright 2023 Polygeist LTD Author: blitmaps

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

From __init__.py:

Class CMFs Contains the standard colour matching functions (for humans).
Class ColourTests No class docstring; 0/2 instance variable, 8/10 methods documented
Class Convert No class docstring; 7/7 static methods documented
Class Illuminant Contains standard illumination functions, and the means to compute them.
Function integrate Integrates 2 spectra with the same scale, using the trapezium rule.
Variable path_to_library_dir Undocumented
Variable visible_range Undocumented
Variable visible_range_nm Undocumented
path_to_library_dir =

Undocumented

visible_range_nm: list[int] =

Undocumented

visible_range =

Undocumented

def integrate(spectra_a, spectra_b):

Integrates 2 spectra with the same scale, using the trapezium rule.

Parameters
spectra_aArray of illumination power by nm (np.array)
spectra_bArray of sensor response by nm (np.array)
Returns
Sensor response (float)