|
10 | 10 |
|
11 | 11 | """ |
12 | 12 |
|
13 | | -__all__ = ["HDF5Folder", "HDFFileManager"] |
| 13 | +__all__ = ["HDF5Folder"] |
14 | 14 | import importlib |
15 | 15 | import os |
16 | 16 | import os.path as path |
|
20 | 20 | from .compat import bytes2str, get_filedialog, path_types |
21 | 21 | from .core.exceptions import StonerLoadError |
22 | 22 | from .folders import DataFolder |
23 | | -from .tools.file import HDFFileManager |
| 23 | +from .core.data import Data |
24 | 24 |
|
25 | 25 |
|
26 | 26 | def get_hdf_loader(f, default_loader=lambda *args, **kargs: None): |
@@ -49,17 +49,11 @@ def get_hdf_loader(f, default_loader=lambda *args, **kargs: None): |
49 | 49 | return getattr(globals()[typ], "read_hdf5", default_loader) |
50 | 50 |
|
51 | 51 |
|
52 | | -class HDF5FolderMixin: |
53 | | - """Provides a method to load and save data from a single HDF5 file with groups. |
54 | | -
|
55 | | - See :py:class:`Stoner.Folders.DataFolder` for documentation on constructor. |
56 | | -
|
57 | | - Datalayout consistns of sub-groups that are either instances of HDF5Files (i.e. have a type attribute that |
58 | | - contains 'HDF5File') or are themsleves HDF5Folder instances (with a type attribute that reads 'HDF5Folder'). |
59 | | - """ |
| 52 | +class HDF5Folder(DataFolder): |
| 53 | + """Just enforces the loader attriobute to be an HDF5File.""" |
60 | 54 |
|
61 | 55 | def __init__(self, *args, **kargs): |
62 | | - """Initialise the File aatribute.""" |
| 56 | + """Ensure the loader routine is set for HDF5Files.""" |
63 | 57 | self.File = None |
64 | 58 | super().__init__(*args, **kargs) |
65 | 59 |
|
@@ -244,12 +238,3 @@ def save(self, root=None): |
244 | 238 | self.File.close() |
245 | 239 | self.File = None |
246 | 240 | return self |
247 | | - |
248 | | - |
249 | | -class HDF5Folder(HDF5FolderMixin, DataFolder): |
250 | | - """Just enforces the loader attriobute to be an HDF5File.""" |
251 | | - |
252 | | - def __init__(self, *args, **kargs): |
253 | | - """Ensure the loader routine is set for HDF5Files.""" |
254 | | - # self.loader = HDF5File |
255 | | - super().__init__(*args, **kargs) |
0 commit comments