diff --git a/cal_tools/cal_tools/agipdlib.py b/cal_tools/cal_tools/agipdlib.py
index 07147199ad651208053b42713a7025b40c887aa5..919025af8dfee77260fc494f6434869b21512d1e 100644
--- a/cal_tools/cal_tools/agipdlib.py
+++ b/cal_tools/cal_tools/agipdlib.py
@@ -2,14 +2,15 @@ import copy
 from enum import Enum
 
 import h5py
-import numpy as np
-from cal_tools.enums import BadPixels
-from cal_tools.tools import get_constant_from_db, get_constant_from_db_and_time
 from iCalibrationDB import Constants, Conditions, Detectors
+import numpy as np
 from scipy.signal import cwt, ricker
 from sklearn.mixture import GaussianMixture
 from sklearn.preprocessing import StandardScaler
 
+from cal_tools.enums import BadPixels
+from cal_tools.tools import get_constant_from_db, get_constant_from_db_and_time
+
 
 def get_num_cells(fname, loc, module):
     with h5py.File(fname, "r") as f:
@@ -1125,7 +1126,6 @@ class AgipdCorrections:
                        single_image.shape[2])
         self.firange = firange
         self.single_image = single_image
-        self.can_calibrate = can_calibrate
 
     def copy_and_sanitize_non_cal_data(self):
         """ Copy and sanitize data in `infile` that is not touched by
@@ -1142,7 +1142,7 @@ class AgipdCorrections:
             firange = firange[0::2]
         alltrains = self.infile[agipd_base + "image/trainId"]
         alltrains = np.squeeze(
-            alltrains[first_index:last_index, ...])  # [self.can_calibrate]
+            alltrains[first_index:last_index, ...])
 
         # these are touched in the correct function, do not copy them here
         dont_copy = ["data", "cellId", "trainId", "pulseId", "status",
@@ -1471,8 +1471,8 @@ class AgipdCorrections:
                                                               photon_energy,
                                                               pixels_x=512,
                                                               pixels_y=128,
-                                                              beam_energy=None),
-                                 # noqa
+                                                              beam_energy=None),  # noqa
+
                                  np.ones((128, 512, max_cells_db, 2)),
                                  cal_db_interface,
                                  creation_time=creation_time,
diff --git a/cal_tools/cal_tools/lpdlib.py b/cal_tools/cal_tools/lpdlib.py
index 7ec7c642c206c5496d37e9b620639f9011ad1978..d0c557aab8964aa847b3aba13d2b063006062254 100644
--- a/cal_tools/cal_tools/lpdlib.py
+++ b/cal_tools/cal_tools/lpdlib.py
@@ -93,11 +93,11 @@ class LpdCorrections:
         # emprically determined from APD datasets p900038, r155,r156
         self.cnl_const = {
             'high': {'A': -0.000815934, 'lam': 0.00811281, 'c': 1908.89,
-                     'm': 0, 'b': 0},  # noqa
+                     'm': 0, 'b': 0},
             'med': {'A': 0.0999894, 'lam': -0.00137652, 'c': 3107.83,
-                    'm': 3.89982e-06, 'b': -0.116811},  # noqa
+                    'm': 3.89982e-06, 'b': -0.116811},
             'low': {'A': 0.0119132, 'lam': -0.0002, 'c': 36738.6,
-                    'm': 2.00273e-08, 'b': 0.245537}}  # noqa
+                    'm': 2.00273e-08, 'b': 0.245537}}
 
     def get_iteration_range(self):
         """Returns a range expression over which to iterate in chunks
@@ -662,8 +662,7 @@ class LpdCorrections:
                                                             pixels_x=256,
                                                             pixels_y=256,
                                                             beam_energy=None,
-                                                            capacitor=capacitor),
-                                 # noqa
+                                                            capacitor=capacitor),  # noqa
                                  np.ones((256, 256)),
                                  cal_db_interface,
                                  creation_time=creation_time,