these variables being calculated and stored by default. The possible names
are in the following list: ["APosterioriCorrelations",
"APosterioriCovariance", "APosterioriStandardDeviations",
- "APosterioriVariances", "BMA", "CostFunctionJ", "CurrentOptimum",
- "CurrentState", "IndexOfOptimum", "Innovation", "InnovationAtCurrentState",
+ "APosterioriVariances", "BMA", "CostFunctionJ",
+ "CostFunctionJAtCurrentOptimum", "CurrentOptimum", "CurrentState",
+ "IndexOfOptimum", "Innovation", "InnovationAtCurrentState",
"MahalanobisConsistency", "OMA", "OMB", "SigmaObs2",
"SimulatedObservationAtBackground", "SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState", "SimulatedObservationAtOptimum",
Example : ``bma = ADD.get("BMA")[-1]``
+ CostFunctionJAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J`.
+ At each step, the value corresponds to the optimal state found from the
+ beginning.
+
+ Example : ``JACO = ADD.get("CostFunctionJAtCurrentOptimum")[:]``
+
+ CostFunctionJbAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J^b`,
+ that is of the background difference part. At each step, the value
+ corresponds to the optimal state found from the beginning.
+
+ Example : ``JbACO = ADD.get("CostFunctionJbAtCurrentOptimum")[:]``
+
+ CostFunctionJoAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J^o`,
+ that is of the observation difference part. At each step, the value
+ corresponds to the optimal state found from the beginning.
+
+ Example : ``JoACO = ADD.get("CostFunctionJoAtCurrentOptimum")[:]``
+
CurrentOptimum
*List of vectors*. Each element is the optimal state obtained at the current
step of the optimization algorithm. It is not necessarely the last state.
available at the end of the algorithm. It involves potentially costly
calculations or memory consumptions. The default is a void list, none of
these variables being calculated and stored by default. The possible names
- are in the following list: ["BMA", "CostFunctionJ", "CurrentOptimum",
- "CurrentState", "IndexOfOptimum"].
+ are in the following list: ["BMA", "CostFunctionJ",
+ "CostFunctionJAtCurrentOptimum", "CurrentOptimum", "CurrentState",
+ "IndexOfOptimum"].
Example : ``{"StoreSupplementaryCalculations":["BMA", "CurrentState"]}``
Example : ``bma = ADD.get("BMA")[-1]``
+ CostFunctionJAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J`.
+ At each step, the value corresponds to the optimal state found from the
+ beginning.
+
+ Example : ``JACO = ADD.get("CostFunctionJAtCurrentOptimum")[:]``
+
+ CostFunctionJbAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J^b`,
+ that is of the background difference part. At each step, the value
+ corresponds to the optimal state found from the beginning.
+
+ Example : ``JbACO = ADD.get("CostFunctionJbAtCurrentOptimum")[:]``
+
+ CostFunctionJoAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J^o`,
+ that is of the observation difference part. At each step, the value
+ corresponds to the optimal state found from the beginning.
+
+ Example : ``JoACO = ADD.get("CostFunctionJoAtCurrentOptimum")[:]``
+
CurrentOptimum
*List of vectors*. Each element is the optimal state obtained at the current
step of the optimization algorithm. It is not necessarely the last state.
global ifig, gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig, gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
Example : ``Jo = ADD.get("CostFunctionJo")[:]``
+ CostFunctionJAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J`.
+ At each step, the value corresponds to the optimal state found from the
+ beginning.
+
+ Example : ``JACO = ADD.get("CostFunctionJAtCurrentOptimum")[:]``
+
+ CostFunctionJbAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J^b`,
+ that is of the background difference part. At each step, the value
+ corresponds to the optimal state found from the beginning.
+
+ Example : ``JbACO = ADD.get("CostFunctionJbAtCurrentOptimum")[:]``
+
+ CostFunctionJoAtCurrentOptimum
+ *List of values*. Each element is a value of the error function :math:`J^o`,
+ that is of the observation difference part. At each step, the value
+ corresponds to the optimal state found from the beginning.
+
+ Example : ``JoACO = ADD.get("CostFunctionJoAtCurrentOptimum")[:]``
+
CurrentOptimum
*List of vectors*. Each element is the optimal state obtained at the current
step of the optimization algorithm. It is not necessarely the last state.
aucune de ces variables n'étant calculée et stockée par défaut. Les noms
possibles sont dans la liste suivante : ["APosterioriCorrelations",
"APosterioriCovariance", "APosterioriStandardDeviations",
- "APosterioriVariances", "BMA", "CostFunctionJ", "CurrentOptimum",
- "CurrentState", "IndexOfOptimum", "Innovation", "InnovationAtCurrentState",
+ "APosterioriVariances", "BMA", "CostFunctionJ",
+ "CostFunctionJAtCurrentOptimum", "CurrentOptimum", "CurrentState",
+ "IndexOfOptimum", "Innovation", "InnovationAtCurrentState",
"MahalanobisConsistency", "OMA", "OMB", "SigmaObs2",
"SimulatedObservationAtBackground", "SimulatedObservationAtCurrentOptimum",
"SimulatedObservationAtCurrentState", "SimulatedObservationAtOptimum",
Exemple : ``bma = ADD.get("BMA")[-1]``
+ CostFunctionJAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J`. A chaque pas, la valeur correspond à l'état optimal trouvé depuis
+ le début.
+
+ Exemple : ``JACO = ADD.get("CostFunctionJAtCurrentOptimum")[:]``
+
+ CostFunctionJbAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J^b`, c'est-à-dire de la partie écart à l'ébauche. A chaque pas, la
+ valeur correspond à l'état optimal trouvé depuis le début.
+
+ Exemple : ``JbACO = ADD.get("CostFunctionJbAtCurrentOptimum")[:]``
+
+ CostFunctionJoAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J^o`, c'est-à-dire de la partie écart à l'observation. A chaque pas,
+ la valeur correspond à l'état optimal trouvé depuis le début.
+
+ Exemple : ``JoACO = ADD.get("CostFunctionJoAtCurrentOptimum")[:]``
+
CurrentOptimum
*Liste de vecteurs*. Chaque élément est le vecteur d'état optimal au pas de
temps courant au cours du déroulement de l'algorithme d'optimisation. Ce
calculs ou du stockage coûteux. La valeur par défaut est une liste vide,
aucune de ces variables n'étant calculée et stockée par défaut. Les noms
possibles sont dans la liste suivante : ["BMA", "CostFunctionJ",
- "CurrentOptimum", "CurrentState", "IndexOfOptimum"].
+ "CostFunctionJAtCurrentOptimum", "CurrentOptimum", "CurrentState",
+ "IndexOfOptimum"].
Exemple : ``{"StoreSupplementaryCalculations":["BMA", "CurrentState"]}``
Exemple : ``bma = ADD.get("BMA")[-1]``
+ CostFunctionJAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J`. A chaque pas, la valeur correspond à l'état optimal trouvé depuis
+ le début.
+
+ Exemple : ``JACO = ADD.get("CostFunctionJAtCurrentOptimum")[:]``
+
+ CostFunctionJbAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J^b`, c'est-à-dire de la partie écart à l'ébauche. A chaque pas, la
+ valeur correspond à l'état optimal trouvé depuis le début.
+
+ Exemple : ``JbACO = ADD.get("CostFunctionJbAtCurrentOptimum")[:]``
+
+ CostFunctionJoAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J^o`, c'est-à-dire de la partie écart à l'observation. A chaque pas,
+ la valeur correspond à l'état optimal trouvé depuis le début.
+
+ Exemple : ``JoACO = ADD.get("CostFunctionJoAtCurrentOptimum")[:]``
+
CurrentOptimum
*Liste de vecteurs*. Chaque élément est le vecteur d'état optimal au pas de
temps courant au cours du déroulement de l'algorithme d'optimisation. Ce
global ifig, gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig, gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
global ifig,gp
try:
ifig += 1
- gp('set style data lines')
+ gp(' set style data lines')
except:
ifig = 0
gp = Gnuplot.Gnuplot(persist=1)
- gp('set style data lines')
+ gp(' set style data lines')
gp('set title "%s (Figure %i)"'%(info,ifig))
gp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )
Exemple : ``Jo = ADD.get("CostFunctionJo")[:]``
+ CostFunctionJAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J`. A chaque pas, la valeur correspond à l'état optimal trouvé depuis
+ le début.
+
+ Exemple : ``JACO = ADD.get("CostFunctionJAtCurrentOptimum")[:]``
+
+ CostFunctionJbAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J^b`, c'est-à-dire de la partie écart à l'ébauche. A chaque pas, la
+ valeur correspond à l'état optimal trouvé depuis le début.
+
+ Exemple : ``JbACO = ADD.get("CostFunctionJbAtCurrentOptimum")[:]``
+
+ CostFunctionJoAtCurrentOptimum
+ *Liste de valeurs*. Chaque élément est une valeur de fonctionnelle d'écart
+ :math:`J^o`, c'est-à-dire de la partie écart à l'observation. A chaque pas,
+ la valeur correspond à l'état optimal trouvé depuis le début.
+
+ Exemple : ``JoACO = ADD.get("CostFunctionJoAtCurrentOptimum")[:]``
+
CurrentOptimum
*Liste de vecteurs*. Chaque élément est le vecteur d'état optimal au pas de
temps courant au cours du déroulement de l'algorithme d'optimisation. Ce
default = [],
typecast = tuple,
message = "Liste de calculs supplémentaires à stocker et/ou effectuer",
- listval = ["APosterioriCorrelations", "APosterioriCovariance", "APosterioriStandardDeviations", "APosterioriVariances", "BMA", "OMA", "OMB", "CostFunctionJ", "CurrentState", "CurrentOptimum", "IndexOfOptimum", "Innovation", "InnovationAtCurrentState", "SigmaObs2", "MahalanobisConsistency", "SimulationQuantiles", "SimulatedObservationAtBackground", "SimulatedObservationAtCurrentState", "SimulatedObservationAtOptimum", "SimulatedObservationAtCurrentOptimum"]
+ listval = ["APosterioriCorrelations", "APosterioriCovariance", "APosterioriStandardDeviations", "APosterioriVariances", "BMA", "OMA", "OMB", "CostFunctionJ", "CurrentState", "CurrentOptimum", "IndexOfOptimum", "Innovation", "InnovationAtCurrentState", "CostFunctionJAtCurrentOptimum", "SigmaObs2", "MahalanobisConsistency", "SimulationQuantiles", "SimulatedObservationAtBackground", "SimulatedObservationAtCurrentState", "SimulatedObservationAtOptimum", "SimulatedObservationAtCurrentOptimum"]
)
self.defineRequiredParameter(
name = "Quantiles",
self.StoredVariables["CostFunctionJ" ].store( J )
if "IndexOfOptimum" in self._parameters["StoreSupplementaryCalculations"] or \
"CurrentOptimum" in self._parameters["StoreSupplementaryCalculations"] or \
+ "CostFunctionJAtCurrentOptimum" in self._parameters["StoreSupplementaryCalculations"] or \
"SimulatedObservationAtCurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
IndexMin = numpy.argmin( self.StoredVariables["CostFunctionJ"][nbPreviousSteps:] ) + nbPreviousSteps
if "IndexOfOptimum" in self._parameters["StoreSupplementaryCalculations"]:
self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["CurrentState"][IndexMin] )
if "SimulatedObservationAtCurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( self.StoredVariables["SimulatedObservationAtCurrentState"][IndexMin] )
+ if "CostFunctionJAtCurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
+ self.StoredVariables["CostFunctionJbAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJb"][IndexMin] )
+ self.StoredVariables["CostFunctionJoAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJo"][IndexMin] )
+ self.StoredVariables["CostFunctionJAtCurrentOptimum" ].store( self.StoredVariables["CostFunctionJ" ][IndexMin] )
return J
#
def GradientOfCostFunction(x):
default = [],
typecast = tuple,
message = "Liste de calculs supplémentaires à stocker et/ou effectuer",
- listval = ["BMA", "CurrentState", "CostFunctionJ", "IndexOfOptimum", "CurrentOptimum"]
+ listval = ["BMA", "CurrentState", "CostFunctionJ", "IndexOfOptimum", "CurrentOptimum", "CostFunctionJAtCurrentOptimum"]
)
self.defineRequiredParameter( # Pas de type
name = "Bounds",
self.StoredVariables["CostFunctionJo"].store( Jo )
self.StoredVariables["CostFunctionJ" ].store( J )
if "IndexOfOptimum" in self._parameters["StoreSupplementaryCalculations"] or \
- "CurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
+ "CurrentOptimum" in self._parameters["StoreSupplementaryCalculations"] or \
+ "CostFunctionJAtCurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
IndexMin = numpy.argmin( self.StoredVariables["CostFunctionJ"][nbPreviousSteps:] ) + nbPreviousSteps
if "IndexOfOptimum" in self._parameters["StoreSupplementaryCalculations"]:
self.StoredVariables["IndexOfOptimum"].store( IndexMin )
if "CurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
self.StoredVariables["CurrentOptimum"].store( self.StoredVariables["CurrentState"][IndexMin] )
+ if "CostFunctionJAtCurrentOptimum" in self._parameters["StoreSupplementaryCalculations"]:
+ self.StoredVariables["CostFunctionJbAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJb"][IndexMin] )
+ self.StoredVariables["CostFunctionJoAtCurrentOptimum"].store( self.StoredVariables["CostFunctionJo"][IndexMin] )
+ self.StoredVariables["CostFunctionJAtCurrentOptimum" ].store( self.StoredVariables["CostFunctionJ" ][IndexMin] )
return J
#
def GradientOfCostFunction(x):
# ------------------------------------------------------------
self.StoredVariables["Analysis"].store( __Xa )
self.StoredVariables["CurrentState"].store( __Xa )
+ self.StoredVariables["CurrentOptimum"].store( __Xa )
+ #
self.StoredVariables["CostFunctionJb"].store( 1. )
self.StoredVariables["CostFunctionJo"].store( 2. )
self.StoredVariables["CostFunctionJ" ].store( 3. )
+ self.StoredVariables["CostFunctionJbAtCurrentOptimum"].store( 4. )
+ self.StoredVariables["CostFunctionJoAtCurrentOptimum"].store( 5. )
+ self.StoredVariables["CostFunctionJAtCurrentOptimum" ].store( 6. )
+ self.StoredVariables["IndexOfOptimum"].store( 1 )
#
self.StoredVariables["APosterioriCovariance"].store( numpy.diag(__Xa) )
self.StoredVariables["APosterioriVariances"].store( __Xa )
self.StoredVariables["OMA"].store( __YY )
self.StoredVariables["OMB"].store( __YY )
self.StoredVariables["Innovation"].store( __YY )
+ self.StoredVariables["InnovationAtCurrentState"].store( __YY )
self.StoredVariables["SigmaObs2"].store( 1. )
self.StoredVariables["SigmaBck2"].store( 1. )
self.StoredVariables["MahalanobisConsistency"].store( 1. )
self.StoredVariables["SimulationQuantiles"].store( numpy.matrix((__YY,__YY,__YY)) )
+ self.StoredVariables["SimulatedObservationAtBackground"].store( __YY )
+ self.StoredVariables["SimulatedObservationAtCurrentState"].store( __YY )
+ self.StoredVariables["SimulatedObservationAtOptimum"].store( __YY )
+ self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( __YY )
#
print
self._post_run()
self.StoredVariables["CostFunctionJ"] = Persistence.OneScalar(name = "CostFunctionJ")
self.StoredVariables["CostFunctionJb"] = Persistence.OneScalar(name = "CostFunctionJb")
self.StoredVariables["CostFunctionJo"] = Persistence.OneScalar(name = "CostFunctionJo")
+ self.StoredVariables["CostFunctionJAtCurrentOptimum"] = Persistence.OneScalar(name = "CostFunctionJAtCurrentOptimum")
+ self.StoredVariables["CostFunctionJbAtCurrentOptimum"] = Persistence.OneScalar(name = "CostFunctionJbAtCurrentOptimum")
+ self.StoredVariables["CostFunctionJoAtCurrentOptimum"] = Persistence.OneScalar(name = "CostFunctionJoAtCurrentOptimum")
self.StoredVariables["GradientOfCostFunctionJ"] = Persistence.OneVector(name = "GradientOfCostFunctionJ")
self.StoredVariables["GradientOfCostFunctionJb"] = Persistence.OneVector(name = "GradientOfCostFunctionJb")
self.StoredVariables["GradientOfCostFunctionJo"] = Persistence.OneVector(name = "GradientOfCostFunctionJo")
)
ObserverTemplates.store(
name = "ValueGnuPlotter",
- content = """import numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
+ content = """import numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
fr_FR = "Affiche graphiquement avec Gnuplot la valeur courante de la variable",
en_EN = "Graphically plot with Gnuplot the current value of the variable",
order = "next",
)
ObserverTemplates.store(
name = "ValueSerieGnuPlotter",
- content = """import numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
+ content = """import numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
fr_FR = "Affiche graphiquement avec Gnuplot la série des valeurs de la variable",
en_EN = "Graphically plot with Gnuplot the value serie of the variable",
order = "next",
)
ObserverTemplates.store(
name = "ValuePrinterAndGnuPlotter",
- content = """print info, var[-1]\nimport numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
+ content = """print info, var[-1]\nimport numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
fr_FR = "Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la valeur courante de la variable",
en_EN = "Print on standard output and, in the same time, graphically plot with Gnuplot the current value of the variable",
order = "next",
)
ObserverTemplates.store(
name = "ValueSeriePrinterAndGnuPlotter",
- content = """print info, var[:] \nimport numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
+ content = """print info, var[:] \nimport numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
fr_FR = "Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la série des valeurs de la variable",
en_EN = "Print on standard output and, in the same time, graphically plot with Gnuplot the value serie of the variable",
order = "next",
)
ObserverTemplates.store(
name = "ValuePrinterSaverAndGnuPlotter",
- content = """print info, var[-1]\nimport numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
+ content = """print info, var[-1]\nimport numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
fr_FR = "Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la valeur courante de la variable ",
en_EN = "Print on standard output and, in the same, time save in a file and graphically plot the current value of the variable",
order = "next",
)
ObserverTemplates.store(
name = "ValueSeriePrinterSaverAndGnuPlotter",
- content = """print info, var[:] \nimport numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
+ content = """print info, var[:] \nimport numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )""",
fr_FR = "Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la série des valeurs de la variable",
en_EN = "Print on standard output and, in the same, time save in a file and graphically plot the value serie of the variable",
order = "next",