Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change layer absorption calculation for BL optics #213

Merged
merged 11 commits into from Apr 1, 2022
Merged

Conversation

phoebe-p
Copy link
Member

@phoebe-p phoebe-p commented Mar 24, 2022

Minor change - instead of integrating over the differentiated absorption, calculate the total absorption analytically. If you have large position spacing and high absorption, the integrated absorption calculated from the absorption profile can be quite off and sometimes > 1. Of course, this way you can get a discrepancy between the EQE (or anything calculated using the absorption profile) and the absorption per layer, but at least the total layer absorption will be correct and this way you can check if you need to use different depth spacing. This is similar to the current approach for the TMM and RCWA methods, which use the power calculated per layer explicitly rather than integrating the absorption profile.

@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #213 (a81dd84) into develop (29593db) will increase coverage by 0.00%.
The diff coverage is 70.58%.

@@           Coverage Diff            @@
##           develop     #213   +/-   ##
========================================
  Coverage    45.84%   45.85%           
========================================
  Files           84       84           
  Lines         9091     9100    +9     
========================================
+ Hits          4168     4173    +5     
- Misses        4923     4927    +4     
Impacted Files Coverage Δ
solcore/optics/rcwa.py 23.88% <0.00%> (ø)
solcore/optics/beer_lambert.py 50.00% <73.33%> (+2.00%) ⬆️
solcore/optics/tmm.py 91.35% <100.00%> (ø)
solcore/optimization/differential_evolution.py 78.72% <0.00%> (-4.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29593db...a81dd84. Read the comment docs.

@phoebe-p phoebe-p marked this pull request as ready for review March 24, 2022 12:52
@phoebe-p phoebe-p requested a review from dalonsoa March 24, 2022 12:54
solcore/optics/beer_lambert.py Show resolved Hide resolved
@phoebe-p phoebe-p merged commit ef37a0e into develop Apr 1, 2022
@phoebe-p phoebe-p deleted the BL_abs_fix branch February 13, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants