jfkcooper / HOGBEN

Experimental design in neutron reflectometry using the Fisher information.
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Add arbritrary optimization and support for magnetic layers #107

Closed sstendahl closed 5 months ago

sstendahl commented 8 months ago

I tried to keep the PR somewhat limited, but some of the new bits were somewhat interdependent. For instance, the optimiser uses the Fisher.from_sample constructor to create a structure from the sample. But from_sample, works by iterating over the possible models. Which creates a separate model for each experiment that is performed. (For each contrast and magnetic polarisation).

I could break it up, but I thought I'll clean it up instead, and make it into a single PR without creating temporary boiler-plate code. There's a Jupyter Notebook attached that shows the functionality. That too will of course need to be documented.

Todo:

Will also look into the other simple user-facing methods I had, but I think those could be part of a separate PR.