From 3b5fab47dd08e1216d3b860557b3c0bfb2598d8a Mon Sep 17 00:00:00 2001 From: "V. Armando Sole" Date: Thu, 16 Jan 2025 12:16:17 +0100 Subject: [PATCH] Support M-subshell calculations. --- changelog.txt | 5 +++++ src/PyMca5/PyMcaPhysics/xrf/XRFMC/XMSOParser.py | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index a586e2ded..f43dbca0f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +VERSION 5.9.5 +------------- + +- XRF. Support secondary excitation calculations fitting M subshells. + VERSION 5.9.4 ------------- diff --git a/src/PyMca5/PyMcaPhysics/xrf/XRFMC/XMSOParser.py b/src/PyMca5/PyMcaPhysics/xrf/XRFMC/XMSOParser.py index 1925b6a39..633937324 100644 --- a/src/PyMca5/PyMcaPhysics/xrf/XRFMC/XMSOParser.py +++ b/src/PyMca5/PyMcaPhysics/xrf/XRFMC/XMSOParser.py @@ -2,7 +2,7 @@ # # The PyMca X-Ray Fluorescence Toolkit # -# Copyright (c) 2004-2014 European Synchrotron Radiation Facility +# Copyright (c) 2004-2025 European Synchrotron Radiation Facility # # This file is part of the PyMca X-ray Fluorescence Toolkit developed at # the ESRF by the Software group. @@ -42,7 +42,7 @@ def getXMSOFileFluorescenceInformation(xmsoFile): f = ElementTree.parse(xmsoFile) ddict = {} root = f.getroot() - transitions = ['K', 'Ka', 'Kb', 'L', 'L1', 'L2', 'L3', 'M'] + transitions = ['K', 'Ka', 'Kb', 'L', 'L1', 'L2', 'L3', 'M', 'M1', 'M2', 'M3', 'M4', 'M5'] for i in root.iter('fluorescence_line_counts'): _logger.debug("%s", i.attrib) for key in ['symbol', 'total_counts']: @@ -116,11 +116,10 @@ def test(xmsoFile='t.xmso'): if line == "z": #atomic number continue - if 1 or line in ['K', 'Ka', 'Kb', 'L', 'L1', 'L2', 'L3', 'M']: - correction1 = ddict[element][line]['correction_factor'][1] - correctionn = ddict[element][line]['correction_factor'][-1] - print("Element %s Line %s Correction 2 = %f Correction n = %f" %\ - (element, line,correction1, correctionn)) + correction1 = ddict[element][line]['correction_factor'][1] + correctionn = ddict[element][line]['correction_factor'][-1] + print("Element %s Line %s Correction 2 = %f Correction n = %f" %\ + (element, line,correction1, correctionn)) if __name__ == "__main__": if len(sys.argv) < 2: