From: Jean-Philippe ARGAUD Date: Tue, 17 May 2011 14:14:58 +0000 (+0200) Subject: Mise a jour des commentaires des sources X-Git-Tag: V6_4_0rc3~44^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a82233e7de1f600fb43a7c406bf76469aa4cd528;p=modules%2Fadao.git Mise a jour des commentaires des sources --- diff --git a/src/daComposant/daAlgorithms/3DVAR.py b/src/daComposant/daAlgorithms/3DVAR.py index d42ce65..b073851 100644 --- a/src/daComposant/daAlgorithms/3DVAR.py +++ b/src/daComposant/daAlgorithms/3DVAR.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,10 +18,6 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Algorithme variationnel statique (3D-VAR) -""" -__author__ = "Jean-Philippe ARGAUD - Mars 2009" import logging from daCore import BasicObjects, PlatformInfo @@ -53,6 +49,8 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): logging.debug("%s Lancement"%self._name) logging.debug("%s Taille mémoire utilisée de %.1f Mo"%(self._name, m.getUsedMemory("Mo"))) # + # Opérateur d'observation + # ----------------------- Hm = H["Direct"].appliedTo Ht = H["Adjoint"].appliedInXTo # @@ -122,6 +120,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): # # Paramètres de pilotage # ---------------------- + # Potentiels : "Bounds", "Minimizer", "MaximumNumberOfSteps" if Parameters.has_key("Bounds") and (type(Parameters["Bounds"]) is type([]) or type(Parameters["Bounds"]) is type(())) and (len(Parameters["Bounds"]) > 0): Bounds = Parameters["Bounds"] else: @@ -136,7 +135,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): maxiter = int( Parameters["MaximumNumberOfSteps"] ) else: maxiter = 15000 - logging.debug("%s Nombre maximal de pas d'optimisation = %s"%(self._name, maxiter)) + logging.debug("%s Nombre maximal de pas d'optimisation = %s"%(self._name, str(maxiter))) # # Minimisation de la fonctionnelle # -------------------------------- diff --git a/src/daComposant/daAlgorithms/Blue.py b/src/daComposant/daAlgorithms/Blue.py index 04efa6f..0dcd6d4 100644 --- a/src/daComposant/daAlgorithms/Blue.py +++ b/src/daComposant/daAlgorithms/Blue.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,10 +18,6 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Algorithme de Kalman simple (BLUE) -""" -__author__ = "Jean-Philippe ARGAUD - Mars 2008" import logging from daCore import BasicObjects, PlatformInfo diff --git a/src/daComposant/daAlgorithms/EnsembleBlue.py b/src/daComposant/daAlgorithms/EnsembleBlue.py index f09c2a0..d4c13fb 100644 --- a/src/daComposant/daAlgorithms/EnsembleBlue.py +++ b/src/daComposant/daAlgorithms/EnsembleBlue.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,10 +18,6 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Algorithme de methode d'ensemble simple -""" -__author__ = "Sebastien MASSART, Jean-Philippe ARGAUD - Novembre 2008" import logging from daCore import BasicObjects, PlatformInfo diff --git a/src/daComposant/daAlgorithms/Kalman.py b/src/daComposant/daAlgorithms/Kalman.py deleted file mode 100644 index cccfd35..0000000 --- a/src/daComposant/daAlgorithms/Kalman.py +++ /dev/null @@ -1,94 +0,0 @@ -#-*-coding:iso-8859-1-*- -# -# Copyright (C) 2008-2010 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -__doc__ = """ - Algorithme de Kalman pour un système discret - - Remarque : les observations sont exploitées à partir du pas de temps 1, et - sont utilisées dans Yo comme rangées selon ces indices. Donc le pas 0 n'est - pas utilisé puisque la première étape de Kalman passe de 0 à 1 avec - l'observation du pas 1. -""" -__author__ = "Jean-Philippe ARGAUD - Septembre 2008" - -import logging -from daCore import BasicObjects, PlatformInfo -m = PlatformInfo.SystemUsage() - -# ============================================================================== -class ElementaryAlgorithm(BasicObjects.Algorithm): - def __init__(self): - BasicObjects.Algorithm.__init__(self) - self._name = "KALMAN" - logging.debug("%s Initialisation"%self._name) - - def run(self, Xb=None, Y=None, H=None, M=None, R=None, B=None, Q=None, Parameters=None): - """ - Calcul de l'estimateur de Kalman - """ - logging.debug("%s Lancement"%self._name) - logging.debug("%s Taille mémoire utilisée de %.1f Mo"%(self._name, m.getUsedMemory("Mo"))) - # - # Opérateur d'observation - # ----------------------- - Hm = H["Direct"].asMatrix() - Ht = H["Adjoint"].asMatrix() - # - # Opérateur d'évolution - # --------------------- - Mm = M["Direct"].asMatrix() - Mt = M["Adjoint"].asMatrix() - # - duration = Y.stepnumber() - # - # Initialisation - # -------------- - Xn = Xb - Pn = B - self.StoredVariables["Analysis"].store( Xn.A1 ) - self.StoredVariables["CovarianceAPosteriori"].store( Pn ) - # - for step in range(duration-1): - logging.debug("%s Etape de Kalman %i (i.e. %i->%i) sur un total de %i"%(self._name, step+1, step,step+1, duration-1)) - # - # Etape de prédiction - # ------------------- - Xn_predicted = Mm * Xn - Pn_predicted = Mm * Pn * Mt + Q - # - # Etape de correction - # ------------------- - d = Y.valueserie(step+1) - Hm * Xn_predicted - K = Pn_predicted * Ht * (Hm * Pn_predicted * Ht + R).I - Xn = Xn_predicted + K * d - Pn = Pn_predicted - K * Hm * Pn_predicted - # - self.StoredVariables["Analysis"].store( Xn.A1 ) - self.StoredVariables["CovarianceAPosteriori"].store( Pn ) - self.StoredVariables["Innovation"].store( d.A1 ) - # - logging.debug("%s Taille mémoire utilisée de %.1f Mo"%(self._name, m.getUsedMemory("Mo"))) - logging.debug("%s Terminé"%self._name) - # - return 0 - -# ============================================================================== -if __name__ == "__main__": - print '\n AUTODIAGNOSTIC \n' diff --git a/src/daComposant/daAlgorithms/KalmanFilter.py b/src/daComposant/daAlgorithms/KalmanFilter.py new file mode 100644 index 0000000..e7b9284 --- /dev/null +++ b/src/daComposant/daAlgorithms/KalmanFilter.py @@ -0,0 +1,90 @@ +#-*-coding:iso-8859-1-*- +# +# Copyright (C) 2008-2011 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import logging +from daCore import BasicObjects, PlatformInfo +m = PlatformInfo.SystemUsage() + +# ============================================================================== +class ElementaryAlgorithm(BasicObjects.Algorithm): + def __init__(self): + BasicObjects.Algorithm.__init__(self) + self._name = "KALMANFILTER" + logging.debug("%s Initialisation"%self._name) + + def run(self, Xb=None, Y=None, H=None, M=None, R=None, B=None, Q=None, Parameters=None): + """ + Calcul de l'estimateur du filtre de Kalman + + Remarque : les observations sont exploitées à partir du pas de temps 1, + et sont utilisées dans Yo comme rangées selon ces indices. Donc le pas 0 + n'est pas utilisé puisque la première étape de Kalman passe de 0 à 1 + avec l'observation du pas 1. + """ + logging.debug("%s Lancement"%self._name) + logging.debug("%s Taille mémoire utilisée de %.1f Mo"%(self._name, m.getUsedMemory("Mo"))) + # + # Opérateur d'observation + # ----------------------- + Hm = H["Direct"].asMatrix() + Ht = H["Adjoint"].asMatrix() + # + # Opérateur d'évolution + # --------------------- + Mm = M["Direct"].asMatrix() + Mt = M["Adjoint"].asMatrix() + # + duration = Y.stepnumber() + # + # Initialisation + # -------------- + Xn = Xb + Pn = B + self.StoredVariables["Analysis"].store( Xn.A1 ) + self.StoredVariables["CovarianceAPosteriori"].store( Pn ) + # + for step in range(duration-1): + logging.debug("%s Etape de Kalman %i (i.e. %i->%i) sur un total de %i"%(self._name, step+1, step,step+1, duration-1)) + # + # Etape de prédiction + # ------------------- + Xn_predicted = Mm * Xn + Pn_predicted = Mm * Pn * Mt + Q + # + # Etape de correction + # ------------------- + d = Y.valueserie(step+1) - Hm * Xn_predicted + K = Pn_predicted * Ht * (Hm * Pn_predicted * Ht + R).I + Xn = Xn_predicted + K * d + Pn = Pn_predicted - K * Hm * Pn_predicted + # + self.StoredVariables["Analysis"].store( Xn.A1 ) + self.StoredVariables["CovarianceAPosteriori"].store( Pn ) + self.StoredVariables["Innovation"].store( d.A1 ) + # + logging.debug("%s Taille mémoire utilisée de %.1f Mo"%(self._name, m.getUsedMemory("Mo"))) + logging.debug("%s Terminé"%self._name) + # + return 0 + +# ============================================================================== +if __name__ == "__main__": + print '\n AUTODIAGNOSTIC \n' diff --git a/src/daComposant/daAlgorithms/LinearLeastSquares.py b/src/daComposant/daAlgorithms/LinearLeastSquares.py index 7d6fa98..e7cff56 100644 --- a/src/daComposant/daAlgorithms/LinearLeastSquares.py +++ b/src/daComposant/daAlgorithms/LinearLeastSquares.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,10 +18,6 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Algorithme de moindre carres pondérés (analyse sans ebauche) -""" -__author__ = "Sophie RICCI, Jean-Philippe ARGAUD - Septembre 2008" import logging from daCore import BasicObjects, PlatformInfo @@ -35,7 +31,8 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): def run(self, Xb=None, Y=None, H=None, M=None, R=None, B=None, Q=None, Parameters=None): """ - Calcul de l'estimateur au sens des moindres carres sans ebauche + Calcul de l'estimateur moindres carrés pondérés linéaires + (assimilation variationnelle sans ébauche) """ logging.debug("%s Lancement"%self._name) logging.debug("%s Taille mémoire utilisée de %.1f Mo"%(self._name, m.getUsedMemory("Mo"))) @@ -56,5 +53,3 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): # ============================================================================== if __name__ == "__main__": print '\n AUTODIAGNOSTIC \n' - - diff --git a/src/daComposant/daAlgorithms/__init__.py b/src/daComposant/daAlgorithms/__init__.py index 7602fc1..01e8d68 100644 --- a/src/daComposant/daAlgorithms/__init__.py +++ b/src/daComposant/daAlgorithms/__init__.py @@ -1,5 +1,6 @@ +#-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/src/daComposant/daCore/AssimilationStudy.py b/src/daComposant/daCore/AssimilationStudy.py index 8a69181..950b705 100644 --- a/src/daComposant/daCore/AssimilationStudy.py +++ b/src/daComposant/daCore/AssimilationStudy.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,9 +22,9 @@ __doc__ = """ Définit les outils généraux élémentaires. Ce module est destiné à etre appelée par AssimilationStudy pour constituer - les objets élémentaires de l'algorithme. + les objets élémentaires de l'étude. """ -__author__ = "Jean-Philippe ARGAUD - Mars 2008" +__author__ = "Jean-Philippe ARGAUD" import os, sys import numpy @@ -706,6 +706,25 @@ class AssimilationStudy: HookFunction = HookFunction, ) + # ----------------------------------------------------------- + def setDebug(self, level=10): + """ + Utiliser par exemple "import logging ; level = logging.DEBUG" avant cet + appel pour changer le niveau de verbosité, avec : + NOTSET=0 < DEBUG=10 < INFO=20 < WARNING=30 < ERROR=40 < CRITICAL=50 + """ + import logging + log = logging.getLogger() + log.setLevel( level ) + + def unsetDebug(self): + """ + Remet le logger au niveau par défaut + """ + import logging + log = logging.getLogger() + log.setLevel( logging.WARNING ) + def prepare_to_pickle(self): self.__algorithmFile = None self.__diagnosticFile = None @@ -763,3 +782,13 @@ if __name__ == "__main__": print "Action sur la variable observée, étape :",i ADD.get('Analysis').store( [i, i, i] ) print + + print "Mise en debug et hors debug" + print "Nombre d'analyses :", ADD.get("Analysis").stepnumber() + ADD.setDebug() + ADD.analyze() + ADD.unsetDebug() + print "Nombre d'analyses :", ADD.get("Analysis").stepnumber() + ADD.analyze() + print "Nombre d'analyses :", ADD.get("Analysis").stepnumber() + print diff --git a/src/daComposant/daCore/BasicObjects.py b/src/daComposant/daCore/BasicObjects.py index df117ad..e9c3ce4 100644 --- a/src/daComposant/daCore/BasicObjects.py +++ b/src/daComposant/daCore/BasicObjects.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ __doc__ = """ Ce module est destiné à etre appelée par AssimilationStudy pour constituer les objets élémentaires de l'algorithme. """ -__author__ = "Jean-Philippe ARGAUD - Mars 2008" +__author__ = "Jean-Philippe ARGAUD" import numpy import Persistence diff --git a/src/daComposant/daCore/Logging.py b/src/daComposant/daCore/Logging.py index b207549..a3e41d8 100644 --- a/src/daComposant/daCore/Logging.py +++ b/src/daComposant/daCore/Logging.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -62,12 +62,13 @@ __doc__ = """ Dans une application, à n'importe quel endroit et autant de fois qu'on veut, on peut changer le niveau global de message en utilisant par exemple : import logging - logging.setLevel(logging.DEBUG) + log = logging.getLogger(NAME) # Avec rien (recommandé) ou un nom NAME + log.setLevel(logging.DEBUG) On rappelle les niveaux (attributs de "logging") et leur ordre : NOTSET=0 < DEBUG=10 < INFO=20 < WARNING=30 < ERROR=40 < CRITICAL=50 """ -__author__ = "Jean-Philippe ARGAUD - Octobre 2008" +__author__ = "Jean-Philippe ARGAUD" import os import sys diff --git a/src/daComposant/daCore/Persistence.py b/src/daComposant/daCore/Persistence.py index b8d100d..57bbdac 100644 --- a/src/daComposant/daCore/Persistence.py +++ b/src/daComposant/daCore/Persistence.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,7 @@ __doc__ = """ Définit des outils de persistence et d'enregistrement de séries de valeurs pour analyse ultérieure ou utilisation de calcul. """ -__author__ = "Jean-Philippe ARGAUD - Mars 2008" +__author__ = "Jean-Philippe ARGAUD" import numpy @@ -132,16 +132,30 @@ class Persistence: else: return self.__steps - def valueserie(self, item=None, step=None): + def valueserie(self, item=None, step=None, allSteps = False): """ Renvoie par défaut toute la liste des valeurs/objets. Si l'argument "step" existe dans la liste des pas de stockage effectués, renvoie la valeur stockée à ce pas "step". Si l'argument "item" est correct, - renvoie la valeur stockée au numéro "item". + renvoie la valeur stockée au numéro "item". Si "allSteps" est vrai, + renvoie l'ensemble des valeurs et non pas seulement la première. """ if step is not None and step in self.__steps: - index = self.__steps.index(step) - return self.__values[index] + if allSteps: + allIndexes = [] + searchFrom = 0 + try: + while self.__steps.index(step,searchFrom) >= 0: + searchFrom = self.__steps.index(step,searchFrom) + allIndexes.append( searchFrom ) + searchFrom +=1 + except ValueError, e: + pass + allValues = [self.__values[index] for index in allIndexes] + return allValues + else: + index = self.__steps.index(step) + return self.__values[index] elif item is not None and item < len(self.__values): return self.__values[item] else: @@ -641,6 +655,7 @@ class CompositePersistence: # # Definition des objets par defaut # -------------------------------- + self.__StoredObjects["Informations"] = OneNoType("Informations") self.__StoredObjects["Background"] = OneVector("Background", basetype=numpy.array) self.__StoredObjects["BackgroundError"] = OneMatrix("BackgroundError") self.__StoredObjects["Observation"] = OneVector("Observation", basetype=numpy.array) @@ -809,6 +824,26 @@ if __name__ == "__main__": del OBJET_DE_TEST print + print "======> Un flottant" + OBJET_DE_TEST = OneScalar("My float", unit="cm") + OBJET_DE_TEST.store( 5., step="azerty") + OBJET_DE_TEST.store(-5., step="poiuyt") + OBJET_DE_TEST.store( 1., step="azerty") + OBJET_DE_TEST.store( 0., step="xxxxxx") + OBJET_DE_TEST.store( 5., step="poiuyt") + OBJET_DE_TEST.store(-5., step="azerty") + OBJET_DE_TEST.store( 1., step="poiuyt") + print "Les pas de stockage :", OBJET_DE_TEST.stepserie() + print "Les valeurs :", OBJET_DE_TEST.valueserie() + print "La 2ème valeur :", OBJET_DE_TEST.valueserie(1) + print "La dernière valeur :", OBJET_DE_TEST.valueserie(-1) + print "Premier index :", OBJET_DE_TEST.valueserie( step = "azerty", allSteps = False ) + print "Valeurs identiques :", OBJET_DE_TEST.valueserie( step = "azerty", allSteps = True ) + print "Premier index :", OBJET_DE_TEST.valueserie( step = "poiuyt", allSteps = False ) + print "Valeurs identiques :", OBJET_DE_TEST.valueserie( step = "poiuyt", allSteps = True ) + del OBJET_DE_TEST + print + print "======> Un entier" OBJET_DE_TEST = OneScalar("My int", unit="cm", basetype=int) OBJET_DE_TEST.store( 5 ) diff --git a/src/daComposant/daCore/PlatformInfo.py b/src/daComposant/daCore/PlatformInfo.py index 06bb5df..6230c91 100644 --- a/src/daComposant/daCore/PlatformInfo.py +++ b/src/daComposant/daCore/PlatformInfo.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -34,7 +34,7 @@ __doc__ = """ simplement cette classe, sans meme récupérer d'objet : PathManagement() """ -__author__ = "Jean-Philippe ARGAUD - Mars 2008" +__author__ = "Jean-Philippe ARGAUD" import os diff --git a/src/daComposant/daCore/__init__.py b/src/daComposant/daCore/__init__.py index 7602fc1..01e8d68 100644 --- a/src/daComposant/daCore/__init__.py +++ b/src/daComposant/daCore/__init__.py @@ -1,5 +1,6 @@ +#-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/src/daComposant/daCore/version.py b/src/daComposant/daCore/version.py index 487717a..a842e04 100644 --- a/src/daComposant/daCore/version.py +++ b/src/daComposant/daCore/version.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/src/daComposant/daDiagnostics/PlotVector.py b/src/daComposant/daDiagnostics/PlotVector.py index 7a42538..05ab7b5 100644 --- a/src/daComposant/daDiagnostics/PlotVector.py +++ b/src/daComposant/daDiagnostics/PlotVector.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,17 +18,16 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Classe pour tracer simplement un vecteur à chaque pas -""" -__author__ = "Jean-Philippe ARGAUD - Juillet 2008" -import os.path import numpy from daCore import BasicObjects +import os.path # ============================================================================== class ElementaryDiagnostic(BasicObjects.Diagnostic): + """ + Classe pour tracer simplement un vecteur à chaque pas + """ def __init__(self, name = "", unit = "", basetype = None, parameters = {}): BasicObjects.Diagnostic.__init__(self, name, parameters) try: diff --git a/src/daComposant/daDiagnostics/PlotVectors.py b/src/daComposant/daDiagnostics/PlotVectors.py index 727ead7..7c67a67 100644 --- a/src/daComposant/daDiagnostics/PlotVectors.py +++ b/src/daComposant/daDiagnostics/PlotVectors.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,17 +18,16 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Classe pour tracer simplement une liste de vecteurs à chaque pas -""" -__author__ = "Jean-Philippe ARGAUD - Septembre 2008" -import os.path import numpy from daCore import BasicObjects +import os.path # ============================================================================== class ElementaryDiagnostic(BasicObjects.Diagnostic): + """ + Classe pour tracer simplement une liste de vecteurs à chaque pas + """ def __init__(self, name = "", unit = "", basetype = None, parameters = {}): BasicObjects.Diagnostic.__init__(self, name, parameters) try: diff --git a/src/daComposant/daDiagnostics/RMS.py b/src/daComposant/daDiagnostics/RMS.py index 8c91d9d..56516a0 100644 --- a/src/daComposant/daDiagnostics/RMS.py +++ b/src/daComposant/daDiagnostics/RMS.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,16 +18,15 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Calcul d'une RMS -""" -__author__ = "Jean-Philippe ARGAUD - Juillet 2008" import math, numpy from daCore import BasicObjects, Persistence # ============================================================================== class ElementaryDiagnostic(BasicObjects.Diagnostic,Persistence.OneScalar): + """ + Calcul d'une RMS + """ def __init__(self, name = "", unit = "", basetype = None, parameters = {}): BasicObjects.Diagnostic.__init__(self, name, parameters) Persistence.OneScalar.__init__( self, name, unit, basetype = float) diff --git a/src/daComposant/daDiagnostics/ReduceVariance.py b/src/daComposant/daDiagnostics/ReduceVariance.py index 805f8ae..cdbe041 100644 --- a/src/daComposant/daDiagnostics/ReduceVariance.py +++ b/src/daComposant/daDiagnostics/ReduceVariance.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,16 +18,15 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__doc__ = """ - Diagnostic sur la reduction de la variance lors de l'analyse -""" -__author__ = "Jean-Philippe ARGAUD - Septembre 2008" import numpy from daCore import BasicObjects, Persistence # ============================================================================== class ElementaryDiagnostic(BasicObjects.Diagnostic,Persistence.OneScalar): + """ + Diagnostic sur la reduction de la variance lors de l'analyse + """ def __init__(self, name = "", unit = "", basetype = None, parameters = {}): BasicObjects.Diagnostic.__init__(self, name, parameters) Persistence.OneScalar.__init__( self, name, unit, basetype = bool ) diff --git a/src/daComposant/daDiagnostics/__init__.py b/src/daComposant/daDiagnostics/__init__.py index 7602fc1..6beeba4 100644 --- a/src/daComposant/daDiagnostics/__init__.py +++ b/src/daComposant/daDiagnostics/__init__.py @@ -1,5 +1,6 @@ +#-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2010 EDF R&D +# Copyright (C) 2008-2011 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public