Skip to content

Colour 0.3.5

Compare
Choose a tag to compare
@KelSolaar KelSolaar released this 15 Jul 11:10
· 4110 commits to develop since this release

Colour 0.3.5 - Alpha Milestone

The focus on this major milestone has been vectorisation of most of the API code, more details are available in this Google Docs Spreadsheet and the derivation of RED colourspaces.

Features

colour.adaptation.cie1994

  • colour.chromatic_adaptation_CIE1994 definition has been vectorised, handles n-dimensional arrays and is now 250.7 times faster. (@KelSolaar)

colour.adaptation.cmccat2000

  • colour.colour.CMCCAT2000_forward definition has been vectorised, handles n-dimensional arrays and is now 372.9 times faster. (@KelSolaar)
  • colour.colour.CMCCAT2000_reverse definition has been vectorised, handles n-dimensional arrays and is now 360.1 times faster. (@KelSolaar)

colour.adaptation.fairchild1990

  • colour.chromatic_adaptation_Fairchild1990 definition has been vectorised, handles n-dimensional arrays and is now 92.7 times faster. (@KelSolaar)

colour.adaptation.vonkries

  • colour.chromatic_adaptation_matrix_VonKries definition has been vectorised, handles n-dimensional arrays and is now 77.8 times faster. (@KelSolaar)
  • colour.chromatic_adaptation_VonKries definition has been vectorised, handles n-dimensional arrays and is now 60.0 times faster. (@KelSolaar)

colour.algebra

  • colour.cartesian_to_spherical definition has been vectorised, handles n-dimensional arrays and is now 165.0 times faster. (@KelSolaar)
  • colour.spherical_to_cartesian definition has been vectorised, handles n-dimensional arrays and is now 97.2 times faster. (@KelSolaar)
  • colour.cartesian_to_cylindrical definition has been vectorised, handles n-dimensional arrays and is now 151.8 times faster. (@KelSolaar)
  • colour.cylindrical_to_cartesian definition has been vectorised, handles n-dimensional arrays and is now 123.1 times faster. (@KelSolaar)

colour.appearance

  • colour.XYZ_to_ATD95 definition has been vectorised, handles n-dimensional arrays and is now 17.5 times faster. (@KelSolaar, @MichaelMauderer)
  • colour.XYZ_to_CIECAM02 definition has been vectorised, handles n-dimensional arrays and is now 77.4 times faster. (@KelSolaar, @MichaelMauderer)
  • colour.CIECAM02_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 16.3 times faster. (@KelSolaar, @MichaelMauderer)
  • colour.XYZ_to_Hunt definition has been vectorised, handles n-dimensional arrays and is now 130.2 times faster. (@KelSolaar, @MichaelMauderer)
  • colour.XYZ_to_LLAB definition has been vectorised, handles n-dimensional arrays and is now 34 times faster. (@KelSolaar)
  • colour.XYZ_to_Nayatani95 definition has been vectorised, handles n-dimensional arrays and is now 111.7 times faster. (@KelSolaar, @MichaelMauderer)
  • colour.XYZ_to_RLAB definition has been vectorised, handles n-dimensional arrays and is now 53.6 times faster. (@KelSolaar, @MichaelMauderer)

colour.colorimetry.blackbody

  • colour.planck_law definition has been vectorised, handles n-dimensional arrays and is now 162.1 times faster. (@KelSolaar)

colour.colorimetry.lefs

  • colour.mesopic_weighting_function definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)

colour.colorimetry.lightness

  • colour.lightness_Glasser1958 definition has been vectorised, handles n-dimensional arrays and is now 16.0 times faster. (@KelSolaar)
  • colour.lightness_Wyszecki1963 definition has been vectorised, handles n-dimensional arrays and is now 48.3 times faster. (@KelSolaar)
  • colour.lightness_1976 definition has been vectorised, handles n-dimensional arrays and is now 33.3 times faster. (@KelSolaar)

colour.colorimetry.luminance

  • colour.luminance_Newhall1943 definition has been vectorised, handles n-dimensional arrays and is now 24.1 times faster. (@KelSolaar)
  • colour.luminance_ASTMD153508 definition has been vectorised, handles n-dimensional arrays and is now 26.3 times faster. (@KelSolaar)
  • colour.luminance_1976 definition has been vectorised, handles n-dimensional arrays and is now 35.7 times faster. (@KelSolaar)

colour.colorimetry.spectrum

  • colour.SpectralShape.__contains__ now accepts array_like input. (@KelSolaar)
  • colour.SpectralPowerDistribution.__getitem__ now accepts array_like and slice inputs. (@KelSolaar)
  • colour.SpectralPowerDistribution.__setitem__ now accepts array_like and slice inputs. (@KelSolaar)
  • colour.SpectralPowerDistribution.__contains__ now accepts array_like inputs. (@KelSolaar)
  • colour.SpectralPowerDistribution.get now accepts array_like inputs. (@KelSolaar)
  • colour.TriSpectralPowerDistribution.__getitem__ now accepts array_like and slice inputs. (@KelSolaar)
  • colour.TriSpectralPowerDistribution.__setitem__ now accepts array_like and slice inputs. (@KelSolaar)
  • colour.TriSpectralPowerDistribution.__contains__ now accepts array_like inputs. (@KelSolaar)
  • colour.TriSpectralPowerDistribution.get now accepts array_like inputs (@KelSolaar)

colour.colorimetry.transformations

  • colour.RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)
  • colour.RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)
  • colour.RGB_10_degree_cmfs_to_LMS_10_degree_cmfs definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)
  • colour.LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)
  • colour.LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)

colour.colorimetry.tristimulus

  • colour.wavelength_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 131.0 times faster. (@KelSolaar)

colour.colorimetry.whiteness

  • colour.whiteness_Berger1959 definition has been vectorised, handles n-dimensional arrays and is now 277.6 times faster. (@KelSolaar)
  • colour.whiteness_Taube1960 definition has been vectorised, handles n-dimensional arrays and is now 440.6 times faster. (@KelSolaar)
  • colour.whiteness_Stensby1968 definition has been vectorised, handles n-dimensional arrays and is now 358.3 times faster. (@KelSolaar)
  • colour.whiteness_ASTM313 definition has been vectorised, handles n-dimensional arrays and is now 305.5 times faster. (@KelSolaar)
  • colour.whiteness_Ganz1979 definition has been vectorised, handles n-dimensional arrays and is now 194.1 times faster. (@KelSolaar)
  • colour.whiteness_CIE2004 definition has been vectorised, handles n-dimensional arrays and is now 388.9 times faster. (@KelSolaar)

colour.difference

  • colour.delta_E_CIE1976 definition has been vectorised, handles n-dimensional arrays and is now 283.2 times faster. (@KelSolaar)
  • colour.delta_E_CIE1994 definition has been vectorised, handles n-dimensional arrays and is now 256 times faster. (@KelSolaar)
  • colour.delta_E_CIE2000 definition has been vectorised, handles n-dimensional arrays and is now 140.3 times faster. (@KelSolaar)
  • colour.delta_E_CMC definition has been vectorised, handles n-dimensional arrays and is now 115.4 times faster. (@KelSolaar)

colour.io

colour.models.cie_xyy

  • colour.XYZ_to_xyY definition has been vectorised, handles n-dimensional arrays and is now 15.5 times faster. (@KelSolaar)
  • colour.xyY_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 70.8 times faster. (@KelSolaar)
  • colour.xy_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 74.5 times faster. (@KelSolaar)
  • colour.XYZ_to_xy definition has been vectorised, handles n-dimensional arrays and is now 17.7 times faster. (@KelSolaar)

colour.models.cie_lab

  • colour.XYZ_to_Lab definition has been vectorised, handles n-dimensional arrays and is now 49.2 times faster. (@KelSolaar)
  • colour.Lab_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 52.3 times faster. (@KelSolaar)
  • colour.Lab_to_LCHab definition has been vectorised, handles n-dimensional arrays and is now 171.2 times faster. (@KelSolaar)
  • colour.LCHab_to_Lab definition has been vectorised, handles n-dimensional arrays and is now 173.5 times faster. (@KelSolaar)

