Skip to content

Commit

Permalink
define variable for layer index
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-p committed Mar 30, 2022
1 parent d27c61b commit a81dd84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion solcore/optics/beer_lambert.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def alf(x):
A_junc = np.zeros_like(wl_m)

for k in range(n_layers_junction[j]):
A_layer = I0 * (1 - np.exp(-alphas[layers_above_offset[j] + k] * widths[layers_above_offset[j] + k]))
ilayer = layers_above_offset[j] + k
A_layer = I0 * (1 - np.exp(-alphas[ilayer] * widths[ilayer]))
A_junc += A_layer
I0 -= A_layer

Expand Down

0 comments on commit a81dd84

Please sign in to comment.