This version fixes a simple but important bug in the recently updated background subtraction code.
It also tries to handle rank deficient problems, where there isn't actually enough information to solve the problem, with a little more grace. You will get an answer but it should have a huge confidence interval. This is a problem if you run the calculation without confidence intervals - you won't see there is an issue. However, when you build the overlap problem you will get a handy warning that the problem cannot be solved, so you've been warned! I hope to add some other message in the future, or maybe make the estimated compositions NaN - there is literally no way to solve this overlap. Here's an example where Al+ and Al++ overlap, the Al/Al2 overlap cannot be solved, but the composition of Fe and Cr is correct (48 at% for both) even though they are part of the same overlap group:
Element | Lower CI | Comp. | Upper CI |
---|---|---|---|
Al+ | 0.2 | 1.7 | 3.4 |
Al2++ | 0.3 | 2.1 | 3.5 |
Fe++ | 47.7 | 48.0 | 48.1 |
Cr++ | 48.0 | 48.3 | 48.5 |
Stay tuned for more background correction things including automated error checking and better plotting.