From: Jean-Philippe ARGAUD Date: Wed, 14 Feb 2018 19:48:55 +0000 (+0100) Subject: Minor pending corrections on documentation and messages X-Git-Tag: V8_5_0rc1~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29ea8e4941e2787e22cad4d8c955f4dec8e2740c;p=modules%2Fadao.git Minor pending corrections on documentation and messages --- diff --git a/doc/en/tui.rst b/doc/en/tui.rst index 48b5b67..d524db9 100644 --- a/doc/en/tui.rst +++ b/doc/en/tui.rst @@ -635,8 +635,9 @@ The command set execution gives the following result:: Optimal state...................: [ 2. 3. 4.] Simulation at optimal state.....: [ 2. 6. 12. 20.] -As it should be in twin experiments, it is found that we get correctly the -parameters that were used to artificially build the observations. +As it should be in twin experiments, when we trust mainly in observations, it +is found that we get correctly the parameters that were used to artificially +build the observations. .. Reconciliation de courbes a l'aide de MedCoupling .. +++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/doc/fr/tui.rst b/doc/fr/tui.rst index 80a9752..59b0a23 100644 --- a/doc/fr/tui.rst +++ b/doc/fr/tui.rst @@ -658,8 +658,9 @@ L'exécution de jeu de commandes donne le résultat suivant:: Etat optimal...................: [ 2. 3. 4.] Simulation à l'état optimal....: [ 2. 6. 12. 20.] -Comme il se doit en expériences jumelles, on constate que l'on retrouve bien les -paramètres qui ont servi à construire artificiellement les observations. +Comme il se doit en expériences jumelles, avec une confiance majoritairement +placée dans les observations, on constate que l'on retrouve bien les paramètres +qui ont servi à construire artificiellement les observations. .. Réconciliation de courbes à l'aide de MedCoupling .. +++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/src/daComposant/daCore/Aidsm.py b/src/daComposant/daCore/Aidsm.py index 8c8960a..d951a0e 100644 --- a/src/daComposant/daCore/Aidsm.py +++ b/src/daComposant/daCore/Aidsm.py @@ -649,13 +649,22 @@ class Aidsm(object): from numpy import array, matrix for __command in __commands: if __command.find("set")>-1 and __command.find("set_")<0: - # logging.debug('Command loaded: %s'%(__command,)) exec("self."+__command) else: - # logging.debug('Command not loaded: %s'%(__command,)) self.__PostAnalysis.append(__command) return self + def convert(self, + FileNameFrom=None, ContentFrom=None, ObjectFrom=None, FormaterFrom="TUI", + FileNameTo=None, FormaterTo="TUI", + ): + "Conversion normalisée des commandes" + return self.load( + FileName=FileNameFrom, Content=ContentFrom, Object=ObjectFrom, Formater=FormaterFrom + ).dump( + FileName=FileNameTo, Formater=FormaterTo + ) + def clear(self): "Effacement du contenu du cas en cours" self.__init__(self.__name) diff --git a/src/daComposant/daCore/Interfaces.py b/src/daComposant/daCore/Interfaces.py index 71a8c74..eb4fcbc 100644 --- a/src/daComposant/daCore/Interfaces.py +++ b/src/daComposant/daCore/Interfaces.py @@ -98,7 +98,7 @@ class _TUIViewer(GenericCaseViewer): "Initialisation et enregistrement de l'entete" GenericCaseViewer.__init__(self, __name, __objname, __content, __object) self._addLine("# -*- coding: utf-8 -*-") - self._addLine("#\n# Python script for ADAO TUI\n#") + self._addLine("#\n# Python script using ADAO TUI\n#") self._addLine("from numpy import array, matrix") self._addLine("import adaoBuilder") self._addLine("%s = adaoBuilder.New('%s')"%(self._objname, self._name)) @@ -159,7 +159,7 @@ class _EPDViewer(GenericCaseViewer): GenericCaseViewer.__init__(self, __name, __objname, __content, __object) self._observerIndex = 0 self._addLine("# -*- coding: utf-8 -*-") - self._addLine("#\n# Python script for ADAO EPD\n#") + self._addLine("#\n# Python script using ADAO EPD\n#") self._addLine("from numpy import array, matrix") self._addLine("#") self._addLine("%s = {}"%__objname) @@ -195,7 +195,7 @@ class _EPDViewer(GenericCaseViewer): self._objdata = None # if self._objdata is None or not(type(self._objdata) is dict) or not('AlgorithmParameters' in self._objdata): - raise ValueError("Impossible to load given content as a ADAO EPD one (no dictionnary or no 'AlgorithmParameters' key found).") + raise ValueError("Impossible to load given content as an ADAO EPD one (no dictionnary or no 'AlgorithmParameters' key found).") # ---------------------------------------------------------------------- logging.debug("EPD Extracting commands of '%s' object..."%(self._objname,)) __commands = [] @@ -296,7 +296,7 @@ class _DCTViewer(GenericCaseViewer): GenericCaseViewer.__init__(self, __name, __objname, __content, __object) self._observerIndex = 0 self._addLine("# -*- coding: utf-8 -*-") - self._addLine("#\n# Python script for ADAO DCT\n#") + self._addLine("#\n# Python script using ADAO DCT\n#") self._addLine("from numpy import array, matrix") self._addLine("#") self._addLine("%s = {}"%__objname) @@ -339,7 +339,6 @@ class _DCTViewer(GenericCaseViewer): self._addLine(__text) def _extract(self, __multilines="", __object=None): "Transformation un enregistrement en une commande individuelle" - __commands = [] __multilines = __multilines.replace("\r\n","\n") exec(__multilines) self._objdata = None @@ -352,7 +351,10 @@ class _DCTViewer(GenericCaseViewer): except: continue if self._objdata is None: - raise ValueError("Impossible to load given content as a ADAO DCT one (no 'AlgorithmParameters' key found).") + raise ValueError("Impossible to load given content as an ADAO DCT one (no 'AlgorithmParameters' key found).") + # ---------------------------------------------------------------------- + logging.debug("DCT Extracting commands of '%s' object..."%(self._objname,)) + __commands = [] for k in self._objdata: if 'Observer_' in k: __command = k.split('_',1)[0]