]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Minor source corrections
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 20 Sep 2013 11:55:29 +0000 (13:55 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 20 Sep 2013 11:55:29 +0000 (13:55 +0200)
src/daComposant/daAlgorithms/ExtendedBlue.py
src/daComposant/daCore/BasicObjects.py

index c4085c5e70d82dc088462d7f65a834e3d59c8f8b..196b526ee5fa24a8fc5bcaf992501f569ba2a3a6 100644 (file)
@@ -54,7 +54,6 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
         #
         # Opérateur d'observation
         # -----------------------
-        H  = HO["Direct"].appliedTo
         Hm = HO["Tangent"].asMatrix(Xb)
         Hm = Hm.reshape(Y.size,Xb.size) # ADAO & check shape
         Ha = HO["Adjoint"].asMatrix(Xb)
@@ -65,6 +64,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
         if HO["AppliedToX"] is not None and HO["AppliedToX"].has_key("HXb"):
             HXb = HO["AppliedToX"]["HXb"]
         else:
+            H  = HO["Direct"].appliedTo
             HXb = H( Xb )
         HXb = numpy.asmatrix(numpy.ravel( HXb )).T
         #
index dc5a466467f1de984281b31dacf0ccd876e45e6b..7a58d2332a2a9d3d77f3a672205728c833977d9a 100644 (file)
@@ -360,12 +360,12 @@ class Covariance:
         self.__is_matrix  = False
         if asEyeByScalar is not None:
             self.__is_scalar = True
-            self.__B         = float(asEyeByScalar)
+            self.__B         = numpy.abs( float(asEyeByScalar) )
             self.shape       = (0,0)
             self.size        = 0
         elif asEyeByVector is not None:
             self.__is_vector = True
-            self.__B         = numpy.array( numpy.ravel( asEyeByVector ), float )
+            self.__B         = numpy.abs( numpy.array( numpy.ravel( asEyeByVector ), float ) )
             self.shape       = (self.__B.size,self.__B.size)
             self.size        = self.__B.size**2
         elif asCovariance is not None: