This is the first article on Python Packages and is somewhat experimental in the format. See our article on Python basics at Data Analysis - Using Python to Create your own App – Luminus Devices (zendesk.com).
The Colour-Science library "is an open-source Python package providing a comprehensive number of algorithms and datasets for colour science. It is freely available under the New BSD License terms."
We have written a Datalore notebook that demonstrates some of the power of the Colour-Science library. This demo also provides examples of getting data in and out of the library data structures. We have also linked the Excel file used as an input as a convenience to those that wish to clone this notebook. Most of the content of this article is in the Datalore notebook.
Below are some of the plots you can create in Colour with only a few lines of code.
Note - 9/6/23 Numpy version 1.20 depreciated the use of some type conversion alias commands such as np.complex and np.float so that code libraries that use these commands now have to update their code to maintain compatibility with Numpy. The last version of Numpy that is compatible with the current versions of Colour and Luxpy is numpy 1.19.5. Current versions of Pandas and Matplotlib both require numpy > 1.20, so to get this to work, change the versions as follows:
Numpy 1.19.5
Pandas 1.4.4
Matplotlib 3.6.3
This can be done in Datalore using the Environment tab to the left. Search for each package, click on it, and use the pull-down menu to select the version.
----------------------------------------------------------------------------------------------------------------
These links are being provided as a convenience and for informational purposes only; they do not constitute an endorsement or an approval by Luminus of any of the products, services or opinions of the corporation or organization or individual. Luminus bears no responsibility for the accuracy, legality or content of the external site or for that of subsequent links. Contact the external site for answers to questions regarding its content.
Comments
0 comments
Please sign in to leave a comment.