https://github.com/easyscience/EasyReflectometryLib/blob/master/docs/src/tutorials/simulation/magnetism.ipynb