manoharan-lab / structural-color

Python package for modeling structural color in colloidal systems
GNU General Public License v3.0
16 stars 11 forks source link

Mie absorption cross section is only used when there is no absorber #103

Closed AnnieStephenson closed 1 year ago

AnnieStephenson commented 2 years ago

It is reasonable to not include the absorption as calculated by Mie theory, but the if-else statement should be re-written to make clear that it's intentional that we do not use the Mie absorption cross-section in any case. See montecarlo.py, calc_scat(), line: if np.abs(n_sample.imag.magnitude) > 0.0.

AnnieStephenson commented 1 year ago

Fixed this by removing the if statement. This avoids the confusion of having a pointless control structure and gives the same result as before.