From 8d6ba79447bf51404afd599306fb1e60cb7960a6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Thu, 18 Nov 2021 08:32:46 +0100 Subject: [PATCH] Minor documentation and code review corrections (5) Correct optionnal requirement --- src/daComposant/daCore/NumericObjects.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/daComposant/daCore/NumericObjects.py b/src/daComposant/daCore/NumericObjects.py index 609ac96..b641e70 100644 --- a/src/daComposant/daCore/NumericObjects.py +++ b/src/daComposant/daCore/NumericObjects.py @@ -902,6 +902,7 @@ def c2ukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q): RI = R.getI() # __n = Xb.size + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = Xb @@ -1131,6 +1132,7 @@ def cekf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q): RI = R.getI() # __n = Xb.size + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = Xb @@ -1479,6 +1481,8 @@ def etkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, # __n = Xb.size __m = selfA._parameters["NumberOfMembers"] + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) + previousJMinimum = numpy.finfo(float).max # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m ) @@ -1492,8 +1496,6 @@ def etkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, elif selfA._parameters["nextStep"]: Xn = selfA._getInternalState("Xn") # - previousJMinimum = numpy.finfo(float).max - # for step in range(duration-1): numpy.random.set_state(selfA._getInternalState("seed")) if hasattr(Y,"store"): @@ -1834,6 +1836,7 @@ def exkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q): RI = R.getI() # __n = Xb.size + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = Xb @@ -2027,6 +2030,8 @@ def ienkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="IEnKF12", # __n = Xb.size __m = selfA._parameters["NumberOfMembers"] + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) + previousJMinimum = numpy.finfo(float).max # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: if hasattr(B,"asfullmatrix"): Pn = B.asfullmatrix(__n) @@ -2042,8 +2047,6 @@ def ienkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="IEnKF12", elif selfA._parameters["nextStep"]: Xn = selfA._getInternalState("Xn") # - previousJMinimum = numpy.finfo(float).max - # for step in range(duration-1): numpy.random.set_state(selfA._getInternalState("seed")) if hasattr(Y,"store"): @@ -2508,6 +2511,8 @@ def mlef(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, # __n = Xb.size __m = selfA._parameters["NumberOfMembers"] + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) + previousJMinimum = numpy.finfo(float).max # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m ) @@ -2521,8 +2526,6 @@ def mlef(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, elif selfA._parameters["nextStep"]: Xn = selfA._getInternalState("Xn") # - previousJMinimum = numpy.finfo(float).max - # for step in range(duration-1): numpy.random.set_state(selfA._getInternalState("seed")) if hasattr(Y,"store"): @@ -3135,6 +3138,8 @@ def senkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, # __n = Xb.size __m = selfA._parameters["NumberOfMembers"] + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) + previousJMinimum = numpy.finfo(float).max # if hasattr(R,"asfullmatrix"): Rn = R.asfullmatrix(__p) else: Rn = R @@ -3150,8 +3155,6 @@ def senkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, elif selfA._parameters["nextStep"]: Xn = selfA._getInternalState("Xn") # - previousJMinimum = numpy.finfo(float).max - # for step in range(duration-1): numpy.random.set_state(selfA._getInternalState("seed")) if hasattr(Y,"store"): @@ -3839,6 +3842,7 @@ def stdkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q): RI = R.getI() # __n = Xb.size + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = Xb @@ -4042,6 +4046,7 @@ def uskf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q): RI = R.getI() # __n = Xb.size + nbPreviousSteps = len(selfA.StoredVariables["Analysis"]) # if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]: Xn = Xb -- 2.39.2