Please help with colour.sd_gaussian
definition output.
#1171
-
I'm using "colour.sd_gaussian" for some project. I found it is not generating correct Gaussian distribution. Here is my test code:
Based on how FWHM is defined, I think it should be 0.5 instead of 0.7788. Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I'm abroad with limited time to look at things, we follow and implement Yoshi Ohno formula, Cheers, Thomas |
Beta Was this translation helpful? Give feedback.
-
Also if we don't have that LED model in the code, it could be very helpful.
- Tucker
…On Tue, Jun 27, 2023 at 3:04 PM Thomas Mansencal ***@***.***> wrote:
Ah yes you are both correct, some other options:
- Rename sd_gaussian_fwhm to sd_half_spectral_width and the argument
to hwhm, this would NOT break the API.
- Keep sd_gaussian_fwhm but fix it to actually use fwhm and add a new
sd_half_spectral_width definition, this would break existing behaviour
but it seems like we have an issue here so a fix is in order.
—
Reply to this email directly, view it on GitHub
<#1171 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABS4J5WBUXOFSNDAMNM3QC3XNMVC7ANCNFSM6AAAAAAZQ3O5F4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Guys, I think this is a bug, after reading the source code. The function sd_gaussian_fwhm is using a wrong formula of generating Gaussian distribution. Gaussian distribution (https://mathworld.wolfram.com/GaussianFunction.html) should not directly use FWHM as input, but need to convert FWHM to Sigma first. |
Beta Was this translation helpful? Give feedback.
Fixed with #1184, merging soon!