Bug #2272

Reports from the school: coefficients are not scalar bug.

Added by pospelov over 1 year ago. Updated 9 months ago.

Status:BacklogStart date:21 Dec 2018
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


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.

Related issues

Related to BornAgain - Envelope task #2419: Polarized reflectivity In Progress 03 Jun 2020


#1 Updated by dmitry 9 months 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.

#2 Updated by dmitry 9 months ago

Also available in: Atom PDF