Bug #347

Units inconsistency in src/libcore/spectrum.cpp

Added by C├ędric Devivier over 2 years ago.

Status:NewStart date:12/07/2015
Priority:ImmediateDue date:
Assignee:-% Done:


Target version:-



I find that there is a unit inconsistency. The output of the average functions from src/libcore/spectrum.cpp should be "W.m^-2.sr^-1" and not "W.m^-2.sr^-1.nm^-1" as it is computing the integral.

Therefore, the last lines of the average functions should be:
Line #567 [1] return integral;
Line #685 [2] return result;

and not:
Line #567 [1] return integral / (lambdaMax - lambdaMin);
Line #685 [2] return result / (lambdaMax - lambdaMin);

[1] https://www.mitsuba-renderer.org/repos/mitsuba.git/files/4ceb14b6ab3fa6ac3efef1578da5f8c90b15e624/src/libcore/spectrum.cpp#L567
[2] https://www.mitsuba-renderer.org/repos/mitsuba.git/files/4ceb14b6ab3fa6ac3efef1578da5f8c90b15e624/src/libcore/spectrum.cpp#L685

Also available in: Atom PDF