From c2007f92c7f214218076c56a66eb5f204ca9316f Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Thu, 1 Oct 2009 09:18:25 +0000 Subject: [PATCH] *** empty log message *** --- Ihm/I_JDC.py | 4 +- Ihm/I_MACRO_ETAPE.py | 2 +- Openturns_Study/OpenTURNS_Cata_Study_V6.py | 40 +++++++++++++++++++- Openturns_Study/prefs_OPENTURNS_STUDY.py | 4 +- Openturns_Wrapper/prefs_OPENTURNS_WRAPPER.py | 10 ++--- 5 files changed, 47 insertions(+), 13 deletions(-) diff --git a/Ihm/I_JDC.py b/Ihm/I_JDC.py index ec92daee..ed87c542 100644 --- a/Ihm/I_JDC.py +++ b/Ihm/I_JDC.py @@ -88,14 +88,14 @@ class JDC(I_OBJECT.OBJECT): def set_Copules_recalcule_etat(self): for etapeTraitee in self.etapes : if etapeTraitee.nom == 'CORRELATION' : - copule=etapeTraitee.get_child('LaCopule') + copule=etapeTraitee.get_child('Copula') if copule !=None : copule.state='arecalculer' def recalcule_etat_correlation(self): for etapeTraitee in self.etapes : if etapeTraitee.nom == 'CORRELATION' : - copule=etapeTraitee.get_child('LaCopule') + copule=etapeTraitee.get_child('Copula') if copule !=None : copule.state='arecalculer' copule.isvalid() diff --git a/Ihm/I_MACRO_ETAPE.py b/Ihm/I_MACRO_ETAPE.py index bee4783d..26350474 100644 --- a/Ihm/I_MACRO_ETAPE.py +++ b/Ihm/I_MACRO_ETAPE.py @@ -825,7 +825,7 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): if e.nom=="CORRELATION": e.state="changed" try : - MCFils=e.get_child('LaCopule') + MCFils=e.get_child('Copula') MCFils.state="changed" except : pass diff --git a/Openturns_Study/OpenTURNS_Cata_Study_V6.py b/Openturns_Study/OpenTURNS_Cata_Study_V6.py index 078684ae..9a239a09 100644 --- a/Openturns_Study/OpenTURNS_Cata_Study_V6.py +++ b/Openturns_Study/OpenTURNS_Cata_Study_V6.py @@ -28,6 +28,28 @@ class Tuple: __repr__=info __str__=info +class Matrice: + def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): + self.nbLigs=nbLigs + self.nbCols=nbCols + self.methodeCalculTaille=methodeCalculTaille + self.formatSortie=formatSortie + self.valSup=valSup + self.valMin=valMin + self.structure=structure + + def __convert__(self,valeur): + # Attention ne verifie pas grand chose + if type(valeur) != types.ListType : + return None + return valeur + + def info(self): + return "Matrice %s x %s" % (self.nbLigs, self.nbCols) + + __repr__=info + __str__=info + #CONTEXT.debug = 1 JdC = JDC_CATA ( code = 'OPENTURNS_STUDY', @@ -885,13 +907,27 @@ CORRELATION = PROC ( nom = 'CORRELATION', ang = "Variable correlation", Copula = SIMP ( statut = "o", - typ = "TXM", - into = ( "Independent", ), + typ = 'TXM', + into = ( "Independent", "Normal" ), defaut = "Independent", fr = "Type de la copule", ang = "Copula kind", ), + Matrix = BLOC ( condition = "Copula in ( 'Normal', )", + + CorrelationMatrix = SIMP ( statut = "o", + typ = Matrice(nbLigs=None, + nbCols=None, + methodeCalculTaille='NbDeVariables', + valSup=1, + valMin=-1, + structure="symetrique"), + fr = "Matrice de correlation entre les variables d'entree", + ang = "Correlation matrix for input variables", + ), + ), # Fin BLOC Matrix + ) # Fin PROC CORRELATION # Ordre Catalogue CORRELATION diff --git a/Openturns_Study/prefs_OPENTURNS_STUDY.py b/Openturns_Study/prefs_OPENTURNS_STUDY.py index ee47058d..a97130a2 100644 --- a/Openturns_Study/prefs_OPENTURNS_STUDY.py +++ b/Openturns_Study/prefs_OPENTURNS_STUDY.py @@ -21,7 +21,7 @@ import os, sys # Les variables pouvant positionnees sont : -print "import des prefs de OPENTURNS_STUDY" +print "import des prefs de OPENTURNS" # REPINI sert à localiser le fichier # initialdir sert comme directory initial des QFileDialog @@ -42,10 +42,10 @@ encoding='iso-8859-1' rep_cata = INSTALLDIR path_doc = os.path.join(rep_cata,'Doc') exec_acrobat = "/usr/bin/xpdf" +savedir = os.environ['HOME'] # OpenTURNS Python module OpenTURNS_path="/local00/home/dutka/OpenTURNS/merge/trunk/build/install/lib/python2.4/site-packages" # Choix des catalogues sys.path[:0]=[INSTALLDIR, OpenTURNS_path] - diff --git a/Openturns_Wrapper/prefs_OPENTURNS_WRAPPER.py b/Openturns_Wrapper/prefs_OPENTURNS_WRAPPER.py index e6bbd609..a97130a2 100644 --- a/Openturns_Wrapper/prefs_OPENTURNS_WRAPPER.py +++ b/Openturns_Wrapper/prefs_OPENTURNS_WRAPPER.py @@ -21,8 +21,7 @@ import os, sys # Les variables pouvant positionnees sont : -# "CODE_PATH_SURCHARGE","OpenTURNS_path","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata" -print "import des prefs de OPENTURNS_WRAPPER" +print "import des prefs de OPENTURNS" # REPINI sert à localiser le fichier # initialdir sert comme directory initial des QFileDialog @@ -43,11 +42,10 @@ encoding='iso-8859-1' rep_cata = INSTALLDIR path_doc = os.path.join(rep_cata,'Doc') exec_acrobat = "/usr/bin/xpdf" +savedir = os.environ['HOME'] + # OpenTURNS Python module OpenTURNS_path="/local00/home/dutka/OpenTURNS/merge/trunk/build/install/lib/python2.4/site-packages" - # Choix des catalogues -sys.path[:0]=[INSTALLDIR,OpenTURNS_path] - - +sys.path[:0]=[INSTALLDIR, OpenTURNS_path] -- 2.39.2