Skip to content

Version 2.7.0

Latest

Choose a tag to compare

@weber1158 weber1158 released this 16 Nov 17:12
· 3 commits to main since this release
c85af5c

🛠️ Minor Release

Adjustments have been made to a few algorithms in order to improve performance and clarity. The changes are summarized below.

Documentation of Changes

📁src/Spectrum.m

  • Under the addXrayLabels() method, I have changed the marker objects from the "line" type to the "stem" type, which better reflects what other peak labeling software use (such as DTSA-II).
  • Under the removeXrayLabels() method, I have updated the object identifier so that it searches for stem-type markers instead of line-type markers.

📁utils/subtract_background.m

  • Replaced the default smoothing algorithm from a moving average to a Savitsky-Golay filter if the user has Signal Processing Toolbox (SPT) installed. The benefit of the Savistsky-Golay filter is that the magnitudes of the characteristic x-ray peaks are generally unchanged, whereas with the moving average filter the intensities of the peaks are reduced. If the user does not have SPT then the moving average filter is applied.
  • Replaced the default curve fitting algorithm from a high-degree polynomial to a smoothing spline operation if the user has Curve Fitting Toolbox (CFT) installed. The benefit of the smoothing spline operation is that does a much better job fitting an exact curve to the local minima, which makes the background subtraction of Bremsstrahlung radiation more accurate and precise. Polynomial fitting is now only used if CFT is not installed. Polynomial curves are often poorly fitted at very low keV (<1) or high keV (>10) energies, although in general this is not a problem because the mineral classification functions only rely on the elements with K-alpha energies between 1 and 7 keV. However, the more precise fitting applied with the smoothing spline operation provided by CFT is clearly better.
  • Updated the output of the optional plotting argument. The background subtraction figure produced by specifying a second output argument now uses a smooth line with red circle markers to denote where the local minima were identified and fitted.
  • Small bug fix to the internal indexing operation that limits the peak fitting to minima below 10 keV.

Test function adjustments

  • 📁tests/test_Spectrum.m :: Updated test class so that it checks for stem-type markers instead of line-type markers.