diff --git a/ETA.py b/ETA.py
index cd239c9..d62478b 100644
--- a/ETA.py
+++ b/ETA.py
@@ -616,7 +616,13 @@ for x in range( size_x ):
             ] ),
             fall[i]
         ]
-    stairs[ -1 , x ] = [ 0 , fall[ - 1 ] ]
+    stairs[ -1 , x ] = [
+        np.mean( data[
+            calibrations[ 'top' ][ 'y' ][ 'max' ] + fall[ -1 ] : calibrations[ 'down' ][ 'y' ][ 'min' ],
+            border[ 'x' ][ 'min' ] + x
+        ] ),
+        fall[ - 1 ]
+    ]
 
 if verbose:
     print( 'ETA flattened' )
@@ -628,7 +634,7 @@ else:
 
     output_file = pathlib.Path( output )
     with shelve.open( str( output_file ) ) as output:
-        output[ 'data'   ]     = data
+        output[ 'data'   ]     = stairs
         output[ 'wavelength' ] = wavelength
 
 if verbose: