pymodaq_data 5.0.7__tar.gz → 5.0.9__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.7 → pymodaq_data-5.0.9}/PKG-INFO +1 -2
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/_version.py +2 -2
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/data.py +4 -4
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/data_saving.py +23 -5
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/.gitignore +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/LICENSE +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/README.rst +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/pyproject.toml +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/__init__.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/__init__.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/backends.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/browsing.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/exporter.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/exporters/__init__.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/exporters/base.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/exporters/flimj.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/exporters/hyperspy.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/saving.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/h5modules/utils.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/icon.ico +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/numpy_func.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/plotting/__init__.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/plotting/plotter/plotter.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/plotting/plotter/plotters/__init__.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/plotting/plotter/plotters/matplotlib_plotters.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/post_treatment/__init__.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/post_treatment/process_to_scalar.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/slicing.py +0 -0
- {pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/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.9
|
|
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
|
|
@@ -3126,14 +3126,14 @@ class DataToExport(DataLowLevel):
|
|
|
3126
3126
|
def remove(self, dwa: DataWithAxes):
|
|
3127
3127
|
""" Use the DataWithAxes object comparison __eq__ to retrieve the elt to remove
|
|
3128
3128
|
|
|
3129
|
-
If strict is True will also check for the real type and name of the object
|
|
3130
|
-
|
|
3131
3129
|
Parameters
|
|
3132
3130
|
----------
|
|
3131
|
+
dwa: DataWithAxes
|
|
3132
|
+
The da to remove from the list
|
|
3133
3133
|
"""
|
|
3134
|
-
for dwa_tmp in self:
|
|
3134
|
+
for ind, dwa_tmp in enumerate(self):
|
|
3135
3135
|
if dwa_tmp == dwa and dwa_tmp.name == dwa.name:
|
|
3136
|
-
return
|
|
3136
|
+
return self.data.pop(ind)
|
|
3137
3137
|
raise ValueError()
|
|
3138
3138
|
|
|
3139
3139
|
@property
|
|
@@ -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)
|
|
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.7 → pymodaq_data-5.0.9}/src/pymodaq_data/plotting/plotter/plotters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymodaq_data-5.0.7 → pymodaq_data-5.0.9}/src/pymodaq_data/post_treatment/process_to_scalar.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|