Salome HOME
Minor pending corrections on documentation and messages
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Wed, 14 Feb 2018 19:48:55 +0000 (20:48 +0100)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Wed, 14 Feb 2018 19:48:55 +0000 (20:48 +0100)
doc/en/tui.rst
doc/fr/tui.rst
src/daComposant/daCore/Aidsm.py
src/daComposant/daCore/Interfaces.py

index 48b5b67dca98bf65b2a833f95ed3360c5040d03d..d524db9505d01549246429ce290a6cfa263ca252 100644 (file)
@@ -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
 .. +++++++++++++++++++++++++++++++++++++++++++++++++
index 80a97521c828908db5f5df71193817c07c97e0db..59b0a23bf71b8de72a90446ed487f3fbff3c3b85 100644 (file)
@@ -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
 .. +++++++++++++++++++++++++++++++++++++++++++++++++
index 8c8960a41be59bc1cbb4d035037a59fc018c778d..d951a0e97dd675777bcdae735534e54b35aba85c 100644 (file)
@@ -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)
index 71a8c74dd1a77edaf4f2c14574afb3c1720aba3d..eb4fcbce553e05b16f0a39e3c16cba0c01cea631 100644 (file)
@@ -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]