Coverage for webgeodyn/models/__init__.py: 0%

2 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-12-18 09:33 +0000

1""" 

2This module implements `Models`_ and `Model`_ objects. 

3 

4Models 

5###### 

6 

7`Models`_ is a simple dictionary object, listing `Model`_ objects. 

8 

9.. code-block:: python 

10 

11 models = Models() 

12 models.loadModel("/path/to/data/", "my model", "dataFormat") 

13 # Model is now loaded and accessible using: 

14 models["my model"] 

15 

16Model 

17##### 

18 

19A `Model`_ object contains different `Measure`_ data (e.g. magnetic field, secular variation, streamfunctions ...) 

20 

21.. code-block:: python 

22 

23 model = Model("/path/to/data/", "dataFormat") 

24 # model.measures contains a dictionary of measures 

25 # Measures are either GHData or TSData 

26 # It is possible to access all their properties : 

27 # model.measures["MF"].lmax 

28 # model.measures["MF"].data 

29 # model.measures["MF"].computeRThetaPhiData(r, thlist, phlist) 

30 # ... 

31 

32 

33All measures share the same time array that is given in :code:`model.times`. 

34 

35 

36To have information on how to construct a Model from data files, please see the `InOut module documentation`_. 

37 

38 

39.. _InOut module documentation: https://geodynamo.gricad-pages.univ-grenoble-alpes.fr/webgeodyn/webgeodyn.inout.html 

40.. _Measure: https://geodynamo.gricad-pages.univ-grenoble-alpes.fr/webgeodyn/webgeodyn.data.html 

41.. _Model: https://geodynamo.gricad-pages.univ-grenoble-alpes.fr/webgeodyn/webgeodyn.models.model.html#webgeodyn.models.model.Model 

42.. _Models: https://geodynamo.gricad-pages.univ-grenoble-alpes.fr/webgeodyn/webgeodyn.models.models.html 

43 

44""" 

45 

46from .models import Models 

47from .model import Model