From d5b061f1c68ec73989ab64cc06f3c9d953c88ffe Mon Sep 17 00:00:00 2001
From: Arnaud Hemmerle <arnaud.hemmerle@synchrotron-soleil.fr>
Date: Tue, 1 Apr 2025 09:45:24 +0200
Subject: [PATCH] Set is_print_abs to True by default

---
 CHANGELOG.md                                   | 5 +++++
 lib/frontend/process_widgets/warea_detector.py | 2 +-
 lib/frontend/process_widgets/wgixd.py          | 2 +-
 lib/frontend/process_widgets/wgixs.py          | 2 +-
 lib/frontend/process_widgets/wxrf.py           | 2 +-
 lib/jupylabbook.py                             | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7efc48a..8357d95 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Release notes
 
+## v3.2.4
+- GIXD: Fix bug when a 2D detector is present but images are empty.
+
+- Set is_print_abs to True by default.
+
 ## v3.2.3
 - Add the possibility to print the mean values of selected sensors in GIXS, GIXD, area_detector, XRF.
 
diff --git a/lib/frontend/process_widgets/warea_detector.py b/lib/frontend/process_widgets/warea_detector.py
index 2bc7d88..58fb96b 100644
--- a/lib/frontend/process_widgets/warea_detector.py
+++ b/lib/frontend/process_widgets/warea_detector.py
@@ -152,7 +152,7 @@ def display_widgets_area_detector(expt):
 
     # Print absorbers
     dw['is_print_abs'] = iwid.Checkbox(
-        value=expt.get_default_param_value('is_print_abs', alt=False),
+        value=expt.get_default_param_value('is_print_abs', alt=True),
         style=style,
         layout=iwid.Layout(width='150px'),
         description='Print absorbers')
diff --git a/lib/frontend/process_widgets/wgixd.py b/lib/frontend/process_widgets/wgixd.py
index 6b8dbfe..29a0af6 100644
--- a/lib/frontend/process_widgets/wgixd.py
+++ b/lib/frontend/process_widgets/wgixd.py
@@ -201,7 +201,7 @@ def display_widgets_gixd(expt):
 
     # Print absorbers
     dw['is_print_abs'] = iwid.Checkbox(
-        value=expt.get_default_param_value('is_print_abs', alt=False),
+        value=expt.get_default_param_value('is_print_abs', alt=True),
         style=style,
         layout=iwid.Layout(width='150px'),
         description='Print absorbers')
diff --git a/lib/frontend/process_widgets/wgixs.py b/lib/frontend/process_widgets/wgixs.py
index 5d9e118..93bfb02 100644
--- a/lib/frontend/process_widgets/wgixs.py
+++ b/lib/frontend/process_widgets/wgixs.py
@@ -198,7 +198,7 @@ def display_widgets_gixs(expt):
 
     # Print absorbers
     dw['is_print_abs'] = iwid.Checkbox(
-        value=expt.get_default_param_value('is_print_abs', alt=False),
+        value=expt.get_default_param_value('is_print_abs', alt=True),
         style=style,
         layout=iwid.Layout(width='150px'),
         description='Print absorbers')
diff --git a/lib/frontend/process_widgets/wxrf.py b/lib/frontend/process_widgets/wxrf.py
index c155e8c..a4aec99 100644
--- a/lib/frontend/process_widgets/wxrf.py
+++ b/lib/frontend/process_widgets/wxrf.py
@@ -198,7 +198,7 @@ def display_widgets_xrf(expt):
 
     # Print absorbers
     dw['is_print_abs'] = iwid.Checkbox(
-        value=expt.get_default_param_value('is_print_abs', alt=False),
+        value=expt.get_default_param_value('is_print_abs', alt=True),
         style=style,
         layout=iwid.Layout(width='150px'),
         description='Print absorbers')
diff --git a/lib/jupylabbook.py b/lib/jupylabbook.py
index 2324afc..af5c01f 100644
--- a/lib/jupylabbook.py
+++ b/lib/jupylabbook.py
@@ -22,7 +22,7 @@ except ModuleNotFoundError:
 # Rules for numbering versions
 # vX.Y.Z with X major, Y minor, Z patch. Each new version increments Z (not used if Z=0).
 # If the file Example.ipynb cannot run with the new libraries, increment Y and restart at Z=0.
-__version__ = 'v3.2.3'
+__version__ = 'v3.2.4'
 
 # Define the object experiment
 # It contains all the attributes relevant to the current experiment
-- 
GitLab