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

Method get_eline_calibration

pyxrf/core/quant_analysis.py:1529–1572  ·  view source on GitHub ↗

r""" Returns calibration data for the emission line ``eline`` from the selected QA calibration data entry. Parameters ---------- eline: str Emission line name. Must match the emission line names used in calibration data. Typical form

(self, eline)

Source from the content-addressed store, hash-verified

1527 return eline_info
1528
1529 def get_eline_calibration(self, eline):
1530 r"""
1531 Returns calibration data for the emission line ``eline`` from the selected
1532 QA calibration data entry.
1533
1534 Parameters
1535 ----------
1536
1537 eline: str
1538
1539 Emission line name. Must match the emission line names used in calibration data.
1540 Typical format: ``Fe_K``, ``S_K`` etc.
1541
1542 Returns
1543 -------
1544
1545 The dictionary with calibration settings. Keys ``density`` - density of the sample
1546 material in the standard scan (typically in ug/cm^2), ``fluorescence`` - collected
1547 fluorescence during calibration experiment due to the emission line ``eline``,
1548 ``incident_energy`` - incident beam energy (in keV) used during the calibration scan,
1549 ``detector_channel`` - name of the detector channel used in calibration experiment
1550 (``sum``, ``det1``, ``det2`` etc), ``scaler_name`` - name of the scaler used in
1551 calibration experiment (valid name from the scan dataset), ``distance_to_sample`` -
1552 distance from the sample to the detector in calibration scan (units are selected by
1553 the user, only the ratio between the distances in calibration and experimental scans
1554 matter, if distance-to-sample is 0, then no correction is applied)
1555 """
1556 for n in range(len(self.calibration_data)):
1557 if (eline in self.calibration_data[n]["element_lines"]) and (
1558 eline in self.calibration_settings[n]["element_lines"]
1559 ):
1560 data = self.calibration_data[n]["element_lines"][eline]
1561 settings = self.calibration_settings[n]["element_lines"][eline]
1562 if settings["selected"]:
1563 e_info = {
1564 "density": data["density"],
1565 "fluorescence": data["fluorescence"],
1566 "incident_energy": self.calibration_data[n]["incident_energy"],
1567 "detector_channel": self.calibration_data[n]["detector_channel"],
1568 "scaler_name": self.calibration_data[n]["scaler_name"],
1569 "distance_to_sample": self.calibration_data[n]["distance_to_sample"],
1570 }
1571 return e_info
1572 return None
1573
1574 def get_active_emission_lines(self):
1575 """

Calls

no outgoing calls

Tested by 1