1 #-*-coding:iso-8859-1-*-
2 # Copyright (C) 2010-2013 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: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
23 numpy.random.seed(1000)
29 xt = numpy.matrix(numpy.arange(dimension)).T
30 Eo = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,))).T
31 Eb = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,))).T
32 H = numpy.matrix(numpy.random.normal(0.,1.,size=(dimension,dimension)))
34 yo = FunctionH( xt ) + Eo
37 R = numpy.matrix(numpy.core.identity(dimension)).T
38 B = numpy.matrix(numpy.core.identity(dimension)).T
41 # Definition of the Background as a vector
42 # ----------------------------------------
45 # Definition of the Observation as a vector
46 # -----------------------------------------
49 # Definition of the Background Error covariance as a matrix
50 # ---------------------------------------------------------
53 # Definition of the Observation Error covariance as a matrix
54 # ----------------------------------------------------------
63 # Definition of the init_data dictionnary
64 # ---------------------------------------
66 init_data["Background"] = Background
67 init_data["Observation"] = Observation
68 init_data["BackgroundError"] = BackgroundError
69 init_data["ObservationError"] = ObservationError
71 # Algorithm Parameters
72 init_data["AlgorithmParameters"] = {"Minimizer":"LBFGSB","MaximumNumberOfSteps":5}