maser-data 0.4.2__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. {maser_data-0.4.2 → maser_data-0.5.2}/PKG-INFO +61 -22
  2. {maser_data-0.4.2 → maser_data-0.5.2}/README.md +52 -13
  3. {maser_data-0.4.2 → maser_data-0.5.2}/pyproject.toml +11 -9
  4. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/__init__.py +17 -1
  5. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/__init__.py +12 -1
  6. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/base.py +76 -23
  7. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/dataset_filename_regex.json +5 -0
  8. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/mixins.py +12 -1
  9. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/records.py +9 -1
  10. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/sweeps.py +8 -0
  11. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/__init__.py +41 -0
  12. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/ccsds.py +2 -0
  13. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/const.py +2 -0
  14. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/interball/__init__.py +3 -0
  15. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/interball/data.py +4 -2
  16. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/stereo/__init__.py +5 -0
  17. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/stereo/data.py +10 -6
  18. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/stereo/sweeps.py +0 -4
  19. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/viking/__init__.py +5 -0
  20. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/viking/data.py +6 -1
  21. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/viking/records.py +0 -7
  22. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/wind/__init__.py +5 -0
  23. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/wind/data.py +22 -20
  24. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/wind/sweeps.py +0 -1
  25. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/ecallisto/data.py +1 -1
  26. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/nancay/__init__.py +3 -0
  27. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/nancay/nda/data.py +15 -12
  28. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/nancay/nenufar/data.py +5 -3
  29. maser_data-0.5.2/src/maser/data/padc/__init__.py +119 -0
  30. maser_data-0.5.2/src/maser/data/padc/bepi/__init__.py +10 -0
  31. maser_data-0.5.2/src/maser/data/padc/bepi/sorbet/__init__.py +10 -0
  32. maser_data-0.5.2/src/maser/data/padc/bepi/sorbet/data.py +276 -0
  33. maser_data-0.5.2/src/maser/data/padc/cassini/__init__.py +14 -0
  34. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/cassini/data.py +359 -75
  35. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/cassini/kronos.py +1 -2
  36. maser_data-0.5.2/src/maser/data/padc/cassini/kronos_level_format.json +344 -0
  37. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/expres/__init__.py +3 -2
  38. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/expres/data.py +8 -7
  39. maser_data-0.5.2/src/maser/data/padc/juice/__init__.py +19 -0
  40. maser_data-0.5.2/src/maser/data/padc/juice/rpwi/__init__.py +19 -0
  41. maser_data-0.5.2/src/maser/data/padc/juice/rpwi/data.py +346 -0
  42. maser_data-0.5.2/src/maser/data/padc/juice/rpwi/sweeps.py +26 -0
  43. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/juno/__init__.py +5 -0
  44. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/juno/data.py +6 -1
  45. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/__init__.py +5 -0
  46. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/rpw/__init__.py +5 -0
  47. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/rpw/data.py +7 -4
  48. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/rpw/hfr.py +10 -9
  49. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/rpw/lfr.py +8 -6
  50. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/rpw/tnr.py +8 -5
  51. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/stereo/__init__.py +5 -0
  52. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/stereo/data.py +15 -11
  53. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/wind/__init__.py +5 -0
  54. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/wind/data.py +8 -9
  55. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/__init__.py +29 -0
  56. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/co/__init__.py +5 -0
  57. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/co/data.py +7 -2
  58. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/data.py +7 -2
  59. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/utils.py +4 -13
  60. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/vg/__init__.py +5 -0
  61. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/vg/data.py +23 -18
  62. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/vg/sweeps.py +1 -1
  63. maser_data-0.5.2/src/maser/data/psa/__init__.py +34 -0
  64. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/psa/mex/__init__.py +5 -0
  65. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/psa/mex/data.py +12 -7
  66. maser_data-0.5.2/src/maser/data/radiojove/__init__.py +0 -0
  67. maser_data-0.5.2/src/maser/data/radiojove/data.py +649 -0
  68. maser_data-0.4.2/maser/__init__.py +0 -2
  69. maser_data-0.4.2/maser/data/padc/__init__.py +0 -39
  70. maser_data-0.4.2/maser/data/padc/bepi/__init__.py +0 -3
  71. maser_data-0.4.2/maser/data/padc/bepi/sorbet/__init__.py +0 -9
  72. maser_data-0.4.2/maser/data/padc/bepi/sorbet/data.py +0 -79
  73. maser_data-0.4.2/maser/data/padc/cassini/__init__.py +0 -5
  74. maser_data-0.4.2/maser/data/padc/cassini/kronos_level_format.json +0 -247
  75. maser_data-0.4.2/maser/data/psa/__init__.py +0 -11
  76. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/cdf_fill.py +0 -0
  77. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/base/class_factory.py +0 -0
  78. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/interball/records.py +0 -0
  79. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/interball/sweeps.py +0 -0
  80. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/utils.py +0 -0
  81. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/viking/const.py +0 -0
  82. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/cdpp/wind/records.py +0 -0
  83. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/ecallisto/__init__.py +0 -0
  84. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/nancay/nda/__init__.py +0 -0
  85. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/nancay/nda/sweeps.py +0 -0
  86. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/nancay/nenufar/__init__.py +0 -0
  87. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/expres/sweeps.py +0 -0
  88. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/solo/rpw/tnr_filter.py +0 -0
  89. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/wind/sweeps.py +0 -0
  90. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/padc/wind/utils.py +0 -0
  91. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/pds/labels/__init__.py +0 -0
  92. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/psa/labels/MEX-M-MARSIS-3-RDR-AIS-V1.0/AIS_FORMAT.FMT +0 -0
  93. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/psa/labels/__init__.py +0 -0
  94. {maser_data-0.4.2 → maser_data-0.5.2/src}/maser/data/psa/mex/consts.py +0 -0
@@ -1,35 +1,38 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: maser-data
3
- Version: 0.4.2
3
+ Version: 0.5.2
4
4
  Summary: Maser4py submodule to handle radio data
5
- License: CeCILL
5
+ License: CECILL-B
6
6
  Author: Baptiste Cecconi
7
7
  Author-email: baptiste.cecconi@obspm.fr
8
- Requires-Python: >=3.8,<4
9
- Classifier: License :: Other/Proprietary License
8
+ Requires-Python: >=3.9,<4
9
+ Classifier: License :: CeCILL-B Free Software License Agreement (CECILL-B)
10
10
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.8
12
11
  Classifier: Programming Language :: Python :: 3.9
13
12
  Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
16
17
  Provides-Extra: all
17
18
  Provides-Extra: jupyter
18
- Provides-Extra: spacepy
19
19
  Requires-Dist: astropy (>=5.0.4,<6.0.0)
20
20
  Requires-Dist: jupyter (>=1.0.0,<2.0.0) ; extra == "jupyter" or extra == "all"
21
21
  Requires-Dist: jupytext (>=1.13.8,<2.0.0) ; extra == "jupyter" or extra == "all"
22
- Requires-Dist: numpy (>=1.23.0,<2.0.0)
23
- Requires-Dist: spacepy (>=0.5,<1.0) ; extra == "spacepy" or extra == "all"
22
+ Requires-Dist: numpy (>=1.26,<2)
23
+ Requires-Dist: spacepy (>=0.5,<1.0)
24
24
  Requires-Dist: xarray (>=2022.3.0,<2023.0.0)
25
25
  Description-Content-Type: text/markdown
26
26
 
27
27
  # About maser-data
28
28
 
