Salome HOME
Improvement of algorithm and multifonction use
[modules/adao.git] / src / daSalome / adaoBuilder.py
index e2ad3c763ead5382f78ec4c07e62fb1ee6e3f4a5..70d87ad0faf2f6b4f99077f3923c973f17e27f92 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2008-2018 EDF R&D
+# Copyright (C) 2008-2021 EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 
 """
     Normalized interface for ADAO scripting (full version API)
+
+    The main interface to use is an object "New" build from "adaoBuilder".
+
+    Usage by an example:
+
+        from numpy import array, matrix
+        from adao import adaoBuilder
+        case = adaoBuilder.New()
+        case.set( 'AlgorithmParameters', Algorithm='3DVAR' )
+        case.set( 'Background',          Vector=[0, 1, 2] )
+        case.set( 'BackgroundError',     ScalarSparseMatrix=1.0 )
+        case.set( 'Observation',         Vector=array([0.5, 1.5, 2.5]) )
+        case.set( 'ObservationError',    DiagonalSparseMatrix='1 1 1' )
+        case.set( 'ObservationOperator', Matrix='1 0 0;0 2 0;0 0 3' )
+        case.execute()
+        #
+        print(case.get("Analysis")[-1])
+
+    Documentation
+
+        See associated up-to-date documentation for details of commands.
 """
 __author__ = "Jean-Philippe ARGAUD"
 __all__ = ["New"]
 
 from daCore.Aidsm import Aidsm as _Aidsm
+from daCore.version import name, version, year, date
 
 # ==============================================================================
 class New(_Aidsm):
@@ -36,6 +58,14 @@ class New(_Aidsm):
     def __init__(self, name = ""):
         _Aidsm.__init__(self, name)
 
+class Gui(object):
+    """
+    Generic ADAO GUI builder
+    """
+    def __init__(self):
+        from daCore.Interfaces import EficasGUI
+        EficasGUI().gui()
+
 # ==============================================================================
 if __name__ == "__main__":
     print('\n AUTODIAGNOSTIC \n')