remove nested np.sum
This commit is contained in:
parent
de09937f88
commit
bdb98d6380
18
tools/ibl.py
18
tools/ibl.py
@ -68,15 +68,15 @@ def computeCoefficients():
|
||||
SH22 = 0
|
||||
for (Xgrid, Ygrid, Zgrid) in FaceGrid:
|
||||
(Y00, Y1minus1, Y10, Y11, Y2minus2, Y2minus1, Y20, Y21, Y22) = computeYmlOnGrid(Xgrid, Ygrid, Zgrid)
|
||||
SH00 += np.sum(np.sum(Y00 * incomingIrradiance * img))
|
||||
SH1minus1 += np.sum(np.sum(Y1minus1 * incomingIrradiance * img))
|
||||
SH10 += np.sum(np.sum(Y10 * incomingIrradiance * img))
|
||||
SH11 += np.sum(np.sum(Y11 * incomingIrradiance * img))
|
||||
SH2minus2 += np.sum(np.sum(Y2minus2 * incomingIrradiance * img))
|
||||
SH2minus1 += np.sum(np.sum(Y2minus1 * incomingIrradiance * img))
|
||||
SH20 += np.sum(np.sum(Y20 * incomingIrradiance * img))
|
||||
SH21 += np.sum(np.sum(Y21 * incomingIrradiance * img))
|
||||
SH22 += np.sum(np.sum(Y22 * incomingIrradiance * img))
|
||||
SH00 += np.sum(Y00 * incomingIrradiance * img)
|
||||
SH1minus1 += np.sum(Y1minus1 * incomingIrradiance * img)
|
||||
SH10 += np.sum(Y10 * incomingIrradiance * img)
|
||||
SH11 += np.sum(Y11 * incomingIrradiance * img)
|
||||
SH2minus2 += np.sum(Y2minus2 * incomingIrradiance * img)
|
||||
SH2minus1 += np.sum(Y2minus1 * incomingIrradiance * img)
|
||||
SH20 += np.sum(Y20 * incomingIrradiance * img)
|
||||
SH21 += np.sum(Y21 * incomingIrradiance * img)
|
||||
SH22 += np.sum(Y22 * incomingIrradiance * img)
|
||||
return (SH00, SH1minus1, SH10, SH2minus2, SH2minus1, SH20, SH21, SH22)
|
||||
|
||||
print(computeCoefficients())
|
||||
|
Loading…
Reference in New Issue
Block a user