Reports from the school: coefficients are not scalar bug.
|Status:||Rejected||Start date:||21 Dec 2018|
yesterday in the UserSession i have experienced an reproducible error in the BornAgain GUI: If I insert a magnetization in any layer of a mulitlayer stack (without particles), I will get the error message
"ILayerRTCoefficients::getScalarKz(): coefficients are not scalar. ---"
In the attached projekt I have simulated a multilayer stack with polarization analysis in the instrument and a magnetization in the third layer from top (FePd2). Without the layer magnetization I can simulate the system, so the error is not in the polarization analysis. Also if I insert magnetized particles instead of magnetized layers, the simulation works. Only by inserting a magnetization in any layer, I cannot simulate the system.
The first simulation was without layer magnetization and worked.
#1 Updated by dmitry about 1 year ago
- Category set to 5
The bug is caused by setting non-zero roughness together with magnetization.
Since computation engine for polarized reflectivity cannot handle roughness, an exception is thrown at some point. The only problem is that this is too late. I would suggest checking the sample data before starting a computation and throwing a more meaningful exception in the main thread.
In the long run one of course needs to consider adding roughness treatment to polarized reflectivity engine.
BTW, if only the particles are polarized and no material averaging is applied, GISAS computation will digest the input data without any problems.