]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Ajout d'un quatrieme exemple
authorJean-Philippe ARGAUD <ahbhhjp@cli23jp>
Mon, 23 May 2011 12:58:16 +0000 (14:58 +0200)
committerJean-Philippe ARGAUD <ahbhhjp@cli23jp>
Mon, 23 May 2011 12:58:16 +0000 (14:58 +0200)
src/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in [new file with mode: 0644]
src/examples/daSalome/test004_ADAO_scripts_for_JDC.py [new file with mode: 0644]

diff --git a/src/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in b/src/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in
new file mode 100644 (file)
index 0000000..9ad99eb
--- /dev/null
@@ -0,0 +1,29 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Study_repertory='@prefix@/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/src/examples/daSalome/test004_ADAO_scripts_for_JDC.py b/src/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)