Testing #2287

Reflectometry cross-validation

Added by dmitry 10 months ago. Updated 6 months ago.

Status:ResolvedStart date:15 Jan 2019
Priority:NormalDue date:
Assignee:juan% Done:

100%

Category:Reflectometry
Target version:Sprint 41

Description

Reflectometry functionality in BornAgain should be compared to well-known codes.

The following is suggested:
1. Compare simulation results for some simple sample model between BornAgain, GenX, Refnx and Refl1D.
It would be nice to see how resolution effects compare to each other.

2. Try fitting the data provided by Alexandros with Refnx (or Motofit) and BornAgain. Do the same for the data
referenced in the recent paper about Refnx (see http://scripts.iucr.org/cgi-bin/paper?S1600576718017296 and https://refnx.readthedocs.io/en/latest/).

History

#1 Updated by dmitry 9 months ago

  • Target version changed from Sprint 40 to Sprint 41

#2 Updated by juan 6 months ago

1. Simple Ti-Ni simulation comparison amongst different Reflectometry codes, including BornAgain:

https://nbviewer.jupyter.org/github/juanmcloaiza/BornAgainReflectometryComparison/blob/master/SimulationOverview-BA-GenX-Refnx-Refl1d/BornAgainSoftwareIntercomparison-Simulation.ipynb

2. Multi-fitting in BornAgain. Fittings out-of-the-box were not being as successful as expected, so I had to invent some tweaks. I proposed a new Figure of Merit and now the fittings are looking good. I also designed some small wrappers to reduce boilerplate code and fit data in a similar way to scipy. You can view a Jupyter-notebook dealing with the issue of co-refinement here:

https://nbviewer.jupyter.org/github/juanmcloaiza/BornAgainReflectometryComparison/blob/master/LipidBilayerSimulation-Refnx-BA/Co-refinement_in_BornAgain.ipynb

3. I made further tests to compare BornAgain performance against Refnx:

https://nbviewer.jupyter.org/github/juanmcloaiza/BornAgainReflectometryComparison/blob/master/PerformanceTests/BornAgain_Performance_Analysis.ipynb

4. Looking ahead for a possible fix, I did some experiments on reusing the already performing engine of Refnx and embedding it inside a python API --which could also be a GUI for that matter:

https://nbviewer.jupyter.org/github/juanmcloaiza/BornAgainReflectometryComparison/blob/master/PerformanceTests/Reusing_an_already_performing_engine.ipynb

The whole of this work can be found in the following Github Repository:

https://github.com/juanmcloaiza/BornAgainReflectometryComparison

#3 Updated by juan 6 months ago

  • Status changed from Sprint to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF