The calculation of polarization changes requires quite a few math operations and more coefficients for materials etc. It might be useful to have a way to switch it off bot simulations where the polarization is irrelevant because it won't be detected anyway. I suggest to change the default in sources to mean "None" = no polarization calculation shall be done. The source will then just not generate a "polangle" column and all subsequent calculation can be surrounded by if 'polarization' in self.colnames.
The calculation of polarization changes requires quite a few math operations and more coefficients for materials etc. It might be useful to have a way to switch it off bot simulations where the polarization is irrelevant because it won't be detected anyway. I suggest to change the default in sources to mean "None" = no polarization calculation shall be done. The source will then just not generate a "polangle" column and all subsequent calculation can be surrounded by
if 'polarization' in self.colnames
.