1 #-*-coding:iso-8859-1-*-
2 # Copyright (C) 2010-2011 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author: André Ribes, andre.ribes@edf.fr, EDF R&D
28 xt = numpy.matrix(numpy.arange(dimension)).T
29 Eo = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,))).T
30 Eb = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,))).T
31 H = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,dimension)))
33 yo = FunctionH( xt ) + Eo
36 R = numpy.matrix(numpy.core.identity(dimension)).T
37 B = numpy.matrix(numpy.core.identity(dimension)).T
40 # Definition of the Background as a vector
41 # ----------------------------------------
44 # Definition of the Observation as a vector
45 # -----------------------------------------
48 # Definition of the Background Error covariance as a matrix
49 # ---------------------------------------------------------
52 # Definition of the Observation Error covariance as a matrix
53 # ----------------------------------------------------------
62 # Definition of the init_data dictionnary
63 # ---------------------------------------
65 init_data["Background"] = Background
66 init_data["Observation"] = Observation
67 init_data["BackgroundError"] = BackgroundError
68 init_data["ObservationError"] = ObservationError
70 # Algorithm Parameters
71 init_data["AlgorithmParameters"] = {"Minimizer":"LBFGSB","MaximumNumberOfSteps":5}