Keep all merged scans, but disable export for them
This commit is contained in:
parent
d5ac2c6d56
commit
b63ef90e11
@ -89,12 +89,13 @@ def create():
|
|||||||
def _init_datatable():
|
def _init_datatable():
|
||||||
scan_list = [s["idx"] for s in det_data]
|
scan_list = [s["idx"] for s in det_data]
|
||||||
hkl = [f'{s["h"]} {s["k"]} {s["l"]}' 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_table_source.data.update(
|
||||||
scan=scan_list,
|
scan=scan_list,
|
||||||
hkl=hkl,
|
hkl=hkl,
|
||||||
peaks=[0] * len(scan_list),
|
peaks=[0] * len(scan_list),
|
||||||
fit=[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 = []
|
||||||
scan_table_source.selected.indices = [0]
|
scan_table_source.selected.indices = [0]
|
||||||
|
@ -65,8 +65,8 @@ def merge_datasets(dataset1, dataset2):
|
|||||||
if _parameters_match(scan_i, scan_j):
|
if _parameters_match(scan_i, scan_j):
|
||||||
merge_scans(scan_i, scan_j)
|
merge_scans(scan_i, scan_j)
|
||||||
break
|
break
|
||||||
else:
|
|
||||||
dataset1.append(scan_j)
|
dataset1.append(scan_j)
|
||||||
|
|
||||||
|
|
||||||
def merge_scans(scan1, scan2):
|
def merge_scans(scan1, scan2):
|
||||||
@ -78,4 +78,5 @@ def merge_scans(scan1, scan2):
|
|||||||
scan1["omega"] = omega[index]
|
scan1["omega"] = omega[index]
|
||||||
scan1["Counts"] = counts[index]
|
scan1["Counts"] = counts[index]
|
||||||
|
|
||||||
|
scan2["active"] = False
|
||||||
print(f'Merging scans: {scan1["idx"]} <-- {scan2["idx"]}')
|
print(f'Merging scans: {scan1["idx"]} <-- {scan2["idx"]}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user