X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FdaComposant%2FdaAlgorithms%2FInputValuesTest.py;h=7bda3dac702a2875741a380bc154e34c4bf828e8;hb=59c9144c3b491494cb2beeb10093f232a5e13f2a;hp=9a1dff757186e59e3ab32aa41e6e1a6f395ab925;hpb=fdfa4718d30e8aee85ade24f8296a9ad108fc6c9;p=modules%2Fadao.git diff --git a/src/daComposant/daAlgorithms/InputValuesTest.py b/src/daComposant/daAlgorithms/InputValuesTest.py index 9a1dff7..7bda3da 100644 --- a/src/daComposant/daAlgorithms/InputValuesTest.py +++ b/src/daComposant/daAlgorithms/InputValuesTest.py @@ -36,10 +36,21 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): minval = 0, ) self.defineRequiredParameter( - name = "PrintValuesFor", + name = "PrintAllValuesFor", default = [], typecast = tuple, - message = "Liste de vecteurs dont les valeurs sont à imprimer", + message = "Liste de noms de vecteurs dont les valeurs détaillées sont à imprimer", + listval = [ + "Background", + "CheckingPoint", + "Observation", + ] + ) + self.defineRequiredParameter( + name = "ShowInformationOnlyFor", + default = ["Background", "CheckingPoint", "Observation"], + typecast = tuple, + message = "Liste de noms de vecteurs dont les informations synthétiques sont à imprimer", listval = [ "Background", "CheckingPoint", @@ -55,20 +66,26 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): self.requireInputArguments( mandatory= (), ) + self.setAttributes(tags=( + "Checking", + )) def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None): - self._pre_run(Parameters, Xb, Y, R, B, Q) + self._pre_run(Parameters, Xb, Y, U, HO, EM, CM, R, B, Q) # _p = self._parameters["NumberOfPrintedDigits"] numpy.set_printoptions(precision=_p) # def __buildPrintableVectorProperties( __name, __vector ): - if __vector is None: return "" - if len(__vector) == 0: return "" - if hasattr(__vector,"name") and __name != __vector.name(): - return "" + if __vector is None: return "" + if len(__vector) == 0: return "" + if hasattr(__vector,"name") and __name != __vector.name(): return "" + if __name not in self._parameters["ShowInformationOnlyFor"]: return "" # - __title = "Information for %svector:"%(str(__name)+" ",) + if hasattr(__vector,"mins"): + __title = "Information for %svector series:"%(str(__name)+" ",) + else: + __title = "Information for %svector:"%(str(__name)+" ",) msgs = "\n" msgs += ("===> "+__title+"\n") msgs += (" "+("-"*len(__title))+"\n") @@ -94,7 +111,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): msgs += (" Serie of maximum values...: %s\n")%numpy.array(__vector.maxs()) else: msgs += (" Maximum of vector.........: %12."+str(_p)+"e\n")%__vector.max() - if self._parameters["SetDebug"] or __name in self._parameters["PrintValuesFor"]: + if self._parameters["SetDebug"] or __name in self._parameters["PrintAllValuesFor"]: msgs += ("\n") msgs += (" Printing all values :\n") msgs += ("%s"%(__vector,))