1 #-*-coding:iso-8859-1-*-
3 # Copyright (C) 2008-2017 EDF R&D
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24 numpy.random.seed(1000)
30 xt = numpy.matrix(numpy.arange(dimension)).T
31 Eo = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,))).T
32 Eb = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,))).T
33 H = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,dimension)))
35 yo = FunctionH( xt ) + Eo
38 R = numpy.matrix(numpy.core.identity(dimension)).T
39 B = numpy.matrix(numpy.core.identity(dimension)).T
42 # Definition of the Background as a vector
43 # ----------------------------------------
46 # Definition of the Observation as a vector
47 # -----------------------------------------
50 # Definition of the Background Error covariance as a matrix
51 # ---------------------------------------------------------
54 # Definition of the Observation Error covariance as a matrix
55 # ----------------------------------------------------------
64 # Definition of the init_data dictionnary
65 # ---------------------------------------
67 init_data["Background"] = Background
68 init_data["Observation"] = Observation
69 init_data["BackgroundError"] = BackgroundError
70 init_data["ObservationError"] = ObservationError
72 # Algorithm Parameters
73 init_data["AlgorithmParameters"] = {"Minimizer":"LBFGSB","MaximumNumberOfSteps":5}