diff --git a/pyzebra/app/panel_ccl_integrate.py b/pyzebra/app/panel_ccl_integrate.py index 3f6b93b..1c2f150 100644 --- a/pyzebra/app/panel_ccl_integrate.py +++ b/pyzebra/app/panel_ccl_integrate.py @@ -421,10 +421,11 @@ def create(): fit_output_textinput = TextAreaInput(title="Fit results:", width=750, height=200) def fit_all_button_callback(): - for scan in det_data: - pyzebra.fit_scan( - scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value - ) + for scan, export in zip(det_data, scan_table_source.data["export"]): + if export: + pyzebra.fit_scan( + scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value + ) _update_plot(_get_selected_scan()) _update_table() diff --git a/pyzebra/app/panel_param_study.py b/pyzebra/app/panel_param_study.py index 4e8e797..119a077 100644 --- a/pyzebra/app/panel_param_study.py +++ b/pyzebra/app/panel_param_study.py @@ -516,10 +516,11 @@ def create(): fit_output_textinput = TextAreaInput(title="Fit results:", width=750, height=200) def fit_all_button_callback(): - for scan in det_data: - pyzebra.fit_scan( - scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value - ) + for scan, export in zip(det_data, scan_table_source.data["export"]): + if export: + pyzebra.fit_scan( + scan, fit_params, fit_from=fit_from_spinner.value, fit_to=fit_to_spinner.value + ) _update_plot() _update_table()