]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
samples -> examples + moins de debug
authorAndré Ribes <andre.ribes@edf.fr>
Thu, 26 May 2011 13:53:52 +0000 (15:53 +0200)
committerAndré Ribes <andre.ribes@edf.fr>
Thu, 26 May 2011 13:53:52 +0000 (15:53 +0200)
20 files changed:
Makefile.am
adm_local/make_common_starter.am
configure.ac
examples/Makefile.am [new file with mode: 0644]
examples/daSalome/Makefile.am [new file with mode: 0644]
examples/daSalome/test001_ADAO_JDC_using_strings.comm [new file with mode: 0644]
examples/daSalome/test002_ADAO_JDC_using_strings.comm [new file with mode: 0644]
examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in [new file with mode: 0644]
examples/daSalome/test003_ADAO_scripts_for_JDC.py [new file with mode: 0644]
examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in [new file with mode: 0644]
examples/daSalome/test004_ADAO_scripts_for_JDC.py [new file with mode: 0644]
samples/Makefile.am [deleted file]
samples/daSalome/Makefile.am [deleted file]
samples/daSalome/test001_ADAO_JDC_using_strings.comm [deleted file]
samples/daSalome/test002_ADAO_JDC_using_strings.comm [deleted file]
samples/daSalome/test003_ADAO_JDC_using_scripts.comm.in [deleted file]
samples/daSalome/test003_ADAO_scripts_for_JDC.py [deleted file]
samples/daSalome/test004_ADAO_JDC_using_scripts.comm.in [deleted file]
samples/daSalome/test004_ADAO_scripts_for_JDC.py [deleted file]
src/daEficas/generator_adao.py

index 5ddf8d816ecf2998a8763ccc296d7a3c36c2c8f1..e1273bb865405e83ef7c2401074cb78996ce4279 100644 (file)
@@ -9,7 +9,7 @@ endif
 SUBDIRS += src
 
 if SALOME_MODULE
-SUBDIRS += resources bin samples
+SUBDIRS += resources bin examples
 endif
 
 if SPHINX_IS_OK
index 7120e409223f8190d310c9d53f661e57caa35f96..c03462c6f778fa324569822b8cff80e6930ae110 100644 (file)
@@ -17,9 +17,9 @@ testsdir             = $(prefix)/tests
 testsdasalomedir     = $(testsdir)/daSalome
 testsplateformedir   = $(testsdir)/daComposant/Plateforme
 
-# Directory for installing samples files
-samplesdir             = $(prefix)/share/salome/adao_samples
-samplesdasalomedir     = $(samplesdir)/daSalome
+# Directory for installing examples files
+examplesdir             = $(prefix)/share/salome/adao_examples
+examplesdasalomedir     = $(examplesdir)/daSalome
 
 # Directories for installing admin files
 admlocaldir       = $(prefix)/adm_local
