MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / get_eline_info_complete

Method get_eline_info_complete

pyxrf/core/quant_analysis.py:1479–1527  ·  view source on GitHub ↗

r""" Collects emission line data from each loaded calibration entry and return it as a list of dictionaries. The size of the list determines the number of entries in which the emission line is present. If the emission line is not present in any loaded calibration set,

(self, eline)

Source from the content-addressed store, hash-verified

1477 elines_not_selected.remove(k)
1478
1479 def get_eline_info_complete(self, eline):
1480 r"""
1481 Collects emission line data from each loaded calibration entry and return it as a list
1482 of dictionaries. The size of the list determines the number of entries in which the
1483 emission line is present. If the emission line is not present in any loaded calibration set,
1484 then empty list is returned.
1485
1486 The returned representation of complete calibration data is used in GUI interface for
1487 selection of calibration data sources.
1488
1489 Parameters
1490 ----------
1491
1492 eline: str
1493
1494 Emission line name. Must match the emission line names used in calibration data.
1495 Typical format: ``Fe_K``, ``S_K`` etc.
1496
1497 Returns
1498 -------
1499
1500 eline_info: list(dict)
1501
1502 List of dictionaries that hold calibration data for the given emission line.
1503 The length of the list is equal to the number of calibration data entries that
1504 contain information on the emission line ``eline``. Each dictionary contains
1505 the following fields: ``eline_data`` - reference to ``eline`` part of the
1506 calibration data entry, ``eline_settings`` - reference to ``eline`` part of
1507 the calibration settings entry (can be used to change the selection status
1508 of the entry), ``standard_data`` - reference to the full calibration data entry,
1509 ``standard_settings`` - reference to the full settings data entry. References
1510 to the full entries seem redundant, but they can be used to access data,
1511 which is common to the entry.
1512 """
1513 eline_info = []
1514 for n in range(len(self.calibration_data)):
1515 try:
1516 # Include only references to
1517 data = self.calibration_data[n]["element_lines"][eline]
1518 settings = self.calibration_settings[n]["element_lines"][eline]
1519 record = {}
1520 record["standard_data"] = self.calibration_data[n]
1521 record["standard_settings"] = self.calibration_settings[n]
1522 record["eline_data"] = data
1523 record["eline_settings"] = settings
1524 eline_info.append(record)
1525 except Exception:
1526 pass
1527 return eline_info
1528
1529 def get_eline_calibration(self, eline):
1530 r"""

Callers 2

set_selectionFunction · 0.80

Calls

no outgoing calls

Tested by 2

set_selectionFunction · 0.64