transfer_matrix_optical_modeling code from 10.1002/adma.201000883 originally fetched from https://web.stanford.edu/group/mcgehee/transfermatrix/