From 97e90da2ddb717e23885428fe3ed7c73cb2a8b02 Mon Sep 17 00:00:00 2001 From: "Kevin A.G. Smet" Date: Fri, 3 Mar 2023 19:35:10 +0100 Subject: [PATCH] update --- luxpy/color/cam/camjabz.py | 2 +- luxpy/color/cam/ciecam02.py | 4 +++- luxpy/color/cam/ciecam16.py | 2 +- luxpy/color/cam/zcam.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/luxpy/color/cam/camjabz.py b/luxpy/color/cam/camjabz.py index 99ee651f..40448c35 100644 --- a/luxpy/color/cam/camjabz.py +++ b/luxpy/color/cam/camjabz.py @@ -288,7 +288,7 @@ def run(data, xyzw = None, outin = 'J,aM,bM', cieobs = _CIEOBS, surround_parameters = _SURROUND_PARAMETERS if isinstance(surround, str): - surround = surround_parameters[conditions['surround']] + surround = surround_parameters[surround] F, FLL, Nc, c = [surround[x] for x in sorted(surround.keys())] # Define cone/chromatic adaptation sensor space: diff --git a/luxpy/color/cam/ciecam02.py b/luxpy/color/cam/ciecam02.py index 2d46e207..5ec347e2 100644 --- a/luxpy/color/cam/ciecam02.py +++ b/luxpy/color/cam/ciecam02.py @@ -163,7 +163,7 @@ def run(data, xyzw = _DEFAULT_WHITE_POINT, Yw = None, outin = 'J,aM,bM', surround_parameters = _SURROUND_PARAMETERS if isinstance(surround, str): - surround = surround_parameters[conditions['surround']] + surround = surround_parameters[surround] F, FLL, Nc, c = [surround[x] for x in sorted(surround.keys())] if naka_rushton_parameters is None: naka_rushton_parameters = _NAKA_RUSHTON_PARAMETERS if unique_hue_data is None: unique_hue_data = _UNIQUE_HUE_DATA @@ -581,7 +581,9 @@ def normalize_to_Lw(Ill, Lw, cieobs, rflM): Ill2, Ill2M = normalize_to_Lw(Ill2, Lw, cieobs, rflM) n = 6 + xyz1, xyzw1 = lx.spd_to_xyz(Ill1, cieobs = cieobs, relative = True, rfl = rflM, out = 2) + xyz1 = xyz1[:n,0,:] Ill1M = Ill1M[:(n+1),0,:] diff --git a/luxpy/color/cam/ciecam16.py b/luxpy/color/cam/ciecam16.py index 3307819f..733bd735 100644 --- a/luxpy/color/cam/ciecam16.py +++ b/luxpy/color/cam/ciecam16.py @@ -150,7 +150,7 @@ def run(data, xyzw = _DEFAULT_WHITE_POINT, Yw = None, outin = 'J,aM,bM', surround_parameters = _SURROUND_PARAMETERS if isinstance(surround, str): - surround = surround_parameters[conditions['surround']] + surround = surround_parameters[surround] F, FLL, Nc, c = [surround[x] for x in sorted(surround.keys())] if naka_rushton_parameters is None: naka_rushton_parameters = _NAKA_RUSHTON_PARAMETERS if unique_hue_data is None: unique_hue_data = _UNIQUE_HUE_DATA diff --git a/luxpy/color/cam/zcam.py b/luxpy/color/cam/zcam.py index 742d877a..31fa3311 100644 --- a/luxpy/color/cam/zcam.py +++ b/luxpy/color/cam/zcam.py @@ -341,7 +341,7 @@ def run(data, xyzw = None, outin = 'J,aM,bM', cieobs = _CIEOBS, surround_parameters = _SURROUND_PARAMETERS if isinstance(surround, str): - surround = surround_parameters[conditions['surround']] + surround = surround_parameters[surround] F, FLL, Nc, c = [surround[x] for x in sorted(surround.keys())] # Define cone/chromatic adaptation sensor space: