pyMCR icon indicating copy to clipboard operation
pyMCR copied to clipboard

Created a script for SIMPLISMA implementation in python

Open ClarkAH opened this issue 5 years ago • 3 comments

I have written a script that would be a useful addition to this project for the initial estimate of components using partial SVD combined with the SIMPLISMA algorithm.

I have added this to the tests folder.

ClarkAH avatar Mar 25 '19 10:03 ClarkAH

Added a second metric for assessing quality of refinement to metrics.py Lack of Fit in %

Added a method for partial single value decomposition.

Implementation of SIMPLISMA for initial component guessing

ClarkAH avatar Mar 25 '19 16:03 ClarkAH

Hi @ClarkAH thanks for the effort! I somehow missed the notification.

What's the status of this? I see it's failing tests but I will look into that.

Thanks.

CCampJr avatar Apr 09 '19 13:04 CCampJr

@CCampJr I have updated the two scripts, 'simplisma.py' and the test script 'svd_simplisma.py'.

The test script first generates some example data of 200 spectra consisting of a random normalised sum of 5 gaussian profiles. The the lower section runs the SVD part of the simplisma code and produces figures displaying the eigenvalues and explained variance. The next part runs the simplisma code and returns an unconstrained linear combination with related figure. The final part runs the simplisma code with an additional constrained linear combination fit and related figure.

I have also added example figures in the 'Example' folder for a run of the test_svd_simplisma.py script I have performed.

ClarkAH avatar Apr 09 '19 15:04 ClarkAH