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