colour.models.cie_luv

  • colour.XYZ_to_Luv definition has been vectorised, handles n-dimensional arrays and is now 205.8 times faster. (@KelSolaar)
  • colour.Luv_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 175.2 times faster. (@KelSolaar)
  • colour.Luv_to_uv definition has been vectorised, handles n-dimensional arrays and is now 183 times faster. (@KelSolaar)
  • colour.Luv_uv_to_xy definition has been vectorised, handles n-dimensional arrays and is now 218.7 times faster. (@KelSolaar)
  • colour.Luv_to_LCHuv definition has been vectorised, handles n-dimensional arrays and is now 144.1 times faster. (@KelSolaar)
  • colour.LCHuv_to_Luv definition has been vectorised, handles n-dimensional arrays and is now 168.7 times faster. (@KelSolaar)

colour.models.cie_ucs

  • colour.XYZ_to_UCS definition has been vectorised, handles n-dimensional arrays and is now 158.3 times faster. (@KelSolaar)
  • colour.UCS_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 216.4 times faster. (@KelSolaar)
  • colour.UCS_to_uv definition has been vectorised, handles n-dimensional arrays and is now 119 times faster. (@KelSolaar)
  • colour.UCS_uv_to_xy definition has been vectorised, handles n-dimensional arrays and is now 222.2 times faster. (@KelSolaar)

colour.models.cie_uvw

  • colour.XYZ_to_UVW definition has been vectorised, handles n-dimensional arrays and is now 70.1 times faster. (@KelSolaar)

colour.models.dataset

  • All the RGB colourspace model OECF have been vectorised and handle n-dimensional arrays.
  • Implement support for the following RED colourspaces: (@KelSolaar)
    • REDcolor
    • REDcolor2
    • REDcolor3
    • REDcolor4
    • DRAGONcolor
    • DRAGONcolor2
  • Implement support for Panasonic V-Gamut RGB colourspace. (@KelSolaar)

colour.models.deprecated

  • colour.RGB_to_HSV definition has been vectorised, handles n-dimensional arrays and is now 71 times faster. (@KelSolaar)
  • colour.HSV_to_RGB definition has been vectorised, handles n-dimensional arrays and is now 66.8 times faster. (@KelSolaar)
  • colour.RGB_to_HSL definition has been vectorised, handles n-dimensional arrays and is now 66 times faster. (@KelSolaar)
  • colour.HSL_to_RGB definition has been vectorised, handles n-dimensional arrays and is now 57.7 times faster. (@KelSolaar)
  • colour.RGB_to_CMY definition has been vectorised, handles n-dimensional arrays and is now 696 times faster. (@KelSolaar)
  • colour.CMY_to_RGB definition has been vectorised, handles n-dimensional arrays and is now 732.5 times faster. (@KelSolaar)
  • colour.CMY_to_CMYK definition has been vectorised, handles n-dimensional arrays and is now 84.6 times faster. (@KelSolaar)
  • colour.CMYK_to_CMY definition has been vectorised, handles n-dimensional arrays and is now 139.1 times faster. (@KelSolaar)

colour.models.derivation

  • Implement colour.primaries_whitepoint definition computing primaries and whitepoint from given normalised primary matrix. (@tashdor, @KelSolaar)
  • colour.RGB_luminance definition has been vectorised, handles n-dimensional arrays and is now 5354.1 times faster. (@KelSolaar)

colour.models.ipt

  • colour.XYZ_to_IPT definition has been vectorised, handles n-dimensional arrays and is now 24.3 times faster. (@KelSolaar)
  • colour.IPT_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 23.9 times faster. (@KelSolaar)
  • colour.IPT_hue_angle definition has been vectorised, handles n-dimensional arrays and is now 44.8 times faster. (@KelSolaar)

colour.models.log

  • colour.linear_to_cineon definition has been vectorised, handles n-dimensional arrays and is now 82.2 times faster. (@KelSolaar)
  • colour.cineon_to_linear definition has been vectorised, handles n-dimensional arrays and is now 54.7 times faster. (@KelSolaar)
  • colour.linear_to_panalog definition has been vectorised, handles n-dimensional arrays and is now 77.6 times faster. (@KelSolaar)
  • colour.panalog_to_linear definition has been vectorised, handles n-dimensional arrays and is now 55.5 times faster. (@KelSolaar)
  • colour.linear_to_red_log_film definition has been vectorised, handles n-dimensional arrays and is now 76 times faster. (@KelSolaar)
  • colour.red_log_film_to_linear definition has been vectorised, handles n-dimensional arrays and is now 59.2 times faster. (@KelSolaar)
  • colour.linear_to_viper_log definition has been vectorised, handles n-dimensional arrays and is now 69 times faster. (@KelSolaar)
  • colour.viper_log_to_linear definition has been vectorised, handles n-dimensional arrays and is now 49 times faster. (@KelSolaar)
  • colour.linear_to_pivoted_log definition has been vectorised, handles n-dimensional arrays and is now 59.6 times faster. (@KelSolaar)
  • colour.pivoted_log_to_linear definition has been vectorised, handles n-dimensional arrays and is now 46.3 times faster. (@KelSolaar)
  • colour.linear_to_c_log definition has been vectorised, handles n-dimensional arrays and is now 55.4 times faster. (@KelSolaar)
  • colour.c_log_to_linear definition has been vectorised, handles n-dimensional arrays and is now 48.2 times faster. (@KelSolaar)
  • Implement colour.linear_to_v_log and colour.v_log_to_linear definitions providing support for Panasonic V-Log. (@KelSolaar)

colour.models.rgb

  • colour.XYZ_to_RGB definition has been vectorised, handles n-dimensional arrays and is now 1739.5 times faster. (@KelSolaar)
  • colour.RGB_to_XYZ definition has been vectorised, handles n-dimensional arrays and is now 1813.5 times faster. (@KelSolaar)
  • colour.RGB_to_RGB definition has been vectorised, handles n-dimensional arrays and is now 1691.2 times faster. (@KelSolaar)

colour.notation.munsell

  • colour.munsell_value_Priest1920 definition has been vectorised, handles n-dimensional arrays and is now 332 times faster. (@KelSolaar)
  • colour.munsell_value_Munsell1933 definition has been vectorised, handles n-dimensional arrays and is now 196.8 times faster. (@KelSolaar)
  • colour.munsell_value_Moon1943 definition has been vectorised, handles n-dimensional arrays and is now 17.2 times faster. (@KelSolaar)
  • colour.munsell_value_Saunderson1944 definition has been vectorised, handles n-dimensional arrays and is now 19.5 times faster. (@KelSolaar)
  • colour.munsell_value_Ladd1955 definition has been vectorised, handles n-dimensional arrays and is now 18.1 times faster. (@KelSolaar)
  • colour.munsell_value_McCamy1987 definition has been vectorised, handles n-dimensional arrays and is now 30.6 times faster. (@KelSolaar)
  • colour.munsell_value_ASTMD153508 definition has been vectorised, handles n-dimensional arrays and is now 2201.5 times faster. (@KelSolaar)

colour.notation.triplet

  • colour.RGB_to_HEX definition has been vectorised, handles n-dimensional arrays and is now 3.3 times faster. (@KelSolaar)
  • colour.HEX_to_RGB definition has been vectorised, handles n-dimensional arrays and is now 1.8 times faster. (@KelSolaar)

colour.phenomenons

  • colour.scattering_cross_section definition has been vectorised, handles n-dimensional arrays and is now 58.1 times faster. (@KelSolaar)
  • colour.rayleigh_optical_depth definition has been vectorised, handles n-dimensional arrays and is now 89.8 times faster. (@KelSolaar)

colour.plotting

  • Implement colour.plotting.RGB_colourspaces_CIE_1960_UCS_chromaticity_diagram_plot and colour.plotting.RGB_colourspaces_CIE_1976_UCS_chromaticity_diagram_plot definitions to visualise RGB colourspaces in the CIE 1960 UCS and CIE 1976 UCS chromaticity diagrams. (@KelSolaar)
  • Implement colour.plotting.RGB_chromaticity_coordinates_CIE_1931_chromaticity_diagram_plot, colour.plotting.RGB_chromaticity_coordinates_CIE_1960_UCS_chromaticity_diagram_plot and colour.plotting.RGB_chromaticity_coordinates_CIE_1976_UCS_chromaticity_diagram_plot definitions to visualise RGB chromaticities in the CIE 1931, CIE 1960 UCS and CIE 1976 UCS chromaticity diagrams. (@KelSolaar)
  • Implement colour.plotting.image_plot definition to visualise images. (@KelSolaar)

colour.temperature

  • colour.xy_to_CCT_McCamy1992 definition has been vectorised, handles n-dimensional arrays and is now 53.1 times faster. (@KelSolaar)
  • colour.xy_to_CCT_Hernandez1999 definition has been vectorised, handles n-dimensional arrays and is now 48.7 times faster. (@KelSolaar)
  • colour.CCT_to_xy_Kang2002 definition has been vectorised, handles n-dimensional arrays and is now 29.5 times faster. (@KelSolaar)
  • colour.CCT_to_xy_CIE_D definition has been vectorised, handles n-dimensional arrays and is now 43.6 times faster. (@KelSolaar)

colour.utilities.array

  • Implement colour.as_numeric utility definition attempting to convert ndarray or other variable types to numeric. (@KelSolaar)
  • Implement colour.in_array utility definition testing if each element of an array is also present in a second array within given tolerance. (@KelSolaar)
  • Implement colour.tstack utility definition stacking arrays in sequence along the last axis. (@KelSolaar)
  • Implement colour.tsplit utility definition splitting arrays in sequence along the last axis. (@KelSolaar)
  • Implement colour.row_as_diagonal definition returning the per row diagonal matrices of the given array. (@KelSolaar)
  • Implement colour.dot_vector convenient definition performing the dot product of two arrays where m array is expected to be an array of 3x3 matrices and v an array of vectors. (@KelSolaar)
  • Implement colour.dot_matrix convenient definition performing the dot product of two arrays where a array is expected to be an array of 3x3 matrices and b array another array of of 3x3 matrices. (@KelSolaar)

colour.utilities.common

  • Implement decorators to handle Numpy computation errors and Python warnings: (@KelSolaar)
    • colour.handle_numpy_errors
    • colour.ignore_numpy_errors
    • colour.raise_numpy_errors
    • colour.print_numpy_errors
    • colour.warn_numpy_errors
    • colour.ignore_python_warnings
  • Implement support for arbitrary axis usage in "colour.normalise" definition. (@KelSolaar)

colour.volume

  • colour.is_within_macadam_limits definition has been vectorised, handles n-dimensional arrays and is now 121.6 times faster. (@KelSolaar)

Fixes

Changes

colour.algebra

  • `colour.algebra.common.FLOATING_POINT_NUMBER_PATTERN: (@KelSolaar)
    • Location: colour.constants.common.FLOATING_POINT_NUMBER_PATTERN
  • `colour.algebra.common.INTEGER_THRESHOLD: (@KelSolaar)
    • Location: colour.constants.common.INTEGER_THRESHOLD
  • `colour.algebra.common.steps: (@KelSolaar)
    • Location: colour.utilities.array.steps
  • `colour.algebra.common.closest: (@KelSolaar)
    • Location: colour.utilities.array.closest
  • `colour.algebra.common.as_array: (@KelSolaar)
    • Location: colour.utilities.array.as_array
  • `colour.algebra.common.is_uniform: (@KelSolaar)
    • Location: colour.utilities.array.is_uniform
  • `colour.algebra.common.is_iterable: (@KelSolaar)
    • Location: colour.utilities.common.is_iterable
  • `colour.algebra.common.is_numeric: (@KelSolaar)
    • Location: colour.utilities.common.is_numeric
  • `colour.algebra.common.is_integer: (@KelSolaar)
    • Location: colour.utilities.common.is_integer
  • `colour.algebra.common.normalise: (@KelSolaar)
    • Location: colour.utilities.array.normalise
    • Signature: normalise(x, axis=None, factor=1, clip=True)
  • colour.algebra.regression.linear_regression definition: (@KelSolaar)
    • Remove

colour.characterisation

  • colour.first_order_colour_fit: (@KelSolaar)
    • Behaviour: Performs a first order colour fit from given m1 colour matrix to m2 colour matrix instead of m2 to m1.

colour.colorimetry

  • colour.SpectralPowerDistribution.get defaults to np.nan instead of None. (@KelSolaar)
  • colour.TriSpectralPowerDistribution.get defaults to np.nan instead of None. (@KelSolaar)

colour.models

  • colour.linear_to_red_log (@KelSolaar)
    • Name: colour.linear_to_red_log_film
  • colour.red_log_to_linear (@KelSolaar)
    • Name: colour.red_log_film_to_linear

colour.plotting

  • colour.plotting.colourspaces_CIE_1931_chromaticity_diagram_plot (@KelSolaar)
    • Name: colour.plotting.RGB_colourspaces_CIE_1931_chromaticity_diagram_plot
  • colour.plotting.colour_cycle
    • Signature: colour.plotting.colour_cycle(**kwargs)