index 505b5aece6392e0089a27ca6dc38542bf5478940..885875e1ee57c5ea37b71f719fd71815e5650778 100644 (file)
@@ -122,10 +122,10 @@ AC_CONFIG_FILES([
         src/daSalome/daGUI/daUtils/Makefile
         src/daSalome/daGUI/daGuiImpl/Makefile
         src/daSalome/daGUI/daEficasWrapper/Makefile
-        samples/Makefile
-        samples/daSalome/Makefile
-        samples/daSalome/test003_ADAO_JDC_using_scripts.comm
-        samples/daSalome/test004_ADAO_JDC_using_scripts.comm
+        examples/Makefile
+        examples/daSalome/Makefile
+        examples/daSalome/test003_ADAO_JDC_using_scripts.comm
+        examples/daSalome/test004_ADAO_JDC_using_scripts.comm
         bin/Makefile
         bin/qtEficas_adao_study.py
         doc/Makefile
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644 (file)
index 0000000..54b6585
--- /dev/null
@@ -0,0 +1,2 @@
+SUBDIRS = daSalome
+
diff --git a/examples/daSalome/Makefile.am b/examples/daSalome/Makefile.am
new file mode 100644 (file)
index 0000000..77d4f1d
--- /dev/null
@@ -0,0 +1,19 @@
+include $(top_srcdir)/adm_local/make_common_starter.am
+
+DATA_INST = \
+           test001_ADAO_JDC_using_strings.comm \
+           test002_ADAO_JDC_using_strings.comm \
+           test003_ADAO_JDC_using_scripts.comm \
+           test003_ADAO_scripts_for_JDC.py \
+           test004_ADAO_JDC_using_scripts.comm \
+           test004_ADAO_scripts_for_JDC.py
+
+examplesdasalome_DATA = ${DATA_INST}
+
+EXTRA_DIST = \
+            test001_ADAO_JDC_using_strings.comm \
+            test002_ADAO_JDC_using_strings.comm \
+            test003_ADAO_JDC_using_scripts.comm.in \
+            test003_ADAO_scripts_for_JDC.py \
+            test004_ADAO_JDC_using_scripts.comm.in \
+            test004_ADAO_scripts_for_JDC.py
diff --git a/examples/daSalome/test001_ADAO_JDC_using_strings.comm b/examples/daSalome/test001_ADAO_JDC_using_strings.comm
new file mode 100644 (file)
index 0000000..8455aa5
--- /dev/null
@@ -0,0 +1,19 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Debug=0,
+                   Algorithm='Blue',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='String',
+                                         STRING='0 0 0',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='String',
+                                              STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='String',
+                                          STRING='1 1 1',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='String',
+                                               STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='String',
+                                                  STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),);
diff --git a/examples/daSalome/test002_ADAO_JDC_using_strings.comm b/examples/daSalome/test002_ADAO_JDC_using_strings.comm
new file mode 100644 (file)
index 0000000..752fbf4
--- /dev/null
@@ -0,0 +1,19 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Debug=0,
+                   Algorithm='3DVAR',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='String',
+                                         STRING='0 0 0',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='String',
+                                              STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='String',
+                                          STRING='1 1 1',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='String',
+                                               STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='String',
+                                                  STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),);
diff --git a/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in b/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in
new file mode 100644 (file)
index 0000000..c9096ea
--- /dev/null
@@ -0,0 +1,20 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Study_repertory='@prefix@/share/salome/adao_examples/daSalome',
+                   Debug=0,
+                   Algorithm='3DVAR',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='Script',
+                                         SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='Script',
+                                              SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='Script',
+                                          SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='Script',
+                                               SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='Script',
+                                                  SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),);
diff --git a/examples/daSalome/test003_ADAO_scripts_for_JDC.py b/examples/daSalome/test003_ADAO_scripts_for_JDC.py
new file mode 100644 (file)
index 0000000..0b2a50c
--- /dev/null
@@ -0,0 +1,22 @@
+#-*-coding:iso-8859-1-*-
+import numpy
+#
+# Definition of the Background as a vector
+# ----------------------------------------
+Background = [0, 0, 0]
+#
+# Definition of the Observation as a vector
+# -----------------------------------------
+Observation = "1 1 1"
+#
+# Definition of the Background Error covariance as a matrix
+# ---------------------------------------------------------
+BackgroundError = numpy.array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
+#
+# Definition of the Observation Error covariance as a matrix
+# ----------------------------------------------------------
+ObservationError = numpy.matrix("1 0 0 ; 0 1 0 ; 0 0 1")
+#
+# Definition of the Observation Operator as a matrix
+# --------------------------------------------------
+ObservationOperator = numpy.identity(3)
diff --git a/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in b/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in
new file mode 100644 (file)
index 0000000..af7be9e
--- /dev/null
@@ -0,0 +1,29 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Study_repertory='@prefix@/share/salome/adao_examples/daSalome',
+                   Debug=0,
+                   Algorithm='Blue',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='Script',
+                                         SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='Script',
+                                              SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='Script',
+                                          SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='Script',
+                                               SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='Script',
+                                                  SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
+                   UserPostAnalysis=_F(FROM='String',
+                                       STRING=
+"""import numpy
+Xa = ADD.get("Analysis").valueserie(-1)
+print
+print "Size of Analysis = %i"%len(Xa)
+print "Min, mean, max   = %8.3f, %8.3f, %8.3f"%(min(Xa),numpy.mean(Xa),max(Xa))
+print
+""",),);
diff --git a/examples/daSalome/test004_ADAO_scripts_for_JDC.py b/examples/daSalome/test004_ADAO_scripts_for_JDC.py
new file mode 100644 (file)
index 0000000..e94a254
--- /dev/null
@@ -0,0 +1,25 @@
+#-*-coding:iso-8859-1-*-
+import numpy
+#
+n = 100
+#
+# Definition of the Background as a vector
+# ----------------------------------------
+Background = n * [0]
+#
+# Definition of the Observation as a vector
+# -----------------------------------------
+Observation = n * "1 "
+Observation = Observation.strip()
+#
+# Definition of the Background Error covariance as a matrix
+# ---------------------------------------------------------
+BackgroundError = numpy.identity(n)
+#
+# Definition of the Observation Error covariance as a matrix
+# ----------------------------------------------------------
+ObservationError = numpy.identity(n)
+#
+# Definition of the Observation Operator as a matrix
+# --------------------------------------------------
+ObservationOperator = numpy.identity(n)
diff --git a/samples/Makefile.am b/samples/Makefile.am
deleted file mode 100644 (file)
index 54b6585..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBDIRS = daSalome
-
diff --git a/samples/daSalome/Makefile.am b/samples/daSalome/Makefile.am
deleted file mode 100644 (file)
index d40dd24..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-include $(top_srcdir)/adm_local/make_common_starter.am
-
-DATA_INST = \
-           test001_ADAO_JDC_using_strings.comm \
-           test002_ADAO_JDC_using_strings.comm \
-           test003_ADAO_JDC_using_scripts.comm \
-           test003_ADAO_scripts_for_JDC.py \
-           test004_ADAO_JDC_using_scripts.comm \
-           test004_ADAO_scripts_for_JDC.py
-
-samplesdasalome_DATA = ${DATA_INST}
-
-EXTRA_DIST = \
-            test001_ADAO_JDC_using_strings.comm \
-            test002_ADAO_JDC_using_strings.comm \
-            test003_ADAO_JDC_using_scripts.comm.in \
-            test003_ADAO_scripts_for_JDC.py \
-            test004_ADAO_JDC_using_scripts.comm.in \
-            test004_ADAO_scripts_for_JDC.py
diff --git a/samples/daSalome/test001_ADAO_JDC_using_strings.comm b/samples/daSalome/test001_ADAO_JDC_using_strings.comm
deleted file mode 100644 (file)
index 8455aa5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-ASSIMILATION_STUDY(Study_name='Test',
-                   Debug=0,
-                   Algorithm='Blue',
-                   Background=_F(INPUT_TYPE='Vector',
-                                 data=_F(FROM='String',
-                                         STRING='0 0 0',),),
-                   BackgroundError=_F(INPUT_TYPE='Matrix',
-                                      data=_F(FROM='String',
-                                              STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
-                   Observation=_F(INPUT_TYPE='Vector',
-                                  data=_F(FROM='String',
-                                          STRING='1 1 1',),),
-                   ObservationError=_F(INPUT_TYPE='Matrix',
-                                       data=_F(FROM='String',
-                                               STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
-                   ObservationOperator=_F(INPUT_TYPE='Matrix',
-                                          data=_F(FROM='String',
-                                                  STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),);
diff --git a/samples/daSalome/test002_ADAO_JDC_using_strings.comm b/samples/daSalome/test002_ADAO_JDC_using_strings.comm
deleted file mode 100644 (file)
index 752fbf4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-ASSIMILATION_STUDY(Study_name='Test',
-                   Debug=0,
-                   Algorithm='3DVAR',
-                   Background=_F(INPUT_TYPE='Vector',
-                                 data=_F(FROM='String',
-                                         STRING='0 0 0',),),
-                   BackgroundError=_F(INPUT_TYPE='Matrix',
-                                      data=_F(FROM='String',
-                                              STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
-                   Observation=_F(INPUT_TYPE='Vector',
-                                  data=_F(FROM='String',
-                                          STRING='1 1 1',),),
-                   ObservationError=_F(INPUT_TYPE='Matrix',
-                                       data=_F(FROM='String',
-                                               STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
-                   ObservationOperator=_F(INPUT_TYPE='Matrix',
-                                          data=_F(FROM='String',
-                                                  STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),);
diff --git a/samples/daSalome/test003_ADAO_JDC_using_scripts.comm.in b/samples/daSalome/test003_ADAO_JDC_using_scripts.comm.in
deleted file mode 100644 (file)
index c015723..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-ASSIMILATION_STUDY(Study_name='Test',
-                   Study_repertory='@prefix@/share/salome/adao_samples/daSalome',
-                   Debug=0,
-                   Algorithm='3DVAR',
-                   Background=_F(INPUT_TYPE='Vector',
-                                 data=_F(FROM='Script',
-                                         SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
-                   BackgroundError=_F(INPUT_TYPE='Matrix',
-                                      data=_F(FROM='Script',
-                                              SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
-                   Observation=_F(INPUT_TYPE='Vector',
-                                  data=_F(FROM='Script',
-                                          SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
-                   ObservationError=_F(INPUT_TYPE='Matrix',
-                                       data=_F(FROM='Script',
-                                               SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
-                   ObservationOperator=_F(INPUT_TYPE='Matrix',
-                                          data=_F(FROM='Script',
-                                                  SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),);
diff --git a/samples/daSalome/test003_ADAO_scripts_for_JDC.py b/samples/daSalome/test003_ADAO_scripts_for_JDC.py
deleted file mode 100644 (file)
index 0b2a50c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#-*-coding:iso-8859-1-*-
-import numpy
-#
-# Definition of the Background as a vector
-# ----------------------------------------
-Background = [0, 0, 0]
-#
-# Definition of the Observation as a vector
-# -----------------------------------------
-Observation = "1 1 1"
-#
-# Definition of the Background Error covariance as a matrix
-# ---------------------------------------------------------
-BackgroundError = numpy.array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
-#
-# Definition of the Observation Error covariance as a matrix
-# ----------------------------------------------------------
-ObservationError = numpy.matrix("1 0 0 ; 0 1 0 ; 0 0 1")
-#
-# Definition of the Observation Operator as a matrix
-# --------------------------------------------------
-ObservationOperator = numpy.identity(3)
diff --git a/samples/daSalome/test004_ADAO_JDC_using_scripts.comm.in b/samples/daSalome/test004_ADAO_JDC_using_scripts.comm.in
deleted file mode 100644 (file)
index a497a90..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-ASSIMILATION_STUDY(Study_name='Test',
-                   Study_repertory='@prefix@/share/salome/adao_samples/daSalome',
-                   Debug=0,
-                   Algorithm='Blue',
-                   Background=_F(INPUT_TYPE='Vector',
-                                 data=_F(FROM='Script',
-                                         SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
-                   BackgroundError=_F(INPUT_TYPE='Matrix',
-                                      data=_F(FROM='Script',
-                                              SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
-                   Observation=_F(INPUT_TYPE='Vector',
-                                  data=_F(FROM='Script',
-                                          SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
-                   ObservationError=_F(INPUT_TYPE='Matrix',
-                                       data=_F(FROM='Script',
-                                               SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
-                   ObservationOperator=_F(INPUT_TYPE='Matrix',
-                                          data=_F(FROM='Script',
-                                                  SCRIPT_FILE='test004_ADAO_scripts_for_JDC.py',),),
-                   UserPostAnalysis=_F(FROM='String',
-                                       STRING=
-"""import numpy
-Xa = ADD.get("Analysis").valueserie(-1)
-print
-print "Size of Analysis = %i"%len(Xa)
-print "Min, mean, max   = %8.3f, %8.3f, %8.3f"%(min(Xa),numpy.mean(Xa),max(Xa))
-print
-""",),);
diff --git a/samples/daSalome/test004_ADAO_scripts_for_JDC.py b/samples/daSalome/test004_ADAO_scripts_for_JDC.py
deleted file mode 100644 (file)
index e94a254..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#-*-coding:iso-8859-1-*-
-import numpy
-#
-n = 100
-#
-# Definition of the Background as a vector
-# ----------------------------------------
-Background = n * [0]
-#
-# Definition of the Observation as a vector
-# -----------------------------------------
-Observation = n * "1 "
-Observation = Observation.strip()
-#
-# Definition of the Background Error covariance as a matrix
-# ---------------------------------------------------------
-BackgroundError = numpy.identity(n)
-#
-# Definition of the Observation Error covariance as a matrix
-# ----------------------------------------------------------
-ObservationError = numpy.identity(n)
-#
-# Definition of the Observation Operator as a matrix
-# --------------------------------------------------
-ObservationOperator = numpy.identity(n)
index 93fc38ee19883b131167a4cf4bf3c9982c275f02..786c55313b56b9a4bac3feb6a7dc961c3d59e304 100644 (file)
@@ -27,7 +27,7 @@ class AdaoGenerator(PythonGenerator):
     self.text_da = ""
     self.text_da_status = False
     self.logger = logging.getLogger('ADAO EFICAS GENERATOR')
-    self.logger.setLevel(logging.DEBUG)
+    self.logger.setLevel(logging.INFO)
     ch = logging.StreamHandler()
     ch.setLevel(logging.DEBUG)
     formatter = logging.Formatter("%(name)s - %(levelname)s - %(message)s")
@@ -65,8 +65,6 @@ class AdaoGenerator(PythonGenerator):
     """
     clef=""
     for i in obj.get_genealogie() :
-      print obj
-      print obj.get_genealogie()
       clef=clef+"__"+i
     self.dictMCVal[clef]=obj.valeur