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

Method remove_entry

pyxrf/core/quant_analysis.py:1283–1301  ·  view source on GitHub ↗

r""" Remove QA calibration data entry identified by ``file_path`` from memory (from object's internal list). Removes the entry if ``file_path`` is found, otherwise prints error message (``logger.error``). Parameters ---------- The string used to

(self, file_path)

Source from the content-addressed store, hash-verified

1281 logger.info(f"Calibration data file '{file_path}' is already loaded")
1282
1283 def remove_entry(self, file_path):
1284 r"""
1285 Remove QA calibration data entry identified by ``file_path`` from memory
1286 (from object's internal list). Removes the entry if ``file_path`` is found, otherwise
1287 prints error message (``logger.error``).
1288
1289 Parameters
1290 ----------
1291
1292 The string used to identify QA calibration data entry. See the docstring for
1293 ``add_entry`` for more detailed comments.
1294 """
1295 n_item = self.find_entry_index(file_path)
1296 if n_item is not None:
1297 self.calibration_data.pop(n_item)
1298 self.calibration_settings.pop(n_item)
1299 self.update_emission_line_list()
1300 else:
1301 raise RuntimeError(f"Calibration data from source '{file_path}' is not found.")
1302
1303 def get_file_path_list(self):
1304 r"""

Calls 2

find_entry_indexMethod · 0.95

Tested by 1