From fc2c2eab79c779e2c2fb8b0c33de22f7eb528679 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Ribes?= Date: Thu, 8 Jul 2010 17:01:32 +0200 Subject: [PATCH] Ajout noeud init --- bin/AdaoCalatogGenerator.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/bin/AdaoCalatogGenerator.py b/bin/AdaoCalatogGenerator.py index 6524ad4..c9df254 100644 --- a/bin/AdaoCalatogGenerator.py +++ b/bin/AdaoCalatogGenerator.py @@ -76,11 +76,25 @@ FunctionDict_data_bloc = """ data_method = """ def F_${data_name}(statut) : return FACT(statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=(${data_into})), + FILE = SIMP(statut = "o", typ = "TXM", into=(${data_into})), ${data_bloc} ) """ +init_method = """ +def F_InitChoice() : return ("Background", + "BackgroundError", + "Observation", + "ObservationError", + "ObservationOperator", + "AlgorithmParameters", + "Analysis", + ) +def F_Init(statut) : return FACT(statut = statut, + FILE = SIMP(statut = "o", typ = "Fichier"), + TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice()), + ) +""" assim_data_method = """ def F_${assim_name}(statut) : return FACT(statut=statut, regles = ( UN_PARMI (${choices})), @@ -106,6 +120,7 @@ assim_algo = """ ObservationError = F_ObservationError("o"), ObservationOperator = F_ObservationOperator("o"), AlgorithmParameters = F_AlgorithmParameters("f"), + Init = F_Init("f"), ${decl_opts} ), """ @@ -226,6 +241,9 @@ for opt_name in infos.OptDict.keys(): opt_names.append(opt_name) +# Step 5: Add init node +mem_file.write(init_method) + # Final step: Add algorithm and assim_study algos = "" decl_algos = "" -- 2.39.2