Update result data to decrease size
This commit is contained in:
parent
587a509f3e
commit
edb79cfb57
1 changed files with 9 additions and 5 deletions
14
ETA.py
14
ETA.py
|
@ -605,14 +605,18 @@ fall = np.array( [
|
|||
) for consecutive in fall if len( consecutive ) > 20 # the value might change
|
||||
] ).astype( int )
|
||||
|
||||
stairs = np.zeros( ( len( fall ) - 1 , size_x ) )
|
||||
stairs = np.zeros( ( len( fall ) , size_x , 2 ) )
|
||||
for x in range( size_x ):
|
||||
stairs[ : fall[0] , x ] = 0 # TODO: put the mean
|
||||
for i in range( len( fall ) - 1 ):
|
||||
stairs[ i , x ] = np.mean( data[
|
||||
calibrations[ 'top' ][ 'y' ][ 'max' ] + fall[ i ] : calibrations[ 'top' ][ 'y' ][ 'max' ] + fall[ i + 1 ],
|
||||
border[ 'x' ][ 'min' ] + x
|
||||
] )
|
||||
stairs[ i , x ] = [
|
||||
np.mean( data[
|
||||
calibrations[ 'top' ][ 'y' ][ 'max' ] + fall[ i ] : calibrations[ 'top' ][ 'y' ][ 'max' ] + fall[ i + 1 ],
|
||||
border[ 'x' ][ 'min' ] + x
|
||||
] ),
|
||||
fall[i]
|
||||
]
|
||||
stairs[ -1 , x ] = [ 0 , fall[ - 1 ] ]
|
||||
|
||||
if verbose:
|
||||
print( 'ETA flattened' )
|
||||
|
|
Loading…
Reference in a new issue