Salome HOME
Debut de l'utilisation de daStudy dans les schemas
[modules/adao.git] / resources / DATASSIMSchemaCatalog.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <proc>
3   
4   <objref name="computeAD" id="python:computeAD:1.0">
5     <base>pyobj</base>
6   </objref>
7
8   <inline name="CreateAssimilationStudy">
9     <script><code>
10
11 <![CDATA[
12 import numpy
13 print "Entering in CreateAssimilationStudy"
14 print "Name is", Name
15 print "Algorithm is", Algorithm
16
17
18 # Data
19 print "Data entered are:"
20 # Background
21 try:
22   Background
23 except NameError:
24   pass
25 else:
26   print "Background is", Background
27   print "BackgroundType is", BackgroundType
28
29 # BackgroundError
30 try:
31   BackgroundError
32 except NameError:
33   pass
34 else:
35   print "BackgroundError is", BackgroundError
36   print "BackgroundErrorType is", BackgroundErrorType
37
38 # Observation
39 try:
40   Observation
41 except NameError:
42   pass
43 else:
44   print "Observation is", Observation
45   print "ObservationType is", ObservationType
46
47 # ObservationError
48 try:
49   ObservationError
50 except NameError:
51   pass
52 else:
53   print "ObservationError is", ObservationError
54   print "ObservationErrorType is", ObservationErrorType
55
56 # ObservationOperator
57 try:
58   ObservationOperator
59 except NameError:
60   pass
61 else:
62   print "ObservationOperator is", ObservationOperator
63   print "ObservationOperatorType is", ObservationOperatorType
64
65 from daYacsIntegration.daStudy import *
66 assim_study = daStudy(Name, Algorithm)
67 ]]>
68
69 </code></script>
70     <inport name="Name" type="string"/>
71     <inport name="Algorithm" type="string"/>
72   </inline>
73
74   <inline name="CreateNumpyMatrixFromString">
75     <script><code><![CDATA[
76 print "Entering in CreateNumpyMatrixFromString"
77 import numpy
78 matrix = numpy.matrix(matrix_in_string)
79 type = "Matrix"
80 print "Matrix is", matrix
81 ]]></code></script>
82     <inport name="matrix_in_string" type="string"/>
83     <outport name="matrix" type="pyobj"/>
84     <outport name="type" type="string"/>
85   </inline>
86
87   <inline name="CreateNumpyVectorFromString">
88     <script><code><![CDATA[
89 print "Entering in CreateNumpyVectorFromString"
90 import numpy
91 vector = numpy.matrix(vector_in_string)
92 type = "Vector"
93 print "Vector is", vector
94 ]]></code></script>
95     <inport name="vector_in_string" type="string"/>
96     <outport name="vector" type="pyobj"/>
97     <outport name="type" type="string"/>
98   </inline>
99
100 </proc>