Keep all merged scans, but disable export for them

This commit is contained in:
usov_i 2021-02-12 13:53:51 +01:00
parent d5ac2c6d56
commit b63ef90e11
2 changed files with 5 additions and 3 deletions

View File

@ -89,12 +89,13 @@ def create():
def _init_datatable():
scan_list = [s["idx"] for s in det_data]
hkl = [f'{s["h"]} {s["k"]} {s["l"]}' for s in det_data]
export = [s.get("active", True) for s in det_data]
scan_table_source.data.update(
scan=scan_list,
hkl=hkl,
peaks=[0] * len(scan_list),
fit=[0] * len(scan_list),
export=[True] * len(scan_list),
export=export,
)
scan_table_source.selected.indices = []
scan_table_source.selected.indices = [0]

View File

@ -65,7 +65,7 @@ def merge_datasets(dataset1, dataset2):
if _parameters_match(scan_i, scan_j):
merge_scans(scan_i, scan_j)
break
else:
dataset1.append(scan_j)
@ -78,4 +78,5 @@ def merge_scans(scan1, scan2):
scan1["omega"] = omega[index]
scan1["Counts"] = counts[index]
scan2["active"] = False
print(f'Merging scans: {scan1["idx"]} <-- {scan2["idx"]}')