From 586a6b4e1c0281af3d94d6c77c5ef3cb09b01da9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Mon, 23 May 2011 14:58:16 +0200 Subject: [PATCH] Ajout d'un quatrieme exemple --- .../test004_ADAO_JDC_using_scripts.comm.in | 29 +++++++++++++++++++ .../daSalome/test004_ADAO_scripts_for_JDC.py | 25 ++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 src/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in create mode 100644 src/examples/daSalome/test004_ADAO_scripts_for_JDC.py 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 index 0000000..9ad99eb --- /dev/null +++ b/src/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in @@ -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 index 0000000..e94a254 --- /dev/null +++ b/src/examples/daSalome/test004_ADAO_scripts_for_JDC.py @@ -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) -- 2.39.2