Update visualization
- Add imshow to have a better view of what works and what does not - Update plot to get "true" intensity by deleting convolution
This commit is contained in:
parent
6a423e528a
commit
484a75ac0f
1 changed files with 19 additions and 1 deletions
20
ETA.py
20
ETA.py
|
@ -330,10 +330,28 @@ fall = np.array( [
|
||||||
) for consecutive in fall
|
) for consecutive in fall
|
||||||
] ).astype( int )
|
] ).astype( int )
|
||||||
|
|
||||||
temp = np.convolve( results[ : , 10000 ] , np.ones( 50 ) , 'same' )
|
mask = np.zeros_like( data )
|
||||||
|
mask[
|
||||||
|
calibrations[ 'top' ][ 'y' ][ 'min' ] : calibrations[ 'top' ][ 'y' ][ 'max' ],
|
||||||
|
calibrations[ 'top' ][ 'x' ][ 'min' ] : calibrations[ 'top' ][ 'x' ][ 'max' ]
|
||||||
|
] = -1
|
||||||
|
mask[
|
||||||
|
calibrations[ 'down' ][ 'y' ][ 'min' ] : calibrations[ 'down' ][ 'y' ][ 'max' ],
|
||||||
|
calibrations[ 'down' ][ 'x' ][ 'min' ] : calibrations[ 'down' ][ 'x' ][ 'max' ]
|
||||||
|
] = -1
|
||||||
|
mask[
|
||||||
|
calibrations[ 'top' ][ 'y' ][ 'max' ] : calibrations[ 'down' ][ 'y' ][ 'min' ],
|
||||||
|
border[ 'x' ][ 'min' ] : border[ 'x' ][ 'max' ]
|
||||||
|
] = 1
|
||||||
|
plt.imshow( data )
|
||||||
|
plt.imshow( mask , alpha = 0.5 )
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
temp = results[ : , 10000 ].copy()
|
||||||
for i in range( len( fall ) - 1 ):
|
for i in range( len( fall ) - 1 ):
|
||||||
temp[ fall[ i ] : fall[ i + 1 ] ] = np.mean( temp[ fall[ i ] : fall[ i + 1 ] ] )
|
temp[ fall[ i ] : fall[ i + 1 ] ] = np.mean( temp[ fall[ i ] : fall[ i + 1 ] ] )
|
||||||
|
|
||||||
|
plt.plot( results[ : , 10000 ] , label = 'raw' )
|
||||||
plt.plot( temp , label = 'flat' )
|
plt.plot( temp , label = 'flat' )
|
||||||
plt.legend()
|
plt.legend()
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
Loading…
Reference in a new issue