pymodaq_data 5.0.8__tar.gz → 5.0.10__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.
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/PKG-INFO +1 -2
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/_version.py +2 -2
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/data_saving.py +23 -5
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/numpy_func.py +22 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/.gitignore +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/LICENSE +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/README.rst +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/pyproject.toml +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/__init__.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/data.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/__init__.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/backends.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/browsing.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/exporter.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/exporters/__init__.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/exporters/base.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/exporters/flimj.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/exporters/hyperspy.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/saving.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/h5modules/utils.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/icon.ico +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/plotting/__init__.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/plotting/plotter/plotter.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/plotting/plotter/plotters/__init__.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/plotting/plotter/plotters/matplotlib_plotters.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/post_treatment/__init__.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/post_treatment/process_to_scalar.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/slicing.py +0 -0
- {pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/splash.png +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pymodaq_data
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.10
|
|
4
4
|
Summary: Modular Data Acquisition with Python
|
|
5
5
|
Project-URL: Homepage, http://pymodaq.cnrs.fr
|
|
6
6
|
Project-URL: Source, https://github.com/PyMoDAQ/PyMoDAQ
|
|
@@ -27,7 +27,6 @@ License: The MIT License (MIT)
|
|
|
27
27
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
28
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
29
29
|
THE SOFTWARE.
|
|
30
|
-
License-File: LICENSE
|
|
31
30
|
Classifier: Development Status :: 5 - Production/Stable
|
|
32
31
|
Classifier: Environment :: Other Environment
|
|
33
32
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -58,8 +58,12 @@ class DataManagement(metaclass=ABCMeta):
|
|
|
58
58
|
self.close_file()
|
|
59
59
|
|
|
60
60
|
def close_file(self):
|
|
61
|
+
self._h5saver.flush()
|
|
61
62
|
self._h5saver.close_file()
|
|
62
63
|
|
|
64
|
+
def close(self):
|
|
65
|
+
self.close_file()
|
|
66
|
+
|
|
63
67
|
def _get_next_node_name(self, where: Union[str, Node]) -> str:
|
|
64
68
|
"""Get the formatted next node name given the ones already saved
|
|
65
69
|
|
|
@@ -600,7 +604,7 @@ class DataEnlargeableSaver(DataSaverLoader):
|
|
|
600
604
|
self._axis_saver.add_axis(where, axis)
|
|
601
605
|
|
|
602
606
|
def add_data(self, where: Union[Node, str], data: DataWithAxes,
|
|
603
|
-
axis_values: Iterable[float] = None):
|
|
607
|
+
axis_values: Iterable[float] = None, **kwargs):
|
|
604
608
|
""" Append data to an enlargeable array node
|
|
605
609
|
|
|
606
610
|
Data of dim (0, 1 or 2) will be just appended to the enlargeable array.
|
|
@@ -624,17 +628,31 @@ class DataEnlargeableSaver(DataSaverLoader):
|
|
|
624
628
|
if self.get_last_node_name(where) is None:
|
|
625
629
|
if len(data.nav_indexes) == 0:
|
|
626
630
|
data_init = data
|
|
631
|
+
elif len(data.nav_indexes) == 1: # special case of DataND data
|
|
632
|
+
data_init = data.inav[0]
|
|
633
|
+
add_enl_axes = True
|
|
634
|
+
axis = data.get_axis_from_index(data.nav_indexes[0])[0]
|
|
635
|
+
axis_values = (axis.get_data(),)
|
|
636
|
+
self._enl_axis_names = (axis.label,)
|
|
637
|
+
self._enl_axis_units = (axis.units,)
|
|
627
638
|
else:
|
|
628
639
|
raise DataDimError('It is not possible to append DataND')
|
|
629
640
|
self._create_data_arrays(where, data_init, save_axes=True, add_enl_axes=add_enl_axes)
|
|
641
|
+
elif len(data.nav_indexes) == 1: # special case of DataND data
|
|
642
|
+
add_enl_axes = True
|
|
643
|
+
axis = data.get_axis_from_index(data.nav_indexes[0])[0]
|
|
644
|
+
axis_values = (axis.get_data(),)
|
|
630
645
|
|
|
631
646
|
for ind_data in range(len(data)):
|
|
632
647
|
array: EARRAY = self.get_node_from_index(where, ind_data)
|
|
633
648
|
array.append(data[ind_data])
|
|
634
|
-
if add_enl_axes
|
|
649
|
+
if add_enl_axes:
|
|
635
650
|
for ind_axis in range(self._n_enl_axes):
|
|
636
651
|
axis_array: EARRAY = self._axis_saver.get_node_from_index(where, ind_axis)
|
|
637
|
-
|
|
652
|
+
if not isinstance(axis_values[ind_axis], np.ndarray):
|
|
653
|
+
axis_array.append(np.array([axis_values[ind_axis]]))
|
|
654
|
+
else:
|
|
655
|
+
axis_array.append(axis_values[ind_axis], expand=False)
|
|
638
656
|
axis_array.attrs['size'] += 1
|
|
639
657
|
|
|
640
658
|
|
|
@@ -862,7 +880,7 @@ class DataToExportEnlargeableSaver(DataToExportSaver):
|
|
|
862
880
|
def add_data(self, where: Union[Node, str], data: DataToExport,
|
|
863
881
|
axis_values: List[Union[float, np.ndarray]] = None,
|
|
864
882
|
axis_value: Union[float, np.ndarray] = None,
|
|
865
|
-
settings_as_xml='', metadata=None,
|
|
883
|
+
settings_as_xml='', metadata=None, **kwargs
|
|
866
884
|
):
|
|
867
885
|
"""
|
|
868
886
|
|
|
@@ -885,7 +903,7 @@ class DataToExportEnlargeableSaver(DataToExportSaver):
|
|
|
885
903
|
if axis_values is None and axis_value is not None:
|
|
886
904
|
axis_values = [axis_value]
|
|
887
905
|
|
|
888
|
-
super().add_data(where, data, settings_as_xml, metadata)
|
|
906
|
+
super().add_data(where, data, settings_as_xml, metadata, **kwargs)
|
|
889
907
|
# a parent navigation group (same for all data nodes)
|
|
890
908
|
|
|
891
909
|
where = self._get_node(where)
|
|
@@ -170,3 +170,25 @@ def _allclose(dwa_a: 'DataWithAxes', dwa_b: 'DataWithAxes', *args,
|
|
|
170
170
|
*args, **kwargs)) for ind in range(len(dwa_a))])
|
|
171
171
|
|
|
172
172
|
return dwa
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
# *************** other numpy function ****************
|
|
176
|
+
|
|
177
|
+
@implements('flipud')
|
|
178
|
+
def _flipud(dwa: 'DataWithAxes', *args, **kwargs):
|
|
179
|
+
dwa_func = dwa.deepcopy_with_new_data([np.flipud(data_array) for data_array in dwa])
|
|
180
|
+
return dwa_func
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@implements('fliplr')
|
|
184
|
+
def _fliplr(dwa: 'DataWithAxes', *args, **kwargs):
|
|
185
|
+
dwa_func = dwa.deepcopy_with_new_data([np.fliplr(data_array) for data_array in dwa])
|
|
186
|
+
return dwa_func
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@implements('transpose')
|
|
190
|
+
def _transpose(dwa: 'DataWithAxes', *args, **kwargs):
|
|
191
|
+
dwa_func = dwa.deepcopy_with_new_data([np.transpose(data_array) for data_array in dwa])
|
|
192
|
+
return dwa_func
|
|
193
|
+
|
|
194
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/plotting/plotter/plotters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymodaq_data-5.0.8 → pymodaq_data-5.0.10}/src/pymodaq_data/post_treatment/process_to_scalar.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|