improved optimization accuracy: numpy.polyfit is far better than scipy.interpolate.interp1d
improved optimization stability: doesn't need monotonous sampled values anymore
prominences are used for statistical weights instead of as cut-off values
added user-selectable fitting polynomial degree
Done (from task list):
[x] _generate_mev_to_nm_function(): handle the case where there are really short peaks at surface or between valid peaks (ignore missing peaks or use the longest streak of non-zeroish peaks)
[x] selectable number of iterations
Future TODO:
[ ] multi-thread initial espe runs (ElementSimulation.calculate_espe() uses multiple recoils for some reason, including self.optimization_recoils[0]. Check if a single recoil can be safely used instead.)
[ ] remember which combination of NSGA-II/Linear and recoil/fluence is selected (not as simple as saving the other settings because the settings are saved using PropertySavingWidget, which doesn't work well on individual variables). As a quick fix, linear optimization could be the new default selection.
[ ] add an option to get the starting solution from user
[ ] unit tests
[ ] add support for fluence optimization (currently only recoil optimization is supported)
[ ] customizable shape (number of peaks, rectangular or not, peak at surface or deeper)
Issue: #193
numpy.polyfit
is far better thanscipy.interpolate.interp1d
Done (from task list):
_generate_mev_to_nm_function()
: handle the case where there are really short peaks at surface or between valid peaks (ignore missing peaks or use the longest streak of non-zeroish peaks)Future TODO:
ElementSimulation.calculate_espe()
uses multiple recoils for some reason, includingself.optimization_recoils[0]
. Check if a single recoil can be safely used instead.)PropertySavingWidget
, which doesn't work well on individual variables). As a quick fix, linear optimization could be the new default selection.