py4D-browser-flexloader 0.0.5__py3-none-any.whl

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.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: py4D-browser-flexloader
3
+ Version: 0.0.5
4
+ Summary: py4D-browser plugin for flexible HDF5 and Zarr dataset loading
5
+ Author-email: Chia-Hao Lee <chia-hao.lee@cornell.edu>
6
+ License-Expression: GPL-3.0-only
7
+ Project-URL: Homepage, https://github.com/chiahao3/py4D-browser-flexloader
8
+ Project-URL: Repository, https://github.com/chiahao3/py4D-browser-flexloader
9
+ Project-URL: Bug Tracker, https://github.com/chiahao3/py4D-browser-flexloader/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE.txt
15
+ Requires-Dist: py4d-browser
16
+ Requires-Dist: py4dstem>=0.14.9
17
+ Requires-Dist: numpy>=1.19
18
+ Requires-Dist: h5py
19
+ Requires-Dist: zarr
20
+ Requires-Dist: PyQt5>=5.10
21
+ Provides-Extra: test
22
+ Requires-Dist: pytest; extra == "test"
23
+ Dynamic: license-file
24
+
25
+ # py4D-browser-flexloader
26
+
27
+ `py4D-browser-flexloader` is a plugin for
28
+ [py4D-browser](https://github.com/sezelt/py4D-browser) that adds a flexible
29
+ loader for HDF5 and Zarr datasets. It lets you browse datasets inside a file or
30
+ Zarr store, choose the data array to load, map arbitrary source dimensions into
31
+ py4DGUI's expected 4D datacube order, and preview the selected mapping before
32
+ loading.
33
+
34
+ This is useful for datasets that are not organized in the standard py4DSTEM file
35
+ layout, including files with multiple arrays, higher-dimensional arrays, and
36
+ flattened scan dimensions such as `(Nscans, ky, kx)`.
37
+
38
+ ## Installation
39
+
40
+ You can install `py4D-browser-flexloader` directly from PyPI:
41
+
42
+ ```bash
43
+ pip install py4d-browser-flexloader
44
+ ```
45
+
46
+ > **Note:**
47
+ > - If you install into a fresh Python environment, `py4D-browser` and
48
+ > `py4DSTEM` will be installed automatically as dependencies.
49
+ > - If you already have `py4D-browser` installed, install this plugin into the
50
+ > same Python environment.
51
+
52
+ A step-by-step installation using conda looks like this:
53
+
54
+ ```bash
55
+ conda create -n py4dgui python=3.12
56
+ conda activate py4dgui
57
+ python -m pip install --upgrade pip
58
+ python -m pip cache purge
59
+ pip install py4d-browser-flexloader
60
+ ```
61
+
62
+ ## Usage
63
+
64
+ Start py4DGUI after activating the environment:
65
+
66
+ ```bash
67
+ py4dgui
68
+ ```
69
+
70
+ After installing this plugin, you should see a **"Flex Loader"** submenu under
71
+ the **"Plugins"** menu. From there, choose the loader that matches your data
72
+ source:
73
+
74
+ - **Load HDF5 File...** for `.h5`, `.hdf5`, `.emd`, `.mat`, and `.py4dstem`
75
+ files.
76
+ - **Load Zarr Directory...** for directory-backed `.zarr` stores.
77
+ - **Load Zarr Zip File...** for Zarr stores saved as `.zip` or `.zarr.zip`
78
+ files.
79
+
80
+ The loader dialog shows the internal hierarchy of the selected file or store,
81
+ including array paths, shapes, dtypes, chunks, and attributes. Once an array is
82
+ selected, assign its dimensions to:
83
+
84
+ - `Scan Y`
85
+ - `Scan X`
86
+ - `Detector Y`
87
+ - `Detector X`
88
+ - `Fixed Index`
89
+ - `Flattened Scan`
90
+
91
+ Use `Flattened Scan` for datasets stored as `(Nscans, ky, kx)` or
92
+ `(..., Nscans, ky, kx)`. The loader will factor the flattened scan axis into
93
+ `Scan Y` and `Scan X` before loading.
94
+
95
+ Click **Update Preview** to inspect a lightweight preview before loading. The
96
+ preview reads only two 2D slices from the selected HDF5/Zarr dataset:
97
+
98
+ - a sqrt-scaled diffraction pattern from the central scan position
99
+ - an axial bright-field image from the central diffraction pixel
100
+
101
+ Click **Load** to create a `py4DSTEM.DataCube` from the selected 4D subset and
102
+ send it to py4DGUI. The raw source file is not modified. Calibration can be set
103
+ after loading using py4DGUI's calibration tools.
104
+
105
+ Both grouped Zarr stores and root-level Zarr arrays are supported.
106
+
107
+ ## License
108
+
109
+ GNU GPLv3
110
+
111
+ **py4D-browser-flexloader** is open source software distributed under a GPLv3
112
+ license. It is free to use, alter, or build on, provided that any work derived
113
+ from **py4D-browser-flexloader** is also kept free and open.
@@ -0,0 +1,10 @@
1
+ py4d_browser_flexloader-0.0.5.dist-info/licenses/LICENSE.txt,sha256=bgwZCWOE9C3DJN4mx9MDUu6zQL-gGAtaXeRDf96Y3yY,35135
2
+ py4d_browser_plugin/flexloader/__init__.py,sha256=4A4GgLoIBwzvqtQYiBKgEWsuUwB4cD-yRMPYpwooiUM,208
3
+ py4d_browser_plugin/flexloader/backends.py,sha256=6MJggX8XnUWhRAa2joVxatrVmGrOYxkGb5dp4no0JKE,6897
4
+ py4d_browser_plugin/flexloader/dialog.py,sha256=ehN8Rd4s2sMFN_NcutPoIWf88xuwTetLF8h_-ajRsmM,13351
5
+ py4d_browser_plugin/flexloader/flexloader.py,sha256=OcQ8KQY008kHmoS7M0UE6DDIpvmZ9QBSKgMdLPmcOfc,4006
6
+ py4d_browser_plugin/flexloader/selection.py,sha256=kcC9OH7i5YhKoBP9jA9HICA2g-ta0z6yP6Y9UkgxSrs,10039
7
+ py4d_browser_flexloader-0.0.5.dist-info/METADATA,sha256=RnhGD1R_OwFhK1-fbWO5Ho1lWZrINHBs7qvPGoeyZPE,3850
8
+ py4d_browser_flexloader-0.0.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
9
+ py4d_browser_flexloader-0.0.5.dist-info/top_level.txt,sha256=ibWHazTt6MHBYhySAZuLwBg-uAzP6cgy8Uhczju2evI,20
10
+ py4d_browser_flexloader-0.0.5.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+