Do not auto fit non-exported scans (e.g. merged)

This commit is contained in:
usov_i 2021-03-11 11:07:37 +01:00
parent 4785c97f33
commit a738f74f88
2 changed files with 10 additions and 8 deletions

View File

@ -421,10 +421,11 @@ def create():
fit_output_textinput = TextAreaInput(title="Fit results:", width=750, height=200) fit_output_textinput = TextAreaInput(title="Fit results:", width=750, height=200)
def fit_all_button_callback(): def fit_all_button_callback():
for scan in det_data: for scan, export in zip(det_data, scan_table_source.data["export"]):
pyzebra.fit_scan( if export:
scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value pyzebra.fit_scan(
) scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value
)
_update_plot(_get_selected_scan()) _update_plot(_get_selected_scan())
_update_table() _update_table()

View File

@ -516,10 +516,11 @@ def create():
fit_output_textinput = TextAreaInput(title="Fit results:", width=750, height=200) fit_output_textinput = TextAreaInput(title="Fit results:", width=750, height=200)
def fit_all_button_callback(): def fit_all_button_callback():
for scan in det_data: for scan, export in zip(det_data, scan_table_source.data["export"]):
pyzebra.fit_scan( if export:
scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value pyzebra.fit_scan(
) scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value
)
_update_plot() _update_plot()
_update_table() _update_table()