From e5d4f0b55fcbe1ead67c3ebb1d950b7d6015626e Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas@kluyver.me.uk>
Date: Fri, 18 Sep 2020 09:49:40 +0100
Subject: [PATCH] Reinstate fletcher32 & shuffle filters on output datasets

---
 cal_tools/cal_tools/agipdlib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cal_tools/cal_tools/agipdlib.py b/cal_tools/cal_tools/agipdlib.py
index dc2d49e9b..11d443858 100644
--- a/cal_tools/cal_tools/agipdlib.py
+++ b/cal_tools/cal_tools/agipdlib.py
@@ -262,9 +262,9 @@ class AgipdCorrections:
             # so it's efficient to examine the file structure.
             for field in image_fields:
                 arr = data_dict[field][:n_img]
-                kw = {}
+                kw = {'fletcher32': True}
                 if field in compress_fields:
-                    kw.update(compression='gzip', compression_opts=1)
+                    kw.update(compression='gzip', compression_opts=1, shuffle=True)
                 if arr.ndim > 1:
                     kw['chunks'] = (1,) + arr.shape[1:]  # 1 chunk = 1 image
 
-- 
GitLab