29
- maser-data is a submodule of [maser4py](https://pypi.org/project/maser4py/).
29
+ This is maser-data, a submodule of [maser4py](https://pypi.org/project/maser4py/). maser4py offers modules to handle data from several space and ground radio observatory and maser-data is the submodule dedicated to handling radio data parsing.
30
30
 
31
- It offers programs to handle radio data from the following instruments:
31
+ maser4py is developed in the framework of the [MASER project](https://maser-lira.obspm.fr/?lang=en).
32
32
 
33
+ maser-data offers programs to handle radio data from the following instruments:
34
+
35
+ - BepiColombo/MMO/PWI/SORBET
33
36
  - Cassini/RPWS/HFR
34
37
  - E-Callisto
35
38
  - Interball-Auroral/POLRAD
@@ -38,25 +41,34 @@ It offers programs to handle radio data from the following instruments:
38
41
  - Nançay Decameter Array (Jupiter only)
39
42
  - Nançay NenuFAR/BST
40
43
  - Solar Orbiter/RPW
44
+ - STEREO/Waves
41
45
  - Viking
42
46
  - Voyager/PRA
43
47
  - Wind/Waves
44
48
 
45
- Read maser4py [main documentation](https://maser.pages.obspm.fr/maser4py/) for details.
49
+ Detailed information can be found in [maser-data user guide](https://maser.pages.obspm.fr/maser4py/sections/user_guide.html#read-radio-data-with-maser-data).
50
+
51
+ You can also have a look to [maser-data examples and notebooks](https://maser.pages.obspm.fr/maser4py/sections/tutorial.html#maser-data).
52
+
53
+ For a broader documentation, please check maser4py [main documentation](https://maser.pages.obspm.fr/maser4py/) for details.
46
54
 
47
55
  # Installation
48
56
 
57
+ ## As a standalone submodule (recommanded)
58
+
49
59
  To install the package, run the following command:
50
60
 
51
61
  ```
52
62
  pip install maser-data
53
63
  ```
54
64
 
55
- or use one of the extra options:
65
+ maser-data (through [spacepy](https://pypi.org/project/spacepy/) ), requires the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html) that needs to be installed on its own (see below).
66
+
67
+ It is also possible to use the extra option `jupyter` when installing maser-data:
56
68
 
57
69
  - `jupyter` for Jupyter notebook support
58
- - `spacepy` for CDF data format support (note that this requires the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html))
59
- - `all` to install all the above
70
+
71
+ - (`all` is equivalent to the line above)
60
72
 
61
73
  For example use `maser-data[jupyter,spacepy]` if you want to use `maser-data` with spacepy and jupyter notebooks:
62
74
 
@@ -64,6 +76,37 @@ For example use `maser-data[jupyter,spacepy]` if you want to use `maser-data` wi
64
76
  pip install maser-data[jupyter,spacepy]
65
77
  ```
66
78
 
79
+ ## With maser4py
80
+
81
+ An alternative way of installing the package is to run the following command:
82
+
83
+ ```
84
+ pip install maser4py[data]
85
+ ```
86
+
87
+ and use the extra options:
88
+
89
+ - `jupyter` for Jupyter notebook support
90
+
91
+ For example use `maser4py[data,jupyter]` if you want to use `maser-data` with jupyter notebooks:
92
+
93
+ ```bash
94
+ pip install maser4py[data,jupyter]
95
+ ```
96
+
97
+ You can also use other options from [maser4py](https://pypi.org/project/maser4py/) such as:
98
+
99
+ - `tools` for [maser-tools](https://pypi.org/project/maser-tools/) submodule
100
+ - `all` to install all the above
101
+
102
+ ```bash
103
+ pip install maser4py[all]
104
+ ```
105
+
106
+ ## CDF file format
107
+
108
+ To use `maser-data` to read CDF files you have to install the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html) and the [spacepy.pycdf](https://spacepy.github.io/install.html) package.
109
+
67
110
  # Usage
68
111
 
69
112
  The `Data` class is a wrapper around several classes that allow you to read data from many different formats, including CDF, Fits, and some custom binary formats. By default, the class will try to automagically detect the format of the file and use the appropriate class to read the data.
@@ -85,24 +128,20 @@ To contribute to the development of the package, you will need to install a loca
85
128
  git clone https://gitlab.obspm.fr/maser/maser4py.git
86
129
  ```
87
130
 
88
- Then, you can install the package locally
131
+ Then, you can install the package locally, by using `pip install -e .[all]` or by using `poetry` (see below).
89
132
 
90
133
  ## Requirements
91
134
 
92
135
  `maser-data` requirements are detailed in the `src/maser_data/pyproject.toml` file
93
136
 
94
- ### poetry
137
+ ## poetry
95
138
 
96
- To install the package, it is recommended to use [poetry](https://python-poetry.org/docs/#installing-with-pip):
139
+ To install the package as a developer, it is recommended to use [poetry](https://python-poetry.org/docs/#installing-with-pip):
97
140
 
98
141
  ```
99
142
  pip install poetry
100
143
  ```
101
144
 
102
- ### CDF file format
103
-
104
- To use `maser-data` to read CDF files you have to install the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html) and the [spacepy.pycdf](https://spacepy.github.io/install.html) package.
105
-
106
145
  ## Installing a local copy of maser-data
107
146
 
108
147
  Use the following command from `src/maser_data` folder to install the package:
@@ -1,9 +1,12 @@
1
1
  # About maser-data
2
2
 
3
- maser-data is a submodule of [maser4py](https://pypi.org/project/maser4py/).
3
+ This is maser-data, a submodule of [maser4py](https://pypi.org/project/maser4py/). maser4py offers modules to handle data from several space and ground radio observatory and maser-data is the submodule dedicated to handling radio data parsing.
4
4
 
5
- It offers programs to handle radio data from the following instruments:
5
+ maser4py is developed in the framework of the [MASER project](https://maser-lira.obspm.fr/?lang=en).
6
6
 
7
+ maser-data offers programs to handle radio data from the following instruments:
8
+
9
+ - BepiColombo/MMO/PWI/SORBET
7
10
  - Cassini/RPWS/HFR
8
11
  - E-Callisto
9
12
  - Interball-Auroral/POLRAD
@@ -12,25 +15,34 @@ It offers programs to handle radio data from the following instruments:
12
15
  - Nançay Decameter Array (Jupiter only)
13
16
  - Nançay NenuFAR/BST
14
17
  - Solar Orbiter/RPW
18
+ - STEREO/Waves
15
19
  - Viking
16
20
  - Voyager/PRA
17
21
  - Wind/Waves
18
22
 
19
- Read maser4py [main documentation](https://maser.pages.obspm.fr/maser4py/) for details.
23
+ Detailed information can be found in [maser-data user guide](https://maser.pages.obspm.fr/maser4py/sections/user_guide.html#read-radio-data-with-maser-data).
24
+
25
+ You can also have a look to [maser-data examples and notebooks](https://maser.pages.obspm.fr/maser4py/sections/tutorial.html#maser-data).
26
+
27
+ For a broader documentation, please check maser4py [main documentation](https://maser.pages.obspm.fr/maser4py/) for details.
20
28
 
21
29
  # Installation
22
30
 
31
+ ## As a standalone submodule (recommanded)
32
+
23
33
  To install the package, run the following command:
24
34
 
25
35
  ```
26
36
  pip install maser-data
27
37
  ```
28
38
 
29
- or use one of the extra options:
39
+ maser-data (through [spacepy](https://pypi.org/project/spacepy/) ), requires the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html) that needs to be installed on its own (see below).
40
+
41
+ It is also possible to use the extra option `jupyter` when installing maser-data:
30
42
 
31
43
  - `jupyter` for Jupyter notebook support
32
- - `spacepy` for CDF data format support (note that this requires the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html))
33
- - `all` to install all the above
44
+
45
+ - (`all` is equivalent to the line above)
34
46
 
35
47
  For example use `maser-data[jupyter,spacepy]` if you want to use `maser-data` with spacepy and jupyter notebooks:
36
48
 
@@ -38,6 +50,37 @@ For example use `maser-data[jupyter,spacepy]` if you want to use `maser-data` wi
38
50
  pip install maser-data[jupyter,spacepy]
39
51
  ```
40
52
 
53
+ ## With maser4py
54
+
55
+ An alternative way of installing the package is to run the following command:
56
+
57
+ ```
58
+ pip install maser4py[data]
59
+ ```
60
+
61
+ and use the extra options:
62
+
63
+ - `jupyter` for Jupyter notebook support
64
+
65
+ For example use `maser4py[data,jupyter]` if you want to use `maser-data` with jupyter notebooks:
66
+
67
+ ```bash
68
+ pip install maser4py[data,jupyter]
69
+ ```
70
+
71
+ You can also use other options from [maser4py](https://pypi.org/project/maser4py/) such as:
72
+
73
+ - `tools` for [maser-tools](https://pypi.org/project/maser-tools/) submodule
74
+ - `all` to install all the above
75
+
76
+ ```bash
77
+ pip install maser4py[all]
78
+ ```
79
+
80
+ ## CDF file format
81
+
82
+ To use `maser-data` to read CDF files you have to install the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html) and the [spacepy.pycdf](https://spacepy.github.io/install.html) package.
83
+
41
84
  # Usage
42
85
 
43
86
  The `Data` class is a wrapper around several classes that allow you to read data from many different formats, including CDF, Fits, and some custom binary formats. By default, the class will try to automagically detect the format of the file and use the appropriate class to read the data.
@@ -59,24 +102,20 @@ To contribute to the development of the package, you will need to install a loca
59
102
  git clone https://gitlab.obspm.fr/maser/maser4py.git
60
103
  ```
61
104
 
62
- Then, you can install the package locally
105
+ Then, you can install the package locally, by using `pip install -e .[all]` or by using `poetry` (see below).
63
106
 
64
107
  ## Requirements
65
108
 
66
109
  `maser-data` requirements are detailed in the `src/maser_data/pyproject.toml` file
67
110
 
68
- ### poetry
111
+ ## poetry
69
112
 
70
- To install the package, it is recommended to use [poetry](https://python-poetry.org/docs/#installing-with-pip):
113
+ To install the package as a developer, it is recommended to use [poetry](https://python-poetry.org/docs/#installing-with-pip):
71
114
 
72
115
  ```
73
116
  pip install poetry
74
117
  ```
75
118
 
76
- ### CDF file format
77
-
78
- To use `maser-data` to read CDF files you have to install the [CDF library](https://cdf.gsfc.nasa.gov/html/sw_and_docs.html) and the [spacepy.pycdf](https://spacepy.github.io/install.html) package.
79
-
80
119
  ## Installing a local copy of maser-data
81
120
 
82
121
  Use the following command from `src/maser_data` folder to install the package:
@@ -1,20 +1,20 @@
1
1
  [tool.poetry]
2
2
  name = "maser-data"
3
- version = "0.4.2"
3
+ version = "0.5.2"
4
4
  description = "Maser4py submodule to handle radio data"
5
5
  readme = "README.md"
6
- authors = ["Baptiste Cecconi <baptiste.cecconi@obspm.fr>", "Sonny Lion <sonny.lion@obspm.fr>", "Xavier Bonnin <xavier.bonnin@obspm.fr>"]
7
- license = "CeCILL"
6
+ authors = ["Baptiste Cecconi <baptiste.cecconi@obspm.fr>", "Lucas Grosset <lucas.grosset@obspm.fr>", "Sonny Lion <sonny.lion@obspm.fr>", "Xavier Bonnin <xavier.bonnin@obspm.fr>"]
7
+ license = "CeCILL-B"
8
8
 
9
9
  # handle namespace with poetry
10
10
  packages = [
11
- { include = "maser" }
11
+ { include = "maser", from = "src" }
12
12
  ]
13
13
 
14
14
  [tool.poetry.dependencies]
15
- python = ">=3.8,<4"
16
- spacepy = {version = ">=0.5,<1.0", optional = true}
17
- numpy = "^1.23.0"
15
+ python = ">=3.9,<4"
16
+ spacepy = ">=0.5,<1.0"
17
+ numpy = ">=1.26,<2"
18
18
  astropy = "^5.0.4"
19
19
  xarray = "^2022.3.0"
20
20
  jupyter = {version = "^1.0.0", optional = true}
@@ -22,9 +22,11 @@ jupytext = {version = "^1.13.8", optional = true}
22
22
 
23
23
  [tool.poetry.extras]
24
24
  jupyter = ["jupyter", "jupytext"]
25
- spacepy = ["spacepy"]
26
- all = ["jupyter", "jupytext", "spacepy"]
25
+ # spacepy = ["spacepy"]
26
+ all = ["jupyter", "jupytext"]
27
27
 
28
28
  [build-system]
29
29
  requires = ["poetry>=1.1.4", "setuptools"]
30
30
  build-backend = "poetry.core.masonry.api"
31
+ # requires = ["setuptools", "setuptools-scm"]
32
+ # build-backend = "setuptools.build_meta"
@@ -31,18 +31,34 @@ from .padc import ( # noqa: F401
31
31
  JnoWavLesiaL3aV02Data,
32
32
  CoRpwsHfrKronosN1Data,
33
33
  CoRpwsHfrKronosN2Data,
34
+ CoRpwsHfrKronosN3dData,
35
+ CoRpwsHfrKronosN3eData,
36
+ CoRpwsHfrKronosN3gData,
37
+ CoRpwsHfrKronosBgData,
34
38
  StaWavLfrL3DfCdf,
35
39
  StbWavLfrL3DfCdf,
36
40
  StaWavHfrL3DfCdf,
37
41
  StbWavHfrL3DfCdf,
38
42
  WindWavesRad1L3DfV01Data,
39
43
  WindWavesRad1L3DfV02Data,
40
- SorbetCdfData,
44
+ SorbetL1CdfDbsc,
45
+ SorbetL1CdfTnr,
41
46
  RpwLfrSurvBp1,
42
47
  RpwHfrSurv,
43
48
  RpwTnrSurv,
44
49
  RpwTnrL3Cdf,
45
50
  RpwHfrL3Cdf,
51
+ JuiceRPWIhfL1aCdfSID2,
52
+ JuiceRPWIhfL1aCdfSID3,
53
+ JuiceRPWIhfL1aCdfSID4,
54
+ JuiceRPWIhfL1aCdfSID20,
55
+ JuiceRPWIhfL1aCdfSID5,
56
+ JuiceRPWIhfL1aCdfSID21,
57
+ JuiceRPWIhfL1aCdfSID6,
58
+ JuiceRPWIhfL1aCdfSID22,
59
+ JuiceRPWIhfL1aCdfSID7,
60
+ JuiceRPWIhfL1aCdfSID23,
61
+ JuiceRPWIhfL1bCdf,
46
62
  )
47
63
 
48
64
  from .pds import ( # noqa: F401
@@ -7,6 +7,8 @@ Base Classes for MASER-Data
7
7
  Data object classes
8
8
  -------------------
9
9
 
10
+ Defined in base.
11
+
10
12
  * `Data` Class: The `Data` class is the base class to be used to load data with the MASER-Data module.
11
13
  * `BinData` Class: Generic class for custom binary formatted data products.
12
14
  * `CdfData` Class: Generic class for CDF formatted data products.
@@ -15,11 +17,20 @@ Data object classes
15
17
  Iterator classes
16
18
  ----------------
17
19
 
20
+ Defined in sweeps and records.
21
+
18
22
  * `Sweeps` Class: Generic iterator class for sweep-based access.
19
23
  * `Records` Class: Generic iterator class for record-based access.
20
24
 
21
- """
25
+ Spectral classes
26
+ ----------------
27
+
28
+ Defined in mixins.
22
29
 
30
+ * `RecordsOnly` Class: Generic class for time series datasets.
31
+ * `FixedFrequencies` Class: Generic class for datasets with fixed spectral sampling.
32
+ * `VariableFrequencies` Class: Generic class for datasets with variable spectral sampling.
33
+ """
23
34
 
24
35
  from .base import ( # noqa: F401
25
36
  Data,
@@ -1,4 +1,17 @@
1
1
  # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module to define data object classes.
5
+
6
+ Data object classes
7
+ -------------------
8
+
9
+ * `Data` Class: The `Data` class is the base class to be used to load data with the MASER-Data module.
10
+ * `BinData` Class: Generic class for custom binary formatted data products.
11
+ * `CdfData` Class: Generic class for CDF formatted data products.
12
+ * `FitsData` Class: Generic class for FITS formatted data products.
13
+ """
14
+
2
15
  from typing import Union, Dict, Type, cast
3
16
 
4
17
  from pathlib import Path
@@ -6,6 +19,7 @@ import re
6
19
  import math
7
20
  from astropy.io import fits
8
21
  import numpy
22
+ import warnings
9
23
  from .sweeps import Sweeps
10
24
  from .records import Records
11
25
 
@@ -44,7 +58,6 @@ class BaseData:
44
58
  load_data: bool = True,
45
59
  fixed_frequencies: bool = True,
46
60
  ) -> None:
47
-
48
61
  # store the filepath as a Path object
49
62
  self.filepath = Path(filepath)
50
63
 
@@ -151,17 +164,17 @@ class Data(BaseData, dataset="default"):
151
164
  @property
152
165
  def dataset_keys(self) -> list:
153
166
  """Generic method to get the keys for this dataset's quicklook."""
154
- pass
167
+ return []
155
168
 
156
169
  @property
157
170
  def times(self) -> Time:
158
171
  """Generic method to get the time axis."""
159
- pass
172
+ return Time([], format="jd")
160
173
 
161
174
  @property
162
175
  def delta_times(self) -> TimeDelta:
163
176
  """Generic method to get the difference to referential time."""
164
- pass
177
+ return TimeDelta([], format="jd")
165
178
 
166
179
  @property
167
180
  def frequencies(self) -> Union[Quantity, Dict]:
@@ -174,11 +187,11 @@ class Data(BaseData, dataset="default"):
174
187
 
175
188
  def as_array(self) -> numpy.ndarray:
176
189
  """Generic method to get the data as a numpy.array."""
177
- pass
190
+ return numpy.ndarray([])
178
191
 
179
192
  def as_xarray(self) -> xarray.Dataset:
180
193
  """Generic method to get the data as a xarray.Dataset object (an efficient "dict", filled with xarray.DataArray)"""
181
- pass
194
+ return xarray.Dataset()
182
195
 
183
196
  def __enter__(self):
184
197
  if self.access_mode == "file":
@@ -493,7 +506,7 @@ class Data(BaseData, dataset="default"):
493
506
  for arg in kwargs.keys():
494
507
  if kwargs[arg] is not None:
495
508
  if arg == "iter_on_selection":
496
- if not type(kwargs["iter_on_selection"]) == dict:
509
+ if not isinstance(kwargs["iter_on_selection"], dict):
497
510
  raise KeyError("iter_on_selection must be a dictionnary.")
498
511
  elif "nan_color" in kwargs:
499
512
  warnings.warn(
@@ -510,8 +523,8 @@ class Data(BaseData, dataset="default"):
510
523
  if not matplotlib.colors.is_color_like(kwargs["nan_color"]):
511
524
  raise KeyError("nan_color must be a matplotlib color.")
512
525
  elif arg == "file_png" in kwargs:
513
- if (
514
- type(kwargs["file_png"]) != str
526
+ if not (
527
+ isinstance(kwargs["file_png"], str)
515
528
  ): # if file_png was given as a str
516
529
  if kwargs["file_png"] != Path(
517
530
  kwargs["file_png"]
@@ -520,7 +533,7 @@ class Data(BaseData, dataset="default"):
520
533
  "file_png must be a Path (str or Path object)."
521
534
  )
522
535
  elif arg == "landscape":
523
- if type(kwargs[arg]) != bool:
536
+ if not isinstance(kwargs[arg], bool):
524
537
  raise KeyError("landscape must be a bool.")
525
538
  else: # all the args that should have same dimension as keys
526
539
  if arg in arg_list_list: # Prevent checking matplotlib kwargs
@@ -537,6 +550,9 @@ class Data(BaseData, dataset="default"):
537
550
  class CdfData(Data, dataset="cdf"):
538
551
  """Base class for CDF formatted data. Requires `spacepy`."""
539
552
 
553
+ def __init_subclass__(cls, *args, dataset: str, **kwargs) -> None:
554
+ return super().__init_subclass__(*args, dataset=dataset, **kwargs)
555
+
540
556
  @classmethod
541
557
  def open(cls, filepath: Path, *args, **kwargs):
542
558
  """Open method for CDF formatted data products"""
@@ -550,18 +566,50 @@ class CdfData(Data, dataset="cdf"):
550
566
  with cls.open(filepath) as c:
551
567
  dataset = c.attrs["Logical_source"][...][0]
552
568
 
553
- # required dataset mapping
554
- if dataset == "srn_nda_routine_jup_edr":
555
- dataset = "orn_nda_routine_jup_edr"
556
- if dataset == "srn_nda_routine_sun_edr":
557
- dataset = "orn_nda_routine_sun_edr"
558
- if dataset == "wi_wav_rad1_l3_df":
559
- dataset = f"{dataset}_v{c.attrs['Skeleton_version']}"
560
- if dataset == "solo_l3_rpw-hfr":
561
- if "tnr" in str(filepath):
562
- dataset = "solo_L3_rpw-tnr-flux_"
563
- else:
564
- dataset = "solo_L3_rpw-hfr-flux_"
569
+ # REQUIRED DATASET MAPPING AND WARNINGS
570
+ dataset_requiring_modification = [
571
+ "srn_nda_routine_jup_edr",
572
+ "srn_nda_routine_sun_edr",
573
+ "JUICE_H0_RPWI",
574
+ "wi_wav_rad1_l3_df",
575
+ "solo_l3_rpw-hfr",
576
+ ]
577
+ if dataset in dataset_requiring_modification:
578
+ # name change
579
+ if dataset == "srn_nda_routine_jup_edr":
580
+ dataset = "orn_nda_routine_jup_edr"
581
+ elif dataset == "srn_nda_routine_sun_edr":
582
+ dataset = "orn_nda_routine_sun_edr"
583
+
584
+ # complex dataset id
585
+ if dataset == "wi_wav_rad1_l3_df":
586
+ dataset = f"{dataset}_v{c.attrs['Skeleton_version']}"
587
+
588
+ # temporary fixes
589
+ if dataset == "JUICE_H0_RPWI":
590
+ dataset = (
591
+ "JUICE_L1a_RPWI-HF-SID"
592
+ + c.attrs["Logical_source_description"][...][0][40:]
593
+ )
594
+ if (
595
+ "SID6" in dataset
596
+ or "SID7" in dataset
597
+ or "SID22" in dataset
598
+ or "SID23" in dataset
599
+ ):
600
+ warnings.warn("Dataset not fully supported yet")
601
+ elif dataset == "solo_l3_rpw-hfr":
602
+ if "tnr" in str(filepath):
603
+ dataset = "solo_L3_rpw-tnr-surv-flux"
604
+ else:
605
+ dataset = "solo_L3_rpw-hfr-surv-flux"
606
+
607
+ # warnings
608
+ if dataset == "wi_wav_rad1_l3_df_v01":
609
+ warnings.warn(
610
+ "Rad1 v01 dataset is deprecated, consider using Rad1 v02.",
611
+ DeprecationWarning,
612
+ )
565
613
 
566
614
  return dataset
567
615
 
@@ -602,7 +650,6 @@ class CdfData(Data, dataset="cdf"):
602
650
  self._epncore = Data.epncore(self)
603
651
 
604
652
  for _k, _v in self.file.attrs.items():
605
-
606
653
  if _k.upper().startswith("VESPA"):
607
654
  k = _k.replace("VESPA_", "").lower()
608
655
 
@@ -645,6 +692,9 @@ class CdfData(Data, dataset="cdf"):
645
692
  class FitsData(Data, dataset="fits"):
646
693
  """Base class for FITS formatted data."""
647
694
 
695
+ def __init_subclass__(cls, *args, dataset: str, **kwargs) -> None:
696
+ return super().__init_subclass__(*args, dataset=dataset, **kwargs)
697
+
648
698
  @classmethod
649
699
  def open(cls, filepath: Path, *args, **kwargs):
650
700
  """Open method for FITS formatted data products"""
@@ -688,6 +738,9 @@ class FitsData(Data, dataset="fits"):
688
738
  class BinData(Data, dataset="bin"):
689
739
  """Base class for custom binary data."""
690
740
 
741
+ def __init_subclass__(cls, *args, dataset: str, **kwargs) -> None:
742
+ return super().__init_subclass__(*args, dataset=dataset, **kwargs)
743
+
691
744
  @classmethod
692
745
  def open(cls, filepath: Path, *args, mode: str = "rb", **kwargs):
693
746
  # ignore 'No overload variant of "open" ...'
@@ -12,10 +12,15 @@
12
12
  ["cdpp_wi_wa_tnr_l2_60s_v1", "^WIN_TNR_60S_\\d{8}.B3E$"],
13
13
  ["cdpp_viking_v4n_e5", "^V4N_\\d{4}_\\d{3}$"],
14
14
  ["cdpp_int_aur_polrad_rspn2", "^POLR_RSPN2_\\d{8}$"],
15
+ [
16
+ "co_rpws_hfr_kronos_bg",
17
+ "^bg_(?:20(?:0[0-9]|1[0-7])(?:_001_090|_091_180|_181_270|_271_366)|Earth|Ico_m14|Turn_on|Venus1|Venus2)$"
18
+ ],
15
19
  ["co_rpws_hfr_kronos_n1", "^R\\d{7}\\.\\d{2}$"],
16
20
  ["co_rpws_hfr_kronos_n2", "^P\\d{7}\\.\\d{2}$"],
17
21
  ["co_rpws_hfr_kronos_n3d", "^N3d_...\\d{7}\\.\\d{2}$"],
18
22
  ["co_rpws_hfr_kronos_n3e", "^N3e_...\\d{7}\\.\\d{2}$"],
23
+ ["co_rpws_hfr_kronos_n3g", "^F\\d{7}\\.\\d{2}$"],
19
24
  ["cdpp_sta_l2_wav_h_res_lfr", "^STA_WAV_LFR_\\d{8}\\.B3E$"],
20
25
  ["cdpp_stb_l2_wav_h_res_lfr", "^STB_WAV_LFR_\\d{8}\\.B3E$"],
21
26
  ["cdpp_sta_l2_wav_h_res_hfr", "^STA_WAV_HFR_\\d{8}\\.B3E$"],
@@ -1,5 +1,16 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ """
4
+ Module to define spectral classes.
5
+
6
+ Spectral classes
7
+ ----------------
8
+
9
+ * `RecordsOnly` Class: Generic class for time series datasets.
10
+ * `FixedFrequencies` Class: Generic class for datasets with fixed spectral sampling.
11
+ * `VariableFrequencies` Class: Generic class for datasets with variable spectral sampling.
12
+ """
13
+
3
14
  import numpy
4
15
  from typing import Union
5
16
 
@@ -62,7 +73,7 @@ class VariableFrequencies:
62
73
  def as_xarray(self):
63
74
  import xarray
64
75
 
65
- fields = self.fields
76
+ fields = self.dataset_keys
66
77
  units = self.units
67
78
 
68
79
  freq_arr = numpy.full((self._nsweep, self.max_sweep_length), numpy.nan)
@@ -1,4 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module to define generic iterator class for record-based access.
5
+ """
6
+
7
+ from typing import Union
8
+
9
+
2
10
  class Record:
3
11
  def __init__(self, header, data):
4
12
  self.header = header
@@ -23,7 +31,7 @@ class Records:
23
31
  for d in self.generator:
24
32
  yield d
25
33
 
26
- def __call__(self, load_data: bool = None, *args, **kwargs):
34
+ def __call__(self, load_data: Union[bool, None] = None, *args, **kwargs):
27
35
  return self.generator
28
36
 
29
37
  @property
@@ -1,5 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ Module to define generic iterator class for sweep-based access.
5
+ """
6
+
2
7
  from .records import Records, Record
8
+ import warnings
3
9
 
4
10
 
5
11
  class Sweep(Record):
@@ -13,6 +19,8 @@ class Sweep(Record):
13
19
 
14
20
 
15
21
  class Sweeps(Records):
22
+ warnings.warn("Sweep format will be changed.", FutureWarning)
23
+
16
24
  @property
17
25
  def generator(self):
18
26
  for sweep in self.data_reference._data: