From: pascale.noyret Date: Mon, 12 Oct 2015 08:18:25 +0000 (+0200) Subject: modif catalogue Adao X-Git-Tag: V7_7_0rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b22a4fc563dd4223e8f74c48ddb54e674f5f7049;p=tools%2Feficas.git modif catalogue Adao --- diff --git a/Adao/ADAO_Cata_V0_V7_5_1.py b/Adao/ADAO_Cata_V0_V7_5_1.py deleted file mode 100755 index bef71f52..00000000 --- a/Adao/ADAO_Cata_V0_V7_5_1.py +++ /dev/null @@ -1,1236 +0,0 @@ -# -*- coding: utf-8 -*- - -# -------------------------------------------------------- -# generated by AdaoCatalogGenerator at 2015-01-20 22:37:47 -# -------------------------------------------------------- - -import Accas -from Accas import * - -JdC = JDC_CATA (code = 'ADAO', - execmodul = None, - regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), - ) -VERSION_CATALOGUE='V7_5_1' - -def F_VectorSerie(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Function(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithOneFunction", "ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithOneFunction"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Matrix(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_DiagonalSparseMatrix(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Vector(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Dict(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_ScalarSparseMatrix(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", defaut="1.", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_ObservationError(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o"), - ), - - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o"), - ), - - ) - -def F_Observation(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o"), - ), - - ) - -def F_BackgroundError(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o"), - ), - - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o"), - ), - - ) - -def F_ObservationOperator(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o"), - ), - - ) - -def F_CheckingPoint(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), - - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - - ) - -def F_ControlInput(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o"), - ), - - ) - -def F_Background(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o"), - ), - - ) - -def F_AlgorithmParameters(statut) : return FACT(statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o"), - ), - - ) - -def F_EvolutionError(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o"), - ), - - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o"), - ), - - ) - -def F_UserDataInit(statut) : return FACT(statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o"), - ), - - ) - -def F_EvolutionModel(statut) : return FACT(statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o"), - ), - - ) - -def F_UserPostAnalysis(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "Template", ), defaut="Template"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="EXPERIMENTAL : Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="EXPERIMENTAL: Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - FUNCTIONDICT_DATA = BLOC ( condition = " FROM in ( 'FunctionDict', ) ", - - FUNCTIONDICT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="OBSOLETE : conservé pour compatibilité avec la version 6.5, sera supprimé dans le futur", ang="OBSOLETE: keeped for compatibility with the 6.5 version, will be removed in the future"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_InitChoice() : return ("Background", - "BackgroundError", - "Observation", - "ObservationError", - "ObservationOperator", - "EvolutionModel", - "EvolutionError", - "AlgorithmParameters", - "UserPostAnalysis", - ) - -def F_Init(statut) : return FACT(statut = statut, - INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), - TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), - ) - -def F_Observers(statut) : return FACT(statut=statut, - SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(['Analysis', 'CurrentState', 'Innovation', 'SimulatedObservationAtCurrentState', 'OMA', 'OMB', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCovariance'])), - - Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", - Analysis_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Analysis"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", - CurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", - Innovation_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Innovation"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - SimulatedObservationAtCurrentState = BLOC (condition=" 'SimulatedObservationAtCurrentState' in set(SELECTION) ", - SimulatedObservationAtCurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", - OMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", - OMB_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMB"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", - BMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "BMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", - CostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", - CostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", - CostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", - GradientOfCostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", - GradientOfCostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", - GradientOfCostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", - SigmaObs2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaObs2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", - SigmaBck2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaBck2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", - APosterioriCovariance_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCovariance"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = BLOC (condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ), - ), - ), - - ) - - -def F_variables(statut) : return FACT(statut=statut, - regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), - NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), - SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") - ) - -ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", - op=None, - repetable = "n", - Study_name = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"), - Study_repertory = SIMP(statut="f", typ = "Repertoire", min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - Algorithm = SIMP(statut="o", typ = "TXM", into=("3DVAR", "Blue", "EnsembleBlue", "ExtendedBlue", "ExtendedKalmanFilter", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", "UnscentedKalmanFilter", )), - Background = F_Background("o"), - BackgroundError = F_BackgroundError("o"), - Observation = F_Observation("o"), - ObservationError = F_ObservationError("o"), - ObservationOperator = F_ObservationOperator("o"), - EvolutionModel = F_EvolutionModel("f"), - EvolutionError = F_EvolutionError("f"), - ControlInput = F_ControlInput("f"), - AlgorithmParameters = F_AlgorithmParameters("f"), - UserDataInit = F_Init("f"), - UserPostAnalysis = F_UserPostAnalysis("o"), - InputVariables = F_variables("f"), - OutputVariables = F_variables("f"), - Observers = F_Observers("f") - ) - -CHECKING_STUDY = PROC(nom="CHECKING_STUDY", - op=None, - repetable = "n", - Study_name = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"), - Study_repertory = SIMP(statut="f", typ = "Repertoire", min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - Algorithm = SIMP(statut="o", typ = "TXM", into=("AdjointTest", "FunctionTest", "GradientTest", "LinearityTest", "ObserverTest", "SamplingTest", "TangentTest", )), - CheckingPoint = F_CheckingPoint("o"), - BackgroundError = F_BackgroundError("f"), - Observation = F_Observation("f"), - ObservationError = F_ObservationError("f"), - ObservationOperator = F_ObservationOperator("o"), - AlgorithmParameters = F_AlgorithmParameters("f"), - UserDataInit = F_Init("f"), - Observers = F_Observers("f") - ) diff --git a/Adao/ADAO_Cata_V0_V7_6_0.py b/Adao/ADAO_Cata_V0_V7_6_0.py deleted file mode 100755 index a383b0ba..00000000 --- a/Adao/ADAO_Cata_V0_V7_6_0.py +++ /dev/null @@ -1,926 +0,0 @@ -#-*-coding:iso-8859-1-*- -# -# Copyright (C) 2008-2015 EDF R&D -# -# This file is part of SALOME ADAO module -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -# -------------------------------------------------------- -# Generated by AdaoCatalogGenerator on 2015-03-01 21:15:17 -# -------------------------------------------------------- - -import Accas -from Accas import * - -JdC = JDC_CATA ( - code = 'ADAO', - execmodul = None, - regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), - ) -VERSION_CATALOGUE='V7_6_0' - -def F_VectorSerie(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Function(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithOneFunction", "ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithOneFunction"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Matrix(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_DiagonalSparseMatrix(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Vector(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Dict(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_ScalarSparseMatrix(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", defaut="1.", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_ObservationError(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o"), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o"), - ), - ) - -def F_Observation(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o"), - ), - ) - -def F_BackgroundError(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o"), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o"), - ), - ) - -def F_ObservationOperator(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o"), - ), - ) - -def F_CheckingPoint(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - ) - -def F_ControlInput(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o"), - ), - ) - -def F_Background(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o"), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o"), - ), - ) - -def F_AlgorithmParameters(statut) : return FACT( - statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o"), - ), - ) - -def F_EvolutionError(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o"), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o"), - ), - ) - -def F_UserDataInit(statut) : return FACT( - statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o"), - ), - ) - -def F_EvolutionModel(statut) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o"), - ), - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o"), - ), - ) - -def F_UserPostAnalysis(statut) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "Template", ), defaut="Template"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_InitChoice() : return ("Background", - "BackgroundError", - "Observation", - "ObservationError", - "ObservationOperator", - "EvolutionModel", - "EvolutionError", - "AlgorithmParameters", - "UserPostAnalysis", - ) - -def F_Init(statut) : return FACT(statut = statut, - INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())), - TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), - ) - -def F_ObserverTemplate() : return BLOC(condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[-1]))\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy,re\nv=numpy.array((var[:])) \nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp('set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp('set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ), - ), - ) - -def F_Observers(statut) : return FACT( - statut=statut, - SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(['Analysis', 'CurrentState', 'Innovation', 'SimulatedObservationAtCurrentState', 'OMA', 'OMB', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCovariance'])), - Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", - Analysis_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Analysis"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", - CurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", - Innovation_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Innovation"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtCurrentState = BLOC (condition=" 'SimulatedObservationAtCurrentState' in set(SELECTION) ", - SimulatedObservationAtCurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", - OMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", - OMB_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMB"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", - BMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "BMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", - CostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", - CostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", - CostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", - GradientOfCostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", - GradientOfCostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", - GradientOfCostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", - SigmaObs2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaObs2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", - SigmaBck2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaBck2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", - APosterioriCovariance_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCovariance"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr())) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - ) - -def F_AlgorithmParameters(statut,algos_names) : return FACT( - statut = statut, - Algorithm = SIMP(statut="o", typ = "TXM", into = algos_names ), - Parameters = SIMP(statut="f", typ = "TXM", into=("Defaults", "Dict") ), - Dict = BLOC ( condition = " Parameters == 'Dict' ", - statut="f", - data = F_Dict("o"), - ), - Parameters3DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '3DVAR') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCovariance', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'Blue') ", - statut="f", - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCovariance', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersEnsembleBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'EnsembleBlue') ", - statut="f", - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - ), - ParametersExtendedBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedBlue') ", - statut="f", - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCovariance', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersExtendedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedKalmanFilter') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCovariance', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'KalmanFilter') ", - statut="f", - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCovariance', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearLeastSquares') ", - statut="f", - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['OMA', 'CostFunctionJ', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersNonLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'NonLinearLeastSquares') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS', 'LM'], fr="Minimiseur utilisé"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersParticleSwarmOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ParticleSwarmOptimization') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - GroupRecallRate = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Taux de rappel au meilleur insecte du groupe (entre 0 et 1)"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=50, fr="Nombre maximal de pas d'optimisation"), - NumberOfInsects = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=100, fr="Nombre d'insectes dans l'essaim"), - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - SwarmVelocity = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1.0, fr="Vitesse de groupe imposée par l'essaim"), - ), - ParametersQuantileRegression = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'QuantileRegression') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-06, fr="Maximum de variation de la fonction d'estimation lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="MMQR", into=['MMQR'], fr="Minimiseur utilisé"), - Quantile = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Quantile pour la regression de quantile"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersUnscentedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'UnscentedKalmanFilter') ", - statut="f", - Alpha = SIMP(statut="f", typ="R", val_min=0.0001, val_max=1.0, min=1, max=1, defaut=1.0, fr=""), - Beta = SIMP(statut="f", typ="R", min=1, max=1, defaut=2.0, fr=""), - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - Kappa = SIMP(statut="f", typ="I", val_max=2, min=1, max=1, defaut=0, fr=""), - Reconditioner = SIMP(statut="f", typ="R", val_min=0.001, val_max=10.0, min=1, max=1, defaut=1.0, fr=""), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCovariance', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersAdjointTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'AdjointTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="ScalarProduct", into=['ScalarProduct'], fr="Formule de résidu utilisée"), - ResultTitle = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="", into=None, fr="Titre du tableau et de la figure"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - ), - ParametersFunctionTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'FunctionTest') ", - statut="f", - NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), - NumberOfRepetition = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de fois où l'exécution de la fonction est répétée"), - ResultTitle = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="", into=None, fr="Titre du tableau et de la figure"), - SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=1, fr="Activation du mode debug lors de l'exécution"), - ), - ParametersGradientTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'GradientTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - PlotAndSave = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Trace et sauve les résultats"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Norm', 'Taylor'], fr="Formule de résidu utilisée"), - ResultFile = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="GRADIENTTEST_result_file", into=None, fr="Nom de base (hors extension) des fichiers de sauvegarde des résultats"), - ResultLabel = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="", into=None, fr="Label de la courbe tracée dans la figure"), - ResultTitle = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="", into=None, fr="Titre du tableau et de la figure"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - ), - ParametersLinearityTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearityTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="CenteredDL", into=['CenteredDL', 'Taylor', 'NominalTaylor', 'NominalTaylorRMS'], fr="Formule de résidu utilisée"), - ResultTitle = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="", into=None, fr="Titre du tableau et de la figure"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - ), - ParametersSamplingTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'SamplingTest') ", - statut="f", - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - SampleAsExplicitHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable comme une liste"), - SampleAsIndependantRandomVariables = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont les points sur chaque axe proviennent de l'échantillonage indépendant de la variable selon la spécification ['distribution',[parametres],nombre]"), - SampleAsMinMaxStepHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable par un triplet [min,max,step]"), - SampleAsnUplet = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par une liste de n-uplet"), - SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CostFunctionJ', 'CurrentState', 'Innovation', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersTangentTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'TangentTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Taylor'], fr="Formule de résidu utilisée"), - ResultTitle = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="", into=None, fr="Titre du tableau et de la figure"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - ), - ) - - -def F_variables(statut) : return FACT( - statut=statut, - regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), - NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), - SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") - ) - -ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", - op=None, - repetable = "n", - StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"), - StudyRepertory = SIMP(statut="f", typ = "Repertoire", min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - AlgorithmParameters = F_AlgorithmParameters("o",("3DVAR", "Blue", "EnsembleBlue", "ExtendedBlue", "ExtendedKalmanFilter", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", "UnscentedKalmanFilter", )), - Background = F_Background("o"), - BackgroundError = F_BackgroundError("o"), - Observation = F_Observation("o"), - ObservationError = F_ObservationError("o"), - ObservationOperator = F_ObservationOperator("o"), - EvolutionModel = F_EvolutionModel("f"), - EvolutionError = F_EvolutionError("f"), - ControlInput = F_ControlInput("f"), - UserDataInit = F_Init("f"), - UserPostAnalysis = F_UserPostAnalysis("o"), - InputVariables = F_variables("f"), - OutputVariables = F_variables("f"), - Observers = F_Observers("f") - ) - -CHECKING_STUDY = PROC(nom="CHECKING_STUDY", - op=None, - repetable = "n", - StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"), - StudyRepertory = SIMP(statut="f", typ = "Repertoire", min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - AlgorithmParameters = F_AlgorithmParameters("o",("AdjointTest", "FunctionTest", "GradientTest", "LinearityTest", "ObserverTest", "SamplingTest", "TangentTest", )), - CheckingPoint = F_CheckingPoint("o"), - BackgroundError = F_BackgroundError("f"), - Observation = F_Observation("f"), - ObservationError = F_ObservationError("f"), - ObservationOperator = F_ObservationOperator("o"), - UserDataInit = F_Init("f"), - Observers = F_Observers("f") - ) diff --git a/Adao/ADAO_Cata_V0_V7_7_0.py b/Adao/ADAO_Cata_V0_V7_7_0.py new file mode 100755 index 00000000..a39d3133 --- /dev/null +++ b/Adao/ADAO_Cata_V0_V7_7_0.py @@ -0,0 +1,1261 @@ +#-*-coding:iso-8859-1-*- +# +# Copyright (C) 2008-2015 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +# -------------------------------------------------------- +# Generated by AdaoCatalogGenerator on 2015-10-08 07:57:55 +# -------------------------------------------------------- + +import os, re +import Accas +from Accas import * + +JdC = JDC_CATA ( + code = 'ADAO', + execmodul = None, + regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), + ) +VERSION_CATALOGUE='V7_7_0' + +def NoCheckInNS(filename): + return 1 +NoCheckInNS.info = "" +def DirectOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^def[\s]*DirectOperator[\s]*\(") + for ln in fc: + if cr.match(ln): return 1 + cr = re.compile("^DirectOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +DirectOperatorInNS.info = u"The Python file has to contain explicitly a \"DirectOperator\" function definition with only one vector as argument." +def TangentOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^def[\s]*TangentOperator[\s]*\(") + for ln in fc: + if cr.match(ln): return 1 + cr = re.compile("^TangentOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +TangentOperatorInNS.info = u"The Python file has to contain explicitly a \"TangentOperator\" function definition with only one pair of vectors as argument." +def AdjointOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^def[\s]*AdjointOperator[\s]*\(") + for ln in fc: + if cr.match(ln): return 1 + cr = re.compile("^AdjointOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +AdjointOperatorInNS.info = u"The Python file has to contain explicitly an \"AdjointOperator\" function definition with only one pair of vectors as argument." + +def F_VectorSerie(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Function(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithOneFunction", "ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithOneFunction"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Matrix(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_DiagonalSparseMatrix(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Vector(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Dict(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_ScalarSparseMatrix(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", defaut="1.", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def ObservationErrorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^ObservationError[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ObservationErrorInNS.info = u"The Python file has to contain explicitly a \"ObservationError\" variable." +def F_ObservationError(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", + data = F_ScalarSparseMatrix("o", fv), + ), + DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", + data = F_DiagonalSparseMatrix("o", fv), + ), + ) + +def ObservationInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^Observation[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ObservationInNS.info = u"The Python file has to contain explicitly a \"Observation\" variable." +def F_Observation(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o", fv), + ), + ) + +def BackgroundErrorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^BackgroundError[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +BackgroundErrorInNS.info = u"The Python file has to contain explicitly a \"BackgroundError\" variable." +def F_BackgroundError(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", + data = F_ScalarSparseMatrix("o", fv), + ), + DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", + data = F_DiagonalSparseMatrix("o", fv), + ), + ) + +def ObservationOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^ObservationOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ObservationOperatorInNS.info = u"The Python file has to contain explicitly a \"ObservationOperator\" variable." +def F_ObservationOperator(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", + data = F_Function("o", fv), + ), + ) + +def CheckingPointInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^CheckingPoint[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +CheckingPointInNS.info = u"The Python file has to contain explicitly a \"CheckingPoint\" variable." +def F_CheckingPoint(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + ) + +def ControlInputInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^ControlInput[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ControlInputInNS.info = u"The Python file has to contain explicitly a \"ControlInput\" variable." +def F_ControlInput(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o", fv), + ), + ) + +def BackgroundInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^Background[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +BackgroundInNS.info = u"The Python file has to contain explicitly a \"Background\" variable." +def F_Background(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o", fv), + ), + ) + +def AlgorithmParametersInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^AlgorithmParameters[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +AlgorithmParametersInNS.info = u"The Python file has to contain explicitly a \"AlgorithmParameters\" variable." +def F_AlgorithmParameters(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), + Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", + data = F_Dict("o", fv), + ), + ) + +def EvolutionErrorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^EvolutionError[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +EvolutionErrorInNS.info = u"The Python file has to contain explicitly a \"EvolutionError\" variable." +def F_EvolutionError(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", + data = F_ScalarSparseMatrix("o", fv), + ), + DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", + data = F_DiagonalSparseMatrix("o", fv), + ), + ) + +def UserDataInitInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^UserDataInit[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +UserDataInitInNS.info = u"The Python file has to contain explicitly a \"UserDataInit\" variable." +def F_UserDataInit(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), + Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", + data = F_Dict("o", fv), + ), + ) + +def EvolutionModelInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^EvolutionModel[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +EvolutionModelInNS.info = u"The Python file has to contain explicitly a \"EvolutionModel\" variable." +def F_EvolutionModel(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", + data = F_Function("o", fv), + ), + ) + +def F_UserPostAnalysis(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "Template", ), defaut="Template"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_InitChoice() : return ("Background", + "BackgroundError", + "Observation", + "ObservationError", + "ObservationOperator", + "EvolutionModel", + "EvolutionError", + "AlgorithmParameters", + "UserPostAnalysis", + ) + +def F_Init(statut) : return FACT(statut = statut, + INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]), + TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), + ) + +def F_ObserverTemplate() : return BLOC(condition = " NodeType == 'Template' ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter", "ValuePrinterAndGnuPlotter", "ValueSeriePrinterAndGnuPlotter", "ValuePrinterSaverAndGnuPlotter", "ValueSeriePrinterSaverAndGnuPlotter", "ValueMean", "ValueStandardError", "ValueVariance", "ValueL2Norm", "ValueRMS")), + ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[-1]", fr="Imprime sur la sortie standard la valeur courante de la variable", ang="Print on standard output the current value of the variable" ), + ), + ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[:]", fr="Imprime sur la sortie standard la série des valeurs de la variable", ang="Print on standard output the value serie of the variable" ), + ), + ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Enregistre la valeur courante de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape d'enregistrement", ang="Save the current value of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), + ), + ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Enregistre la série des valeurs de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape", ang="Save the value serie of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), + ), + ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier la valeur courante de la variable", ang="Print on standard output and, in the same time, save in a file the current value of the variable" ), + ), + ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier la série des valeurs de la variable", ang="Print on standard output and, in the same time, save in a file the value serie of the variable" ), + ), + ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Graphically plot with Gnuplot the current value of the variable" ), + ), + ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Graphically plot with Gnuplot the value serie of the variable" ), + ), + ValuePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[-1]\nimport numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the current value of the variable" ), + ), + ValueSeriePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[:] \nimport numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the value serie of the variable" ), + ), + ValuePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterSaverAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[-1]\nimport numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la valeur courante de la variable ", ang="Print on standard output and, in the same, time save in a file and graphically plot the current value of the variable" ), + ), + ValueSeriePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterSaverAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[:] \nimport numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la série des valeurs de la variable", ang="Print on standard output and, in the same, time save in a file and graphically plot the value serie of the variable" ), + ), + ValueMean = BLOC (condition = " Template == 'ValueMean' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint info, numpy.nanmean(var[-1])", fr="Imprime sur la sortie standard la moyenne de la valeur courante de la variable", ang="Print on standard output the mean of the current value of the variable" ), + ), + ValueStandardError = BLOC (condition = " Template == 'ValueStandardError' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint info, numpy.nanstd(var[-1])", fr="Imprime sur la sortie standard l'écart-type de la valeur courante de la variable", ang="Print on standard output the standard error of the current value of the variable" ), + ), + ValueVariance = BLOC (condition = " Template == 'ValueVariance' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint info, numpy.nanvar(var[-1])", fr="Imprime sur la sortie standard la variance de la valeur courante de la variable", ang="Print on standard output the variance of the current value of the variable" ), + ), + ValueL2Norm = BLOC (condition = " Template == 'ValueL2Norm' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint info, float( numpy.linalg.norm(v) )", fr="Imprime sur la sortie standard la norme L2 de la valeur courante de la variable", ang="Print on standard output the L2 norm of the current value of the variable" ), + ), + ValueRMS = BLOC (condition = " Template == 'ValueRMS' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint info, float( numpy.sqrt((1./v.size)*(v*v.T)) )", fr="Imprime sur la sortie standard la racine de la moyenne des carrés (RMS), ou moyenne quadratique, de la valeur courante de la variable", ang="Print on standard output the root mean square (RMS), or quadratic mean, of the current value of the variable" ), + ), + ) + +def F_Observers(statut) : return FACT( + statut=statut, + SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(['Analysis', 'Innovation', 'InnovationAtCurrentState', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'Residu'])), + Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", + Analysis_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "Analysis"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", + Innovation_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "Innovation"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + InnovationAtCurrentState = BLOC (condition=" 'InnovationAtCurrentState' in set(SELECTION) ", + InnovationAtCurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "InnovationAtCurrentState"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", + CurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentState"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CurrentOptimum = BLOC (condition=" 'CurrentOptimum' in set(SELECTION) ", + CurrentOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + IndexOfOptimum = BLOC (condition=" 'IndexOfOptimum' in set(SELECTION) ", + IndexOfOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "IndexOfOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtBackground = BLOC (condition=" 'SimulatedObservationAtBackground' in set(SELECTION) ", + SimulatedObservationAtBackground_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtBackground"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtCurrentState = BLOC (condition=" 'SimulatedObservationAtCurrentState' in set(SELECTION) ", + SimulatedObservationAtCurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentState"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtOptimum = BLOC (condition=" 'SimulatedObservationAtOptimum' in set(SELECTION) ", + SimulatedObservationAtOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtCurrentOptimum = BLOC (condition=" 'SimulatedObservationAtCurrentOptimum' in set(SELECTION) ", + SimulatedObservationAtCurrentOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", + BMA_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "BMA"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", + OMA_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "OMA"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", + OMB_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "OMB"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", + CostFunctionJ_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJ"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", + CostFunctionJb_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJb"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", + CostFunctionJo_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJo"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", + GradientOfCostFunctionJ_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJ"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", + GradientOfCostFunctionJb_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJb"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", + GradientOfCostFunctionJo_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJo"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", + SigmaObs2_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaObs2"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", + SigmaBck2_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaBck2"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriCorrelations = BLOC (condition=" 'APosterioriCorrelations' in set(SELECTION) ", + APosterioriCorrelations_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCorrelations"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", + APosterioriCovariance_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCovariance"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriStandardDeviations = BLOC (condition=" 'APosterioriStandardDeviations' in set(SELECTION) ", + APosterioriStandardDeviations_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriStandardDeviations"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriVariances = BLOC (condition=" 'APosterioriVariances' in set(SELECTION) ", + APosterioriVariances_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriVariances"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + Residu = BLOC (condition=" 'Residu' in set(SELECTION) ", + Residu_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "Residu"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + ) + +def AlgorithmParametersInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^AlgorithmParameters[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +AlgorithmParametersInNS.info = u"The Python file has to contain explicitly an \"AlgorithmParameters\" variable." +def F_AlgorithmParameters(statut, algos_names, fv=NoCheckInNS) : return FACT( + statut = statut, + Algorithm = SIMP(statut="o", typ = "TXM", into = algos_names ), + Parameters = SIMP(statut="f", typ = "TXM", into=("Defaults", "Dict") ), + Dict = BLOC ( condition = " Parameters == 'Dict' ", + statut="f", + data = F_Dict("o", fv), + ), + Parameters3DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '3DVAR') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), + GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), + NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), + ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), + Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'CostFunctionJAtCurrentOptimum', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + Parameters4DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '4DVAR') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), + ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'CurrentState', 'CostFunctionJ', 'IndexOfOptimum', 'CurrentOptimum', 'CostFunctionJAtCurrentOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'Blue') ", + statut="f", + NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), + Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersDerivativeFreeOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'DerivativeFreeOptimization') ", + statut="f", + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), + MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de d'évaluations de la function"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="POWELL", into=['POWELL', 'SIMPLEX'], fr="Minimiseur utilisé"), + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'DA', 'WeightedLeastSquares', 'WLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + StateVariationTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=0.0001, fr="Variation relative maximale de l'état lors de l'arrêt"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'CostFunctionJ', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersEnsembleBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'EnsembleBlue') ", + statut="f", + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersExtendedBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedBlue') ", + statut="f", + NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), + Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersExtendedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedKalmanFilter') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'KalmanFilter') ", + statut="f", + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearLeastSquares') ", + statut="f", + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['OMA', 'CurrentState', 'CostFunctionJ', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersNonLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'NonLinearLeastSquares') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), + GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS', 'LM'], fr="Minimiseur utilisé"), + ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersParticleSwarmOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ParticleSwarmOptimization') ", + statut="f", + BoxBounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes d'incréments de paramètres"), + GroupRecallRate = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Taux de rappel au meilleur insecte du groupe (entre 0 et 1)"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=50, fr="Nombre maximal de pas d'optimisation"), + NumberOfInsects = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=100, fr="Nombre d'insectes dans l'essaim"), + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + SwarmVelocity = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1.0, fr="Vitesse de groupe imposée par l'essaim"), + ), + ParametersQuantileRegression = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'QuantileRegression') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-06, fr="Maximum de variation de la fonction d'estimation lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="MMQR", into=['MMQR'], fr="Minimiseur utilisé"), + Quantile = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Quantile pour la regression de quantile"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersUnscentedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'UnscentedKalmanFilter') ", + statut="f", + Alpha = SIMP(statut="f", typ="R", val_min=0.0001, val_max=1.0, min=1, max=1, defaut=1.0, fr=""), + Beta = SIMP(statut="f", typ="R", min=1, max=1, defaut=2.0, fr=""), + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + Kappa = SIMP(statut="f", typ="I", val_max=2, min=1, max=1, defaut=0, fr=""), + Reconditioner = SIMP(statut="f", typ="R", val_min=0.001, val_max=10.0, min=1, max=1, defaut=1.0, fr=""), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersAdjointTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'AdjointTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="ScalarProduct", into=['ScalarProduct'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersFunctionTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'FunctionTest') ", + statut="f", + NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), + NumberOfRepetition = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de fois où l'exécution de la fonction est répétée"), + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersGradientTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'GradientTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Norm', 'TaylorOnNorm', 'Taylor'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersLinearityTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearityTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="CenteredDL", into=['CenteredDL', 'Taylor', 'NominalTaylor', 'NominalTaylorRMS'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersSamplingTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'SamplingTest') ", + statut="f", + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + SampleAsExplicitHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable comme une liste"), + SampleAsIndependantRandomVariables = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont les points sur chaque axe proviennent de l'échantillonage indépendant de la variable selon la spécification ['distribution',[parametres],nombre]"), + SampleAsMinMaxStepHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable par un triplet [min,max,step]"), + SampleAsnUplet = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par une liste de n-uplet"), + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CostFunctionJ', 'CurrentState', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersTangentTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'TangentTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Taylor'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ) + +def F_variables(statut) : return FACT( + statut=statut, + regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), + NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), + SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") + ) +def ChDir(dirname): + os.chdir(os.path.abspath(dirname)) + return 1 +ChDir.info = u"This has to be a regular directory path." + +ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", + op=None, + repetable = "n", + StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"), + StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), + Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), + AlgorithmParameters = F_AlgorithmParameters("o",("3DVAR", "4DVAR", "Blue", "DerivativeFreeOptimization", "EnsembleBlue", "ExtendedBlue", "ExtendedKalmanFilter", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", "UnscentedKalmanFilter", ), AlgorithmParametersInNS), + Background = F_Background("o", BackgroundInNS), + BackgroundError = F_BackgroundError("o", BackgroundErrorInNS), + Observation = F_Observation("o", ObservationInNS), + ObservationError = F_ObservationError("o", ObservationErrorInNS), + ObservationOperator = F_ObservationOperator("o"), + EvolutionModel = F_EvolutionModel("f"), + EvolutionError = F_EvolutionError("f", EvolutionErrorInNS), + ControlInput = F_ControlInput("f"), + UserDataInit = F_Init("f"), + UserPostAnalysis = F_UserPostAnalysis("o"), + InputVariables = F_variables("f"), + OutputVariables = F_variables("f"), + Observers = F_Observers("f") + ) + +CHECKING_STUDY = PROC(nom="CHECKING_STUDY", + op=None, + repetable = "n", + StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"), + StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), + Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), + AlgorithmParameters = F_AlgorithmParameters("o", ("AdjointTest", "FunctionTest", "GradientTest", "LinearityTest", "ObserverTest", "SamplingTest", "TangentTest", ), AlgorithmParametersInNS), + CheckingPoint = F_CheckingPoint("o", CheckingPointInNS), + BackgroundError = F_BackgroundError("f", BackgroundErrorInNS), + Observation = F_Observation("f", ObservationInNS), + ObservationError = F_ObservationError("f", ObservationErrorInNS), + ObservationOperator = F_ObservationOperator("o"), + UserDataInit = F_Init("f"), + Observers = F_Observers("f") + ) diff --git a/Adao/README_CATALOGUE.txt b/Adao/README_CATALOGUE.txt new file mode 100644 index 00000000..f4d3dbd0 --- /dev/null +++ b/Adao/README_CATALOGUE.txt @@ -0,0 +1,4 @@ +#-*-coding:iso-8859-1-*- +# +Les catalogues presents dans cette directory sont des catalogues de tests. +Le catalogue final utilisé dans le module Adao de Salome peut être différent diff --git a/Adao/prefs_Adao.py b/Adao/prefs_Adao.py index e28c0633..65ed235b 100644 --- a/Adao/prefs_Adao.py +++ b/Adao/prefs_Adao.py @@ -15,8 +15,8 @@ encoding='iso-8859-1' # format du Tuple (code,version,catalogue,formatOut, finit par defaut Ãventuellement) catalogues = ( # ('Adao','V1',os.path.join(repIni,'ADAO_Cata_V1.py'),'python','python'), - ('Adao','V760',os.path.join(repIni,'ADAO_Cata_V0_V7_6_0.py'),'python','python'), - ('Adao','V751',os.path.join(repIni,'ADAO_Cata_V0_V7_5_1.py'),'python','python'), + ('Adao','V770',os.path.join(repIni,'ADAO_Cata_V0_V7_7_0.py'),'python','python'), +# ('Adao','V751',os.path.join(repIni,'ADAO_Cata_V0_V7_5_1.py'),'python','python'), ) # lang indique la langue utilisée pour les chaines d'aide : fr ou ang diff --git a/Noyau/N_VALIDATOR.py b/Noyau/N_VALIDATOR.py index 00ace632..4a772374 100644 --- a/Noyau/N_VALIDATOR.py +++ b/Noyau/N_VALIDATOR.py @@ -30,6 +30,7 @@ import re from N_ASSD import ASSD from N_types import is_int, is_float_or_int, is_complex, is_number, is_str, is_sequence from strfunc import convert, ufmt +from Extensions.i18n import tr class ValError(Exception): @@ -159,21 +160,21 @@ class TypeProtocol(PProtocol): return obj else: raise ValError( - ufmt(_(u"%s n'est pas un fichier valide"), repr(obj))) + ufmt(_(tr(u"%s n'est pas un fichier valide")), repr(obj))) elif type_permis == 'FichierNoAbs': import os if (len(typ) > 2 and typ[2] == "Sauvegarde") or isinstance(obj, type("")): return obj else: raise ValError( - ufmt(_(u"%s n'est pas un fichier valide"), repr(obj))) + ufmt(_(tr(u"%s n'est pas un fichier valide")), repr(obj))) elif type_permis == 'Repertoire': import os if os.path.isdir(obj): return obj else: raise ValError( - ufmt(_(u"%s n'est pas un répertoire valide"), repr(obj))) + ufmt(_(tr(u"%s n'est pas un répertoire valide")), repr(obj))) elif type(type_permis) == types.ClassType or isinstance(type_permis, type): try: if self.is_object_from(obj, type_permis): @@ -187,9 +188,9 @@ class TypeProtocol(PProtocol): except Exception, err: pass else: - print convert(ufmt(_(u"Type non encore géré %s"), `type_permis`)) + print convert(ufmt(_(tr(u"Type non encore géré %s")), `type_permis`)) raise ValError( - ufmt(_(u"%s (de type %s) n'est pas d'un type autorisé: %s %s"), + ufmt(_(tr(u"%s (de type %s) n'est pas d'un type autorisé: %s %s")), repr(obj), type(obj), typ, unicode(err))) def is_complexe(self, valeur): @@ -249,7 +250,7 @@ class CardProtocol(PProtocol): if length < min or length > max: raise ValError( ufmt( - _(u"Nombre d'arguments de %s incorrect (min = %s, max = %s)"), + _(tr(u"Nombre d'arguments de %s incorrect (min = %s, max = %s)")), repr(obj), min, max)) return obj @@ -271,7 +272,7 @@ class IntoProtocol(PProtocol): if obj not in into: raise ValError( ufmt( - _(u"La valeur : %s ne fait pas partie des choix possibles %s"), + _(tr(u"La valeur : %s ne fait pas partie des choix possibles %s")), repr(obj), into)) else: # on est dans le cas d'un ensemble continu de valeurs possibles @@ -284,7 +285,7 @@ class IntoProtocol(PProtocol): if obj < val_min or obj > val_max: raise ValError( ufmt( - _(u"La valeur : %s est en dehors du domaine de validité [ %s , %s ]"), + _(tr(u"La valeur : %s est en dehors du domaine de validité [ %s , %s ]")), repr(obj), self.val_min, self.val_max)) return obj @@ -303,11 +304,11 @@ class MinStr: return valeur raise ValError( ufmt( - _(u"%s n'est pas une chaine de longueur comprise entre %s et %s"), + _(tr(u"%s n'est pas une chaine de longueur comprise entre %s et %s")), valeur, self.min, self.max)) def __repr__(self): - return ufmt(_(u"TXM de longueur entre %s et %s"), self.min, self.max) + return ufmt(_(tr(u"TXM de longueur entre %s et %s")), self.min, self.max) class Valid(PProtocol): @@ -525,7 +526,7 @@ class Compulsory(ListVal): self.cata_info = "" def info(self): - return ufmt(_(u"valeur %s obligatoire"), `self.elem`) + return ufmt(_(tr(u"valeur %s obligatoire")), `self.elem`) def default(self, valeur, elem): return valeur @@ -541,7 +542,7 @@ class Compulsory(ListVal): elem.remove(v) if elem: raise ValError( - ufmt(_(u"%s ne contient pas les elements obligatoires : %s "), + ufmt(_(tr(u"%s ne contient pas les elements obligatoires : %s ")), valeur, elem)) return valeur @@ -577,7 +578,7 @@ class Together(ListVal): self.cata_info = "" def info(self): - return ufmt(_(u"%s présent ensemble"), `self.elem`) + return ufmt(_(tr(u"%s présent ensemble")), `self.elem`) def default(self, valeur, elem): return valeur @@ -592,7 +593,7 @@ class Together(ListVal): if v in elem: elem.remove(v) if ( len(elem) == 0 ): return valeur if len(elem) != len(list(self.elem)) : - raise ValError( ufmt(_(u"%s ne contient pas les éléments devant être présent ensemble: %s "), valeur, elem)) + raise ValError( ufmt(_(tr(u"%s ne contient pas les éléments devant être présent ensemble: %s ")), valeur, elem)) return valeur def has_into(self): @@ -629,7 +630,7 @@ class Absent(ListVal): self.cata_info = "" def info(self): - return ufmt(_(u"%s absent"), `self.elem`) + return ufmt(_(tr(u"%s absent")), `self.elem`) def default(self, valeur, elem): return valeur @@ -642,7 +643,7 @@ class Absent(ListVal): for val in valeur: v = self.adapt(val) if v in elem: - raise ValError( ufmt(_(u"%s n'est pas autorisé : %s "), v, elem)) + raise ValError( ufmt(_(tr(u"%s n'est pas autorisé : %s ")), v, elem)) return valeur def has_into(self): @@ -678,7 +679,7 @@ class NoRepeat(ListVal): def default(self, valeur): if valeur in self.liste: - raise ValError(ufmt(_(u"%s est un doublon"), valeur)) + raise ValError(ufmt(_(tr(u"%s est un doublon")), valeur)) return valeur def convert(self, valeur): @@ -734,10 +735,10 @@ class LongStr(ListVal): self.cata_info = "" def info(self): - return ufmt(_(u"longueur de la chaine entre %s et %s"), self.low, self.high) + return ufmt(_(tr(u"longueur de la chaine entre %s et %s")), self.low, self.high) def info_erreur_item(self): - return _(u"Longueur de la chaine incorrecte") + return _(tr(u"Longueur de la chaine incorrecte")) def convert(self, valeur): for val in valeur: @@ -753,13 +754,13 @@ class LongStr(ListVal): def default(self, valeur, low, high): if not is_str(valeur): - raise ValError(ufmt(_(u"%s n'est pas une chaine"), repr(valeur))) + raise ValError(ufmt(_(tr(u"%s n'est pas une chaine")), repr(valeur))) if valeur[0] == "'" and valeur[-1] == "'": low = low + 2 high = high + 2 if len(valeur) < low or len(valeur) > high: raise ValError( - ufmt(_(u"%s n'est pas de la bonne longueur"), repr(valeur))) + ufmt(_(tr(u"%s n'est pas de la bonne longueur")), repr(valeur))) return valeur @@ -794,7 +795,7 @@ class OnlyStr(ListVal): def default(self, valeur): if not is_str(valeur): - raise ValError(ufmt(_(u"%s n'est pas une chaine"), repr(valeur))) + raise ValError(ufmt(_(tr(u"%s n'est pas une chaine")), repr(valeur))) return valeur @@ -811,10 +812,10 @@ class OrdList(ListVal): self.cata_info = "" def info(self): - return ufmt(_(u"liste %s"), self.ord) + return ufmt(_(tr(u"liste %s")), self.ord) def info_erreur_liste(self): - return ufmt(_(u"La liste doit etre en ordre %s"), self.ord) + return ufmt(_(tr(u"La liste doit etre en ordre %s")), self.ord) def convert(self, valeur): self.val = None @@ -827,11 +828,11 @@ class OrdList(ListVal): if self.ord == 'croissant': if self.val is not None and valeur < self.val: raise ValError( - ufmt(_(u"%s n'est pas par valeurs croissantes"), repr(self.liste))) + ufmt(_(tr(u"%s n'est pas par valeurs croissantes")), repr(self.liste))) elif self.ord == 'decroissant': if self.val is not None and valeur > self.val: raise ValError( - ufmt(_(u"%s n'est pas par valeurs decroissantes"), repr(self.liste))) + ufmt(_(tr(u"%s n'est pas par valeurs decroissantes")), repr(self.liste))) self.val = valeur return valeur @@ -889,7 +890,7 @@ class OrVal(Valid): return validator.convert(valeur) except: pass - raise ValError(ufmt(_(u"%s n'est pas du bon type"), repr(valeur))) + raise ValError(ufmt(_(tr(u"%s n'est pas du bon type")), repr(valeur))) def info_erreur_item(self): l = [] @@ -1178,22 +1179,22 @@ class RangeVal(ListVal): def __init__(self, low, high): self.low = low self.high = high - self.cata_info = ufmt(_(u"%s doit être inférieur a %s"), low, high) + self.cata_info = ufmt(_(tr(u"%s doit être inférieur a %s")), low, high) def info(self): - return ufmt(_(u"valeur dans l'intervalle %s , %s"), self.low, self.high) + return ufmt(_(tr(u"valeur dans l'intervalle %s , %s")), self.low, self.high) def convert_item(self, valeur): if valeur > self.low and valeur < self.high: return valeur - raise ValError(ufmt(_(u"%s devrait être comprise entre %s et %s"), + raise ValError(ufmt(_(tr(u"%s devrait être comprise entre %s et %s")), valeur, self.low, self.high)) def verif_item(self, valeur): return valeur > self.low and valeur < self.high def info_erreur_item(self): - return ufmt(_(u"La valeur doit etre comprise entre %s et %s"), self.low, self.high) + return ufmt(_(tr(u"La valeur doit etre comprise entre %s et %s")), self.low, self.high) def verif_cata(self): if self.low > self.high: @@ -1214,14 +1215,14 @@ class CardVal(Valid): def __init__(self, min='**', max='**'): self.min = min self.max = max - self.cata_info = ufmt(_(u"%s doit etre inferieur a %s"), min, max) + self.cata_info = ufmt(_(tr(u"%s doit etre inferieur a %s")), min, max) def info(self): - return ufmt(_(u"longueur de liste comprise entre %s et %s"), self.min, self.max) + return ufmt(_(tr(u"longueur de liste comprise entre %s et %s")), self.min, self.max) def info_erreur_liste(self): return ufmt( - _(u"Le cardinal de la liste doit etre compris entre %s et %s"), + _(tr(u"Le cardinal de la liste doit etre compris entre %s et %s")), self.min, self.max) def is_list(self): @@ -1248,10 +1249,10 @@ class CardVal(Valid): l = 1 if self.max != '**' and l > self.max: raise ValError( - ufmt(_(u"%s devrait etre de longueur inferieure a %s"), valeur, self.max)) + ufmt(_(tr(u"%s devrait etre de longueur inferieure a %s")), valeur, self.max)) if self.min != '**' and l < self.min: raise ValError( - ufmt(_(u"%s devrait etre de longueur superieure a %s"), valeur, self.min)) + ufmt(_(tr(u"%s devrait etre de longueur superieure a %s")), valeur, self.min)) return valeur def verif_item(self, valeur): @@ -1308,7 +1309,7 @@ class PairVal(ListVal): v = self.adapt(val) if v % 2 != 0: raise ValError( - ufmt(_(u"%s contient des valeurs non paires"), repr(valeur))) + ufmt(_(tr(u"%s contient des valeurs non paires")), repr(valeur))) return valeur def default(self, valeur): @@ -1352,7 +1353,7 @@ class EnumVal(ListVal): if valeur in self.into: return valeur raise ValError( - ufmt(_(u"%s contient des valeurs hors des choix possibles: %s "), + ufmt(_(tr(u"%s contient des valeurs hors des choix possibles: %s ")), valeur, self.into)) def verif_item(self, valeur): @@ -1410,7 +1411,7 @@ class F1Val(Valid): self.cata_info = "" def info(self): - return ufmt(_(u"valeur %s pour la somme des cles A et B "), self.somme) + return ufmt(_(tr(u"valeur %s pour la somme des cles A et B ")), self.somme) def verif(self, valeur): if is_sequence(valeur): @@ -1485,7 +1486,7 @@ class TypeVal(ListVal): self.coerce = self.identity def info(self): - return ufmt(_(u"valeur de %s"), self.aType) + return ufmt(_(tr(u"valeur de %s")), self.aType) def identity(self, value): if type(value) == self.aType: @@ -1533,7 +1534,7 @@ class InstanceVal(ListVal): self.aClass = aClass def info(self): - return ufmt(_(u"valeur d'instance de %s"), self.aClass.__name__) + return ufmt(_(tr(u"valeur d'instance de %s")), self.aClass.__name__) def verif_item(self, valeur): if not isinstance(valeur, self.aClass): @@ -1549,10 +1550,10 @@ class VerifTypeTuple(Valid, ListVal): self.cata_info = "" def info(self): - return _(u": vérifie les types dans un tuple") + return _(tr(u": vérifie les types dans un tuple")) def info_erreur_liste(self): - return _(u"Les types entrés ne sont pas permis") + return _(tr(u"Les types entrés ne sont pas permis")) def default(self, valeur): # if valeur in self.liste : raise ValError("%s est un doublon" % @@ -1565,12 +1566,12 @@ class VerifTypeTuple(Valid, ListVal): def convert_item(self, valeur): if len(valeur) != len(self.typeDesTuples): raise ValError( - ufmt(_(u"%s devrait etre de type %s "), valeur, self.typeDesTuples)) + ufmt(_(tr(u"%s devrait etre de type %s ")), valeur, self.typeDesTuples)) for i in range(len(valeur)): ok = self.verifType(valeur[i], self.typeDesTuples[i]) if ok != 1: raise ValError( - ufmt(_(u"%s devrait etre de type %s "), valeur, self.typeDesTuples)) + ufmt(_(tr(u"%s devrait etre de type %s ")), valeur, self.typeDesTuples)) return valeur def verif_item(self, valeur): @@ -1663,7 +1664,7 @@ class VerifExiste(ListVal): if valeur in self.listeDesFreres: return valeur raise ValError( - ufmt(_(u"%s n'est pas dans %s"), valeur, self.listeDesFreres)) + ufmt(_(tr(u"%s n'est pas dans %s")), valeur, self.listeDesFreres)) class RegExpVal(ListVal):