Created 'function analyse_dataset':

The main analysis has been moved to this new function.
This is a preparation for the automatic optimisation.
Prepared SR-EELS_characterisation for automatic optimisation:

I rearranged to code to be prepared for the next step.
The loop at line 61 will be the origin for the optimisation.
Generate statistics about the used threshold methods:

A txt file is created, that shows the mean r² and the stdv of r² for each used threshold method.
Updated SR-EELS_characterisation.ijm:

The threshold method 'Li' performs best for this task. I decided to use only this method. That is why I removed some code I added yesterday (r² comparison).
Added links to sample files:

I added 2 links to zip files I uploaded to my webspace.
Both files contain a SR-EELS series that can be used to test SR-EELS_characterisation.ijm.