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

Code currently calculates a monodisperse absorption cross section when the system is polydisperse #57

Closed victoriahwang89 closed 6 years ago

victoriahwang89 commented 6 years ago

When the system is polydisperse, the single scattering and Monte Carlo codes use a polydisperse form factor and structure factor. However, the single scattering model still calculates the absorption cross section assuming that the system is monodisperse.

The Monte Carlo code also calculates a monodisperse absorption cross section, but I believe it does not matter in this case. When the system has absorption (either in the particle and/or the matrix), the Monte Carlo code calculates an absorption coefficient from the imaginary index of the sample: 4piIm(n_sample)/wavelength. The code only assumes a monodisperse absorption cross section in the case of a non-absorbing system, in which case the absorption cross section is always zero. Therefore it does not matter whether we assume a monodisperse or polydisperse absorption cross section, since it will always be zero.

The single scattering code, on the other hand, assumes a monodisperse absorption cross section when the system has absorption. This assumption is not necessarily accurate, but implementing a polydisperse absorption cross section will greatly increase the run time without potentially adding much value to the results. Calculating the polydisperse absorption cross section would probably slightly change the amount of absorption in the final reflection spectrum, but I do not think it will change its main qualitative features. And since the single scattering model does not aim to give quantitative agreement with experiment, it might be better to just use the monodisperse absorption cross section to avoid increasing the run time.

victoriahwang89 commented 6 years ago

Decided to calculate a polydisperse absorption cross section in the same way as it's done for the polydisperse form factor. The monodisperse absorption cross section lead to some inconsistent results when flipping the order in which the two particle species were being specified in the case of a binary system. Implementing a polydisperse absorption cross section fixed this bug.