From 3948045bdfaeeca95311d8389a4b70cffb5fc661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Tj=C3=B6rnhammar?= Date: Fri, 19 May 2023 10:02:31 +0200 Subject: [PATCH] Update quantification.py --- src/impetuous/quantification.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/impetuous/quantification.py b/src/impetuous/quantification.py index 27af2c3..2d63c31 100755 --- a/src/impetuous/quantification.py +++ b/src/impetuous/quantification.py @@ -1422,12 +1422,12 @@ def function_field ( data:np.array , axis_type:str=None , # SAIGA FUNCTION FOR FUNCTIONAL FIELD CALCULATIONS ! lm0,lm1 = np.shape(data) if axis_type=='0' or str(axis_type) == str(None) : - m0 = function( data , axis=0 ) + m0 = function( data , 0 ) ms0 = np.ones(lm0).reshape(-1,1) * m0.reshape(1,-1) if axis_type=='0': return ( ms0 ) if axis_type=='1' or axis_type is None : - m1 = function( data , axis=1 ) + m1 = function( data , 1 ) ms1 = m1.reshape(-1,1) * np.ones(lm1).reshape(1,-1) if axis_type=='1' : return ( ms1 ) @@ -1445,7 +1445,7 @@ def std_field ( data:np.array , axis_type:str=None ) -> np.array : ms1 = m1.reshape(-1,1) * np.ones(lm1).reshape(1,-1) if axis_type=='1' : return ( ms1 ) - return( ( ms1 + ms0 ) / ( 2*m1.reshape(-1,1)*m0.reshape(1,-1) ) ) + return( 2*m1.reshape(-1,1)*m0.reshape(1,-1) / ( ms1 + ms0 ) ) def mean_field ( data:np.array , bSeparate:bool=False , axis_type:str=None ) : lm0,lm1 = np.shape(data) -- GitLab