Skip to content

Commit

Permalink
fix unit error in LightSource custom spectrum setting
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-p committed Sep 1, 2023
1 parent 7a3e3b3 commit 31d9110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solcore/light_source/light_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ def _get_custom_spectrum(self, options):
wl = x_data
spectrum = y_data * (c * h * 1e9 / wl)
elif units == "power_density_per_m":
wl = x_data * 1e-9
wl = x_data * 1e9
spectrum = y_data * 1e-9
elif units == "photon_flux_per_m":
wl = x_data * 1e-9
wl = x_data * 1e9
spectrum = y_data * (c * h / wl)
elif units == "power_density_per_eV":
wl, spectrum = spectral_conversion_nm_ev(x_data, y_data)
Expand Down

0 comments on commit 31d9110

Please sign in to comment.