From defc3f4d63cc1aa77d0125aa428c11e42835fcea Mon Sep 17 00:00:00 2001 From: Roy Smart Date: Tue, 5 Nov 2024 15:58:34 -0700 Subject: [PATCH] Fixed a bug in `colorsynth.colorbar()` where the wavelength axis wasn't being selected correctly. --- colorsynth/_colorsynth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colorsynth/_colorsynth.py b/colorsynth/_colorsynth.py index dcbf87f..ddef1f2 100644 --- a/colorsynth/_colorsynth.py +++ b/colorsynth/_colorsynth.py @@ -979,8 +979,8 @@ def colorbar( spd_, wavelength_ = transform_spd_wavelength(cbar, wavelength) - XYZ = XYZcie1931_from_spd(spd_, wavelength_, axis=~0) - RGB = sRGB(XYZ, axis=~0) + XYZ = XYZcie1931_from_spd(spd_, wavelength_, axis=axis_) + RGB = sRGB(XYZ, axis=axis_) RGB = RGB.to_value(u.dimensionless_unscaled)