1 # -*- coding: utf-8 -*-
3 from numpy import array, ravel
4 from adao import adaoBuilder
5 case = adaoBuilder.New('')
6 case.setBackground( Vector = array([0., 1., 2.]), Stored=True )
7 case.setBackgroundError( ScalarSparseMatrix = 1. )
8 case.setObservation( Vector=array([10., 11., 12.]), Stored=True )
9 case.setObservationError( ScalarSparseMatrix = 1. )
10 case.setObservationOperator( Matrix=array([[1., 0., 0.],
13 case.setAlgorithmParameters(
14 Algorithm='ExtendedBlue',
16 'StoreSupplementaryCalculations': [
17 'APosterioriCovariance',
23 #-------------------------------------------------------------------------------
25 print("Interpolation between two vectors, of observation and background")
26 print("----------------------------------------------------------------")
28 print("Observation vector............:", ravel(case.get('Observation')))
29 print("A priori background vector....:", ravel(case.get('Background')))
31 print("Expected theoretical state....:", ravel([5., 6., 7.]))
33 print("Interpolation result..........:", ravel(case.get('Analysis')[-1]))
34 print("A posteriori covariance.......:\n", case.get('APosterioriCovariance')[-1])