Update bias substraction

This commit is contained in:
linarphy 2023-07-18 11:23:12 +02:00
parent c47445c719
commit 0f7e074770
No known key found for this signature in database
GPG key ID: 3D4AAAC3AD16E79C

28
ETA.py
View file

@ -588,17 +588,17 @@ if verbose:
bias = { bias = {
'top': np.mean( 'top': np.mean(
data[ data[
calibrations[ 'top' ][ 'y' ][ 'min' ] - 100 : calibrations[ 'top' ][ 'y' ][ 'min' ] :
calibrations[ 'top' ][ 'y' ][ 'min' ] , calibrations[ 'top' ][ 'y' ][ 'min' ] - 500,
calibrations[ 'top' ][ 'x' ][ 'min' ] : calibrations[ 'top' ][ 'x' ][ 'min' ] :
calibrations[ 'top' ][ 'x' ][ 'max' ] calibrations[ 'top' ][ 'x' ][ 'max' ]
] , ] ,
axis = 0, axis = 0,
), ),
'down': np.mean( 'down': np.mean(
data[ data[
calibrations[ 'down' ][ 'y' ][ 'min' ] - 100: calibrations[ 'down' ][ 'y' ][ 'min' ] - 500:
calibrations[ 'down' ][ 'y' ][ 'min' ] , calibrations[ 'down' ][ 'y' ][ 'min' ] - 100,
calibrations[ 'down' ][ 'x' ][ 'min' ] : calibrations[ 'down' ][ 'x' ][ 'min' ] :
calibrations[ 'down' ][ 'x' ][ 'max' ] calibrations[ 'down' ][ 'x' ][ 'max' ]
] , ] ,
@ -606,7 +606,23 @@ bias = {
), ),
} }
mean_bias = bias[ 'down' ] mean_bias = sp_convolve(
np.mean(
[
bias[ 'down' ] ,
bias[ 'down' ],
] ,
axis = 0,
) ,
np.ones(
(
50,
),
) ,
'same' ,
) / 50
print( 'mean_bias ETA: ' + str( mean_bias ) )
data[ data[
: , : ,