"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
].
.. include:: snippets/IndexOfOptimum.rst
+.. include:: snippets/InnovationAtCurrentAnalysis.rst
+
.. include:: snippets/InnovationAtCurrentState.rst
.. include:: snippets/PredictedState.rst
+.. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
+
.. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
.. include:: snippets/SimulatedObservationAtCurrentState.rst
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
].
.. include:: snippets/IndexOfOptimum.rst
+.. include:: snippets/InnovationAtCurrentAnalysis.rst
+
.. include:: snippets/InnovationAtCurrentState.rst
.. include:: snippets/PredictedState.rst
+.. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
+
.. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
.. include:: snippets/SimulatedObservationAtCurrentState.rst
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
].
.. include:: snippets/IndexOfOptimum.rst
+.. include:: snippets/InnovationAtCurrentAnalysis.rst
+
.. include:: snippets/InnovationAtCurrentState.rst
.. include:: snippets/PredictedState.rst
+.. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
+
.. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
.. include:: snippets/SimulatedObservationAtCurrentState.rst
--- /dev/null
+.. index:: single: InnovationAtCurrentAnalysis
+
+InnovationAtCurrentAnalysis
+ *List of vectors*. Each element is an innovation vector at current analysis.
+ This quantity is identical to the innovation vector at current state in the
+ case of a single-state assimilation.
+
+ Example:
+ ``ds = ADD.get("InnovationAtCurrentAnalysis")[-1]``
--- /dev/null
+.. index:: single: SimulatedObservationAtCurrentAnalysis
+
+SimulatedObservationAtCurrentAnalysis
+ *List of vectors*. Each element is an observed vector simulated by the
+ observation operator from the current analysis, that is, in the observation
+ space. This quantity is identical to the observed vector simulated at
+ current state in the case of a single-state assimilation.
+
+ Example:
+ ``hxs = ADD.get("SimulatedObservationAtCurrentAnalysis")[-1]``
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
].
.. include:: snippets/IndexOfOptimum.rst
+.. include:: snippets/InnovationAtCurrentAnalysis.rst
+
.. include:: snippets/InnovationAtCurrentState.rst
.. include:: snippets/PredictedState.rst
+.. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
+
.. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
.. include:: snippets/SimulatedObservationAtCurrentState.rst
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
].
.. include:: snippets/IndexOfOptimum.rst
+.. include:: snippets/InnovationAtCurrentAnalysis.rst
+
.. include:: snippets/InnovationAtCurrentState.rst
.. include:: snippets/PredictedState.rst
+.. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
+
.. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
.. include:: snippets/SimulatedObservationAtCurrentState.rst
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
].
.. include:: snippets/IndexOfOptimum.rst
+.. include:: snippets/InnovationAtCurrentAnalysis.rst
+
.. include:: snippets/InnovationAtCurrentState.rst
.. include:: snippets/PredictedState.rst
+.. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
+
.. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
.. include:: snippets/SimulatedObservationAtCurrentState.rst
--- /dev/null
+.. index:: single: InnovationAtCurrentAnalysis
+
+InnovationAtCurrentAnalysis
+ *Liste de vecteurs*. Chaque élément est un vecteur d'innovation à l'état
+ analysé courant. Cette quantité est identique au vecteur d'innovation à
+ l'état courant dans le cas d'une assimilation mono-état.
+
+ Exemple :
+ ``ds = ADD.get("InnovationAtCurrentAnalysis")[-1]``
--- /dev/null
+.. index:: single: SimulatedObservationAtCurrentAnalysis
+
+SimulatedObservationAtCurrentAnalysis
+ *Liste de vecteurs*. Chaque élément est un vecteur d'observation simulé par
+ l'opérateur d'observation à partir de l'état courant, c'est-à-dire dans
+ l'espace des observations. Cette quantité est identique au vecteur
+ d'observation simulé à l'état courant dans le cas d'une assimilation
+ mono-état.
+
+ Exemple :
+ ``hxs = ADD.get("SimulatedObservationAtCurrentAnalysis")[-1]``
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
]
or self._toStore("CostFunctionJ") \
or self._toStore("CostFunctionJb") \
or self._toStore("CostFunctionJo") \
+ or self._toStore("CurrentOptimum") \
or self._toStore("APosterioriCovariance"):
BI = B.getI()
RI = R.getI()
if self._toStore("APosterioriCovariance"):
self.StoredVariables["APosterioriCovariance"].store( Pn )
covarianceXa = Pn
- Xa = Xb
+ Xa = XaMin = Xb
previousJMinimum = numpy.finfo(float).max
#
# Predimensionnement
#
for i in range(__m):
Xn[:,i] = Xn_predicted[:,i] + K * (Yo[:,i] - HX_predicted[:,i])
- del Yo, PfHT, HPfHT
+ del PfHT, HPfHT
#
Xa = Xn.mean(axis=1, dtype=mfp)
#
or self._toStore("CostFunctionJb") \
or self._toStore("CostFunctionJo") \
or self._toStore("APosterioriCovariance") \
- or self._toStore("InnovationAtCurrentState") \
- or self._toStore("SimulatedObservationAtCurrentState") \
+ or self._toStore("InnovationAtCurrentAnalysis") \
+ or self._toStore("SimulatedObservationAtCurrentAnalysis") \
or self._toStore("SimulatedObservationAtCurrentOptimum"):
- _HX = numpy.asmatrix(numpy.ravel( H((Xa, Un)) )).T
- _Innovation = Ynpu - _HX
+ _HXa = numpy.asmatrix(numpy.ravel( H((Xa, Un)) )).T
+ _Innovation = Ynpu - _HXa
#
+ # ---> avec analysis
self.StoredVariables["Analysis"].store( Xa )
+ if self._toStore("SimulatedObservationAtCurrentAnalysis"):
+ self.StoredVariables["SimulatedObservationAtCurrentAnalysis"].store( _HXa )
+ if self._toStore("InnovationAtCurrentAnalysis"):
+ self.StoredVariables["InnovationAtCurrentAnalysis"].store( _Innovation )
+ # ---> avec current state
if self._parameters["StoreInternalVariables"] \
- or self._toStore("CurrentState") \
- or self._toStore("CurrentOptimum"):
- self.StoredVariables["CurrentState"].store( Xa )
+ or self._toStore("CurrentState"):
+ self.StoredVariables["CurrentState"].store( Xn )
+ if self._toStore("PredictedState"):
+ self.StoredVariables["PredictedState"].store( Xn_predicted )
if self._toStore("BMA"):
self.StoredVariables["BMA"].store( Xn_predicted - Xa )
if self._toStore("InnovationAtCurrentState"):
- self.StoredVariables["InnovationAtCurrentState"].store( _Innovation )
+ self.StoredVariables["InnovationAtCurrentState"].store( - HX_predicted + Ynpu )
if self._toStore("SimulatedObservationAtCurrentState") \
or self._toStore("SimulatedObservationAtCurrentOptimum"):
- self.StoredVariables["SimulatedObservationAtCurrentState"].store( _HX )
+ self.StoredVariables["SimulatedObservationAtCurrentState"].store( HX_predicted )
+ # ---> autres
if self._parameters["StoreInternalVariables"] \
or self._toStore("CostFunctionJ") \
or self._toStore("CostFunctionJb") \
if self._toStore("IndexOfOptimum"):
self.StoredVariables["IndexOfOptimum"].store( IndexMin )
if self._toStore("CurrentOptimum"):
- self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["CurrentState"][IndexMin] )
+ self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["Analysis"][IndexMin] )
if self._toStore("SimulatedObservationAtCurrentOptimum"):
- self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentState"][IndexMin] )
+ self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentAnalysis"][IndexMin] )
if self._toStore("CostFunctionJbAtCurrentOptimum"):
self.StoredVariables["CostFunctionJbAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJb"][IndexMin] )
if self._toStore("CostFunctionJoAtCurrentOptimum"):
Pf = (1./(__m-1)) * Pf
Pn = (1. - K * Ht) * Pf
self.StoredVariables["APosterioriCovariance"].store( Pn )
- if self._parameters["EstimationOf"] == "Parameters" \
- and J < previousJMinimum:
- previousJMinimum = J
- # Inutile ici : Xa = Xa
- covarianceXa = Pn
+ if self._parameters["EstimationOf"] == "Parameters" \
+ and J < previousJMinimum:
+ previousJMinimum = J
+ XaMin = Xa
+ if self._toStore("APosterioriCovariance"):
+ covarianceXaMin = Pn
#
# Stockage final supplémentaire de l'optimum en estimation de paramètres
# ----------------------------------------------------------------------
if self._parameters["EstimationOf"] == "Parameters":
- self.StoredVariables["Analysis"].store( Xa.A1 )
+ self.StoredVariables["Analysis"].store( XaMin )
if self._toStore("APosterioriCovariance"):
- self.StoredVariables["APosterioriCovariance"].store( covarianceXa )
+ self.StoredVariables["APosterioriCovariance"].store( covarianceXaMin )
if self._toStore("BMA"):
- self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(Xa) )
+ self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(XaMin) )
#
self._post_run(HO)
return 0
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
]
if self._toStore("APosterioriCovariance"):
self.StoredVariables["APosterioriCovariance"].store( Pn.asfullmatrix(Xn.size) )
covarianceXa = Pn
- Xa = Xn
+ Xa = XaMin = Xn
previousJMinimum = numpy.finfo(float).max
#
for step in range(duration-1):
Xn = Xn_predicted + Pn_predicted * Ha * _u
Kn = Pn_predicted * Ha * (R + numpy.dot(Ht, Pn_predicted * Ha)).I
Pn = Pn_predicted - Kn * Ht * Pn_predicted
+ Xa, _HXa = Xn, _HX # Pointeurs
#
- self.StoredVariables["Analysis"].store( Xn )
+ # ---> avec analysis
+ self.StoredVariables["Analysis"].store( Xa )
+ if self._toStore("SimulatedObservationAtCurrentAnalysis"):
+ self.StoredVariables["SimulatedObservationAtCurrentAnalysis"].store( _HXa )
+ if self._toStore("InnovationAtCurrentAnalysis"):
+ self.StoredVariables["InnovationAtCurrentAnalysis"].store( _Innovation )
+ # ---> avec current state
if self._parameters["StoreInternalVariables"] \
- or self._toStore("CurrentState") \
- or self._toStore("CurrentOptimum"):
+ or self._toStore("CurrentState"):
self.StoredVariables["CurrentState"].store( Xn )
if self._toStore("PredictedState"):
self.StoredVariables["PredictedState"].store( Xn_predicted )
if self._toStore("BMA"):
- self.StoredVariables["BMA"].store( Xn_predicted - Xn )
+ self.StoredVariables["BMA"].store( Xn_predicted - Xa )
if self._toStore("InnovationAtCurrentState"):
self.StoredVariables["InnovationAtCurrentState"].store( _Innovation )
if self._toStore("SimulatedObservationAtCurrentState") \
or self._toStore("SimulatedObservationAtCurrentOptimum"):
self.StoredVariables["SimulatedObservationAtCurrentState"].store( _HX )
+ # ---> autres
if self._parameters["StoreInternalVariables"] \
or self._toStore("CostFunctionJ") \
or self._toStore("CostFunctionJb") \
or self._toStore("CostFunctionJo") \
or self._toStore("CurrentOptimum") \
or self._toStore("APosterioriCovariance"):
- Jb = float( 0.5 * (Xn - Xb).T * BI * (Xn - Xb) )
+ Jb = float( 0.5 * (Xa - Xb).T * BI * (Xa - Xb) )
Jo = float( 0.5 * _Innovation.T * RI * _Innovation )
J = Jb + Jo
self.StoredVariables["CostFunctionJb"].store( Jb )
self.StoredVariables["CostFunctionJo"].store( Jo )
self.StoredVariables["CostFunctionJ" ].store( J )
- if self._parameters["EstimationOf"] == "Parameters" \
- and J < previousJMinimum:
- previousJMinimum = J
- Xa = Xn
- if self._toStore("APosterioriCovariance"): covarianceXa = Pn
#
if self._toStore("IndexOfOptimum") \
or self._toStore("CurrentOptimum") \
if self._toStore("IndexOfOptimum"):
self.StoredVariables["IndexOfOptimum"].store( IndexMin )
if self._toStore("CurrentOptimum"):
- self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["CurrentState"][IndexMin] )
+ self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["Analysis"][IndexMin] )
if self._toStore("SimulatedObservationAtCurrentOptimum"):
- self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentState"][IndexMin] )
+ self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentAnalysis"][IndexMin] )
if self._toStore("CostFunctionJbAtCurrentOptimum"):
self.StoredVariables["CostFunctionJbAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJb"][IndexMin] )
if self._toStore("CostFunctionJoAtCurrentOptimum"):
self.StoredVariables["CostFunctionJAtCurrentOptimum" ].store( self.StoredVariables["CostFunctionJ" ][IndexMin] )
if self._toStore("APosterioriCovariance"):
self.StoredVariables["APosterioriCovariance"].store( Pn )
+ if self._parameters["EstimationOf"] == "Parameters" \
+ and J < previousJMinimum:
+ previousJMinimum = J
+ XaMin = Xa
+ if self._toStore("APosterioriCovariance"):
+ covarianceXaMin = Pn
#
# Stockage final supplémentaire de l'optimum en estimation de paramètres
# ----------------------------------------------------------------------
if self._parameters["EstimationOf"] == "Parameters":
- self.StoredVariables["Analysis"].store( Xa.A1 )
+ self.StoredVariables["Analysis"].store( XaMin )
if self._toStore("APosterioriCovariance"):
- self.StoredVariables["APosterioriCovariance"].store( covarianceXa )
+ self.StoredVariables["APosterioriCovariance"].store( covarianceXaMin )
if self._toStore("BMA"):
- self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(Xa) )
+ self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(XaMin) )
#
self._post_run(HO)
return 0
"CurrentOptimum",
"CurrentState",
"IndexOfOptimum",
+ "InnovationAtCurrentAnalysis",
"InnovationAtCurrentState",
"PredictedState",
+ "SimulatedObservationAtCurrentAnalysis",
"SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState",
]
Xn = Xn_predicted + Pn_predicted * Ha * _u
Kn = Pn_predicted * Ha * (R + numpy.dot(Ht, Pn_predicted * Ha)).I
Pn = Pn_predicted - Kn * Ht * Pn_predicted
+ Xa, _HXa = Xn, _HX # Pointeurs
#
- self.StoredVariables["Analysis"].store( Xn )
+ # ---> avec analysis
+ self.StoredVariables["Analysis"].store( Xa )
+ if self._toStore("SimulatedObservationAtCurrentAnalysis"):
+ self.StoredVariables["SimulatedObservationAtCurrentAnalysis"].store( _HXa )
+ if self._toStore("InnovationAtCurrentAnalysis"):
+ self.StoredVariables["InnovationAtCurrentAnalysis"].store( _Innovation )
+ # ---> avec current state
if self._parameters["StoreInternalVariables"] \
- or self._toStore("CurrentState") \
- or self._toStore("CurrentOptimum"):
+ or self._toStore("CurrentState"):
self.StoredVariables["CurrentState"].store( Xn )
if self._toStore("PredictedState"):
self.StoredVariables["PredictedState"].store( Xn_predicted )
if self._toStore("BMA"):
- self.StoredVariables["BMA"].store( Xn_predicted - Xn )
+ self.StoredVariables["BMA"].store( Xn_predicted - Xa )
if self._toStore("InnovationAtCurrentState"):
self.StoredVariables["InnovationAtCurrentState"].store( _Innovation )
if self._toStore("SimulatedObservationAtCurrentState") \
or self._toStore("SimulatedObservationAtCurrentOptimum"):
self.StoredVariables["SimulatedObservationAtCurrentState"].store( _HX )
+ # ---> autres
if self._parameters["StoreInternalVariables"] \
or self._toStore("CostFunctionJ") \
or self._toStore("CostFunctionJb") \
or self._toStore("CostFunctionJo") \
or self._toStore("CurrentOptimum") \
or self._toStore("APosterioriCovariance"):
- Jb = float( 0.5 * (Xn - Xb).T * BI * (Xn - Xb) )
+ Jb = float( 0.5 * (Xa - Xb).T * BI * (Xa - Xb) )
Jo = float( 0.5 * _Innovation.T * RI * _Innovation )
J = Jb + Jo
self.StoredVariables["CostFunctionJb"].store( Jb )
self.StoredVariables["CostFunctionJo"].store( Jo )
self.StoredVariables["CostFunctionJ" ].store( J )
- if self._parameters["EstimationOf"] == "Parameters" \
- and J < previousJMinimum:
- previousJMinimum = J
- Xa = Xn
- if self._toStore("APosterioriCovariance"): covarianceXa = Pn
#
if self._toStore("IndexOfOptimum") \
or self._toStore("CurrentOptimum") \
if self._toStore("IndexOfOptimum"):
self.StoredVariables["IndexOfOptimum"].store( IndexMin )
if self._toStore("CurrentOptimum"):
- self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["CurrentState"][IndexMin] )
+ self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["Analysis"][IndexMin] )
if self._toStore("SimulatedObservationAtCurrentOptimum"):
- self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentState"][IndexMin] )
+ self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentAnalysis"][IndexMin] )
if self._toStore("CostFunctionJbAtCurrentOptimum"):
self.StoredVariables["CostFunctionJbAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJb"][IndexMin] )
if self._toStore("CostFunctionJoAtCurrentOptimum"):
self.StoredVariables["CostFunctionJAtCurrentOptimum" ].store( self.StoredVariables["CostFunctionJ" ][IndexMin] )
if self._toStore("APosterioriCovariance"):
self.StoredVariables["APosterioriCovariance"].store( Pn )
+ if self._parameters["EstimationOf"] == "Parameters" \
+ and J < previousJMinimum:
+ previousJMinimum = J
+ XaMin = Xa
+ if self._toStore("APosterioriCovariance"):
+ covarianceXaMin = Pn
#
# Stockage final supplémentaire de l'optimum en estimation de paramètres
# ----------------------------------------------------------------------
if self._parameters["EstimationOf"] == "Parameters":
- self.StoredVariables["Analysis"].store( Xa.A1 )
+ self.StoredVariables["Analysis"].store( XaMin )
if self._toStore("APosterioriCovariance"):
- self.StoredVariables["APosterioriCovariance"].store( covarianceXa )
+ self.StoredVariables["APosterioriCovariance"].store( covarianceXaMin )
if self._toStore("BMA"):
- self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(Xa) )
+ self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(XaMin) )
#
self._post_run(HO)
return 0
if self._toStore("APosterioriCovariance"):
self.StoredVariables["APosterioriCovariance"].store( Pn )
covarianceXa = Pn
- Xa = Xn
+ Xa = XaMin = Xb
previousJMinimum = numpy.finfo(float).max
#
for step in range(duration-1):
if self._parameters["Bounds"] is not None and self._parameters["ConstrainedBy"] == "EstimateProjection":
Xn = numpy.max(numpy.hstack((Xn,numpy.asmatrix(self._parameters["Bounds"])[:,0])),axis=1)
Xn = numpy.min(numpy.hstack((Xn,numpy.asmatrix(self._parameters["Bounds"])[:,1])),axis=1)
+ Xa = Xn # Pointeurs
#
- self.StoredVariables["Analysis"].store( Xn.A1 )
+ # ---> avec analysis
+ self.StoredVariables["Analysis"].store( Xa )
if self._toStore("APosterioriCovariance"):
self.StoredVariables["APosterioriCovariance"].store( Pn )
+ # ---> avec current state
if self._toStore("InnovationAtCurrentState"):
- self.StoredVariables["InnovationAtCurrentState"].store( numpy.ravel( d.A1 ) )
+ self.StoredVariables["InnovationAtCurrentState"].store( d )
if self._parameters["StoreInternalVariables"] \
or self._toStore("CurrentState"):
self.StoredVariables["CurrentState"].store( Xn )
or self._toStore("CostFunctionJ") \
or self._toStore("CostFunctionJb") \
or self._toStore("CostFunctionJo"):
- Jb = 0.5 * (Xn - Xb).T * BI * (Xn - Xb)
- Jo = 0.5 * d.T * RI * d
- J = float( Jb ) + float( Jo )
+ Jb = float( 0.5 * (Xa - Xb).T * BI * (Xa - Xb) )
+ Jo = float( 0.5 * d.T * RI * d )
+ J = Jb + Jo
self.StoredVariables["CostFunctionJb"].store( Jb )
self.StoredVariables["CostFunctionJo"].store( Jo )
self.StoredVariables["CostFunctionJ" ].store( J )
- if J < previousJMinimum:
- previousJMinimum = J
- Xa = Xn
- if self._toStore("APosterioriCovariance"):
- covarianceXa = Pn
- else:
- Xa = Xn
+ if self._parameters["EstimationOf"] == "Parameters" \
+ and J < previousJMinimum:
+ previousJMinimum = J
+ XaMin = Xa
+ if self._toStore("APosterioriCovariance"):
+ covarianceXaMin = Pn
#
- # Stockage supplementaire de l'optimum en estimation de parametres
- # ----------------------------------------------------------------
+ # Stockage final supplémentaire de l'optimum en estimation de paramètres
+ # ----------------------------------------------------------------------
if self._parameters["EstimationOf"] == "Parameters":
- self.StoredVariables["Analysis"].store( Xa.A1 )
+ self.StoredVariables["Analysis"].store( XaMin )
if self._toStore("APosterioriCovariance"):
- self.StoredVariables["APosterioriCovariance"].store( covarianceXa )
+ self.StoredVariables["APosterioriCovariance"].store( covarianceXaMin )
if self._toStore("BMA"):
- self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(Xa) )
+ self.StoredVariables["BMA"].store( numpy.ravel(Xb) - numpy.ravel(XaMin) )
#
self._post_run(HO)
return 0
self.StoredVariables["GradientOfCostFunctionJo"] = Persistence.OneVector(name = "GradientOfCostFunctionJo")
self.StoredVariables["IndexOfOptimum"] = Persistence.OneIndex(name = "IndexOfOptimum")
self.StoredVariables["Innovation"] = Persistence.OneVector(name = "Innovation")
+ self.StoredVariables["InnovationAtCurrentAnalysis"] = Persistence.OneVector(name = "InnovationAtCurrentAnalysis")
self.StoredVariables["InnovationAtCurrentState"] = Persistence.OneVector(name = "InnovationAtCurrentState")
self.StoredVariables["JacobianMatrixAtBackground"] = Persistence.OneMatrix(name = "JacobianMatrixAtBackground")
self.StoredVariables["JacobianMatrixAtCurrentState"] = Persistence.OneMatrix(name = "JacobianMatrixAtCurrentState")
self.StoredVariables["SigmaBck2"] = Persistence.OneScalar(name = "SigmaBck2")
self.StoredVariables["SigmaObs2"] = Persistence.OneScalar(name = "SigmaObs2")
self.StoredVariables["SimulatedObservationAtBackground"] = Persistence.OneVector(name = "SimulatedObservationAtBackground")
+ self.StoredVariables["SimulatedObservationAtCurrentAnalysis"]= Persistence.OneVector(name = "SimulatedObservationAtCurrentAnalysis")
self.StoredVariables["SimulatedObservationAtCurrentOptimum"] = Persistence.OneVector(name = "SimulatedObservationAtCurrentOptimum")
self.StoredVariables["SimulatedObservationAtCurrentState"] = Persistence.OneVector(name = "SimulatedObservationAtCurrentState")
self.StoredVariables["SimulatedObservationAtOptimum"] = Persistence.OneVector(name = "SimulatedObservationAtOptimum")