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

Method load_entry

pyxrf/core/quant_analysis.py:1212–1232  ·  view source on GitHub ↗

r""" Load QA calibration data from file. The calibration data file must be JSON file which satisfies schema ``_xrf_quant_fluor_schema``. Data may be loaded from the same file only once. If data is loaded from the same file repeatedly, then only one (first) copy is go

(self, file_path)

Source from the content-addressed store, hash-verified

1210 self.experiment_distance_to_sample = None
1211
1212 def load_entry(self, file_path):
1213 r"""
1214 Load QA calibration data from file. The calibration data file must be JSON file which
1215 satisfies schema ``_xrf_quant_fluor_schema``.
1216
1217 Data may be loaded from the same file only once.
1218 If data is loaded from the same file repeatedly, then only one (first) copy is going to be
1219 stored in the memory.
1220
1221 Parameters
1222 ----------
1223
1224 file_path: str
1225
1226 Full path to file with QA calibration data.
1227 """
1228 # May raise exception if reading the file fails
1229 calib_data = load_xrf_quant_fluor_json_file(file_path)
1230 # Data will be added only if file path ``file_path`` was not loaded before. Otherwise
1231 # the message will be printed.
1232 self.add_entry(file_path, calibration_data=calib_data)
1233
1234 def add_entry(self, file_path, *, calibration_data):
1235 r"""

Calls 2

add_entryMethod · 0.95

Tested by 1