Bug #2272

Reports from the school: coefficients are not scalar bug.

Added by pospelov about 2 years ago. Updated 4 months ago.

Status:RejectedStart 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.


#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.

#2 Updated by dmitry about 1 year ago

#3 Updated by wuttke 4 months ago

  • Status changed from Backlog to Rejected

Work on polarized beam propagation in presence of roughness and magnetization has progressed since. It will need thorough testing anyway. No need to investigate this old report.

#4 Updated by wuttke 4 months ago

Also available in: Atom PDF