Menu
Lighting Toolbox
for MATlaB and Octave
Version 1.31
Various functions for lighting research calculations, colorimetry, plotting, lighting control and measurements.
110
Functions
4
Comments
298
Examples
How to cite:
Rudawski, Frederic, Lighting Toolbox for Matlab and Octave, 2022, version 1.31, DOI: 10.5281/zenodo.7275778, URL: https://github.com/Frudawski/LightingToolbox
Lighting Toolbox setup with MATLAB:
Tested with Matlab version 2022a:
- Download the Lighting Toolbox and move it to a location of your choice.
- Start Matlab
- Add the Lighting Toolbox to Matlab’s search path:
- Type: “addpath(‘path_to_lighting_toolbox/functions’)” in the command window
- Or click “Set Path” button under Matlab HOME tab -> “Add Folder…” -> select folder -> confirm -> “Save”
- Test the Lighting Toolbox functionality:
- Type: “plotciexy” in the command window
- A plot of the CIE x and y chromaticity should appear
Lighting Toolbox setup with GNU Octave:
Tested with GNU Octave version 7.1.0:
- Download the Lighting Toolbox and move it to a location of your choice.
- Start GNU Octave
- Add the Lighting Toolbox to Octave’s search path:
- type: “addpath(‘path_to_lighting_toolbox/functions’)” in the command window
- Optional: install image package for faster chromaticity plots:
- Type: “pkg install -forge image” in the command window
- Recommended: load image package at startup automatically:
- Type: “edit octaverc” in command window
- Add line: “pkg load image” to octaverc file
- Save -> close Octave -> start Octave
- Optional: install dataframe and io packages for Philips HUE control:
- Type: “pkg install -forge dataframe” in the command window
- Type: “pkg install -forge io” in the command window
- Recommended: load packages at startup automatically:
- Type: “edit octaverc” in command window
- Add line: “pkg load dataframe” to octaverc file
- Add line: “pkg load io” to octaverc file
- Save -> close Octave -> start Octave
- Test the Lighting Toolbox functionality:
- Type: “plotciexy” in the command window
- A plot of the CIE x and y chromaticity should appear
Changelog:
Version 1.31 – 09.02.2024
- Updated Philips Hue Bridge IP resolver
Version 1.30 – 24.01.2024
- Updated ciecct2spec, added factor as specified in CIE15:2018 p. 13 note 6
- Updated ciecri CCT determination
- Fixed error in cief1 when using multiple spectral responsitivities
- Added indoor daylight illuminants and L41 to ciespec function, updated A reference and introduced rounding mode option
- Added rounding mode option for ciewhitepoint function
- Updated CCT determination in duv function
- Fixed special case in specbandwidth function
- Updated bayerpattern function, added text to pixel
Version 1.29 – 27.11.2023
- Added specbar function
- Added writeldt function
- Added normldc function
- Added ciespecagetrans function
- Added ciespecagecorr function
Version 1.28 – 26.10.2023
- Fixed return string in TST function
- Fixed special case in cielab2lch function
- Updated info in egrid function
- Fixed labels in plotaopic function
- Improved performance in plotspec function, MATLAB version
- Fixed bug in specbandwidth function
- Added special case handling to specpeak function
Version 1.27 – 21.07.2023
- Fixed error in cieblh underestimating max exposure time
Version 1.26 – 29.04.2023
- Updated Km for 10° observer as in ISO/CIE 23539
- Added functions:
- specbandwidth
- specpeak
- speccentroid
- specspread
Version 1.25 – 25.04.2023
- updated K'm for scotopic vision according to new ISO/CIE 23539 standard
Version 1.24 – 10.04.2023
- readme update
- fixed error in cieblh function, evaluating more than one spectrum
Version 1.23 – 07.04.2023
- fixed TST function error in Octave
- fixed error in CIE chromaticity plots not using image toolbox in MATLAB
Version 1.22 – 02.04.2023
- fixed error in plotciexy using MATLAB without image toolbox
- fixed errors in cieblh, overestimated blh by factor km and underestimated max t
Version 1.21 – 17.03.2023
- fixed error in egrid size determination
Version 1.20 – 15.03.2023
- added readhyperspec function
- added fisheyeang function
- added fieldofview function
Version 1.19 – 28.02.2023
- updated D50 standard illuminant
- added normalize option to plotspecrange function
- improved texify function
Version 1.18 – 19.12.2022
- added texify function
Version 1.17 – 07.12.2022
- added bayerpattern function
- added black body radioator to ciespec function
- added option to plotcfibar and plotcfibar to disable numbering
- fixed InvertHardcopy in saveplot function
- fixed degree symbol in sundiagram for Octave
- updated help texts
Version 1.16 – 12.11.2022
- Added huedel function
- Updated Philips HUE functions
Version 1.15 – 03.11.2022
- added speceval function
Version 1.14 – 02.11.2022
- removed need for image toolbox from:
- cieplotxy
- cieplotuv
- cieplotuv_
- ciecri now with decimals
Version 1.13 – 28.10.2022
- updated huenew for Octave compability
- updated huecon for Octave compability
Version 1.12 – 27.10.2022
- removed polyshape function from plotciexy,uv,uv_ functions
- added multiple input/output support to cielab2lch
- added ciespec2xyz10 function
- fixed error of u,v return values in ciespec2cct function
- added single x,y,z return values to cieXYZ2xyz function
Version 1.11 – 25.10.2022
- no changes - ciecfi error fix already in version 1.09
Version 1.10 – 18.10.2022
- Added missing readjson function for HUE control functions
Version 1.09 – 18.10.2022
- Fixed error in ciecfi for CCTs 4000 K <= T <= 5000 K and Duv output format
Version 1.08 – 29.09.2022
- Updated plotgrid function and the description
Version 1.07 – 23.09.2022
- Fixed error in ciespec when getting several spectra at once
Version 1.06 – 19.07.2022
- Added mixYxy function
Version 1.05 – 18.07.2022
- Fixed error in south function: daytime saving time
- Added functions:
- suntime
- sunsrise
- sunset
- sundiagram
Version 1.04 – 28.06.2022
- Fixed reference whitepoint error in CIE chromaticity plots plotcieuv & plotcieuv_
Version 1.03 – 21.06.2022
- Added HUE control functions
- Added LT_location file for personal location preference setting
- Adapted sunpos, south and TST function for personal location preference setting
- Rewritten south function for speed optimization
- Added weighting parameter to ciespec and ciecct2spec functions
Version 1.02 – 25.05.2022
- Updated plotpolarE and plotpolarCCT functions
- Added specsky function
Version 1.01 – 13.05.2022
- Added CIECAM02 and CIECAM02inv functions
Version 1.00 – 05.05.2022
- Initial release