diff --git a/scripts/tcd/Troubled_Cell_Detector.py b/scripts/tcd/Troubled_Cell_Detector.py
index 6d168ac67b2a6cf67fbdb8de469616461ae91197..d33a51a2cef155639db866e552a1ba907deb1497 100644
--- a/scripts/tcd/Troubled_Cell_Detector.py
+++ b/scripts/tcd/Troubled_Cell_Detector.py
@@ -287,15 +287,8 @@ class WaveletDetector(TroubledCellDetector):
         projection = projection[:, 1:-1]
 
         # Calculate projection on coarse mesh
-        output_matrix = []
-        for i in range(self._mesh.num_cells//2):
-            new_entry = 0.5 * (
-                    projection[:, 2 * i] @ basis_projection_left
-                    + projection[:, 2 * i + 1] @ basis_projection_right)
-            output_matrix.append(new_entry)
-        coarse_projection = np.transpose(np.array(output_matrix))
-
-        return coarse_projection
+        return 0.5 * (basis_projection_left.T @ projection[:, ::2] +
+                      basis_projection_right.T @ projection[:, 1::2])
 
     def create_data_dict(self, projection):
         """Return dictionary with data necessary to plot troubled cells."""