figpack 0.1.5__py3-none-any.whl → 0.1.7__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.
- figpack/__init__.py +1 -1
- figpack/core/_show_view.py +4 -4
- figpack/core/_upload_bundle.py +175 -270
- figpack/core/config.py +5 -0
- figpack/figpack-gui-dist/assets/{index-DeyVLaXh.js → index-DaeClgi6.js} +1 -1
- figpack/figpack-gui-dist/index.html +1 -1
- figpack/views/Box.py +6 -0
- figpack/views/Image.py +8 -0
- figpack/views/MultiChannelTimeseries.py +6 -2
- {figpack-0.1.5.dist-info → figpack-0.1.7.dist-info}/METADATA +2 -2
- {figpack-0.1.5.dist-info → figpack-0.1.7.dist-info}/RECORD +15 -14
- {figpack-0.1.5.dist-info → figpack-0.1.7.dist-info}/WHEEL +0 -0
- {figpack-0.1.5.dist-info → figpack-0.1.7.dist-info}/entry_points.txt +0 -0
- {figpack-0.1.5.dist-info → figpack-0.1.7.dist-info}/licenses/LICENSE +0 -0
- {figpack-0.1.5.dist-info → figpack-0.1.7.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="./assets/neurosift-logo-CLsuwLMO.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>figpack figure</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-DaeClgi6.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-BDa2iJW9.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
figpack/views/Box.py
CHANGED
|
@@ -29,7 +29,13 @@ class Box(FigpackView):
|
|
|
29
29
|
direction: Layout direction - "horizontal" or "vertical"
|
|
30
30
|
show_titles: Whether to show titles for layout items
|
|
31
31
|
items: List of LayoutItem objects containing the child views
|
|
32
|
+
|
|
33
|
+
Raises:
|
|
34
|
+
ValueError: If direction is not "horizontal" or "vertical"
|
|
32
35
|
"""
|
|
36
|
+
if direction not in ["horizontal", "vertical"]:
|
|
37
|
+
raise ValueError('direction must be either "horizontal" or "vertical"')
|
|
38
|
+
|
|
33
39
|
self.direction = direction
|
|
34
40
|
self.show_titles = show_titles
|
|
35
41
|
self.items = items
|
figpack/views/Image.py
CHANGED
|
@@ -21,7 +21,15 @@ class Image(FigpackView):
|
|
|
21
21
|
|
|
22
22
|
Args:
|
|
23
23
|
image_path_or_data: Path to image file or raw image bytes
|
|
24
|
+
|
|
25
|
+
Raises:
|
|
26
|
+
ValueError: If image_path_or_data is not a string or bytes
|
|
24
27
|
"""
|
|
28
|
+
if not isinstance(image_path_or_data, (str, bytes)):
|
|
29
|
+
raise ValueError(
|
|
30
|
+
"image_path_or_data must be a file path (str) or raw bytes"
|
|
31
|
+
)
|
|
32
|
+
|
|
25
33
|
self.image_path_or_data = image_path_or_data
|
|
26
34
|
|
|
27
35
|
def _write_to_zarr_group(self, group: zarr.Group) -> None:
|
|
@@ -160,11 +160,15 @@ class MultiChannelTimeseries(FigpackView):
|
|
|
160
160
|
elements_per_timepoint * bytes_per_element
|
|
161
161
|
)
|
|
162
162
|
|
|
163
|
-
#
|
|
164
|
-
chunk_timepoints = 2 **
|
|
163
|
+
# Find next lower power of 2
|
|
164
|
+
chunk_timepoints = 2 ** math.floor(math.log2(max_timepoints_per_chunk))
|
|
165
165
|
chunk_timepoints = max(chunk_timepoints, 1) # At least 1
|
|
166
166
|
chunk_timepoints = min(chunk_timepoints, n_timepoints) # At most n_timepoints
|
|
167
167
|
|
|
168
|
+
# If n_timepoints is less than our calculated size, round down to next power of 2
|
|
169
|
+
if chunk_timepoints > n_timepoints:
|
|
170
|
+
chunk_timepoints = 2 ** math.floor(math.log2(n_timepoints))
|
|
171
|
+
|
|
168
172
|
if len(shape) == 2:
|
|
169
173
|
return (chunk_timepoints, n_channels)
|
|
170
174
|
else: # len(shape) == 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: figpack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: A Python package for creating shareable, interactive visualizations in the browser
|
|
5
5
|
Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -126,7 +126,7 @@ view.show(open_in_browser=True, title="Local Visualization")
|
|
|
126
126
|
|
|
127
127
|
### Sharing Online
|
|
128
128
|
|
|
129
|
-
Set the `
|
|
129
|
+
Set the `FIGPACK_API_KEY` environment variable and use:
|
|
130
130
|
|
|
131
131
|
```python
|
|
132
132
|
view.show(upload=True, open_in_browser=True, title="Shared Visualization")
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
figpack/__init__.py,sha256=
|
|
1
|
+
figpack/__init__.py,sha256=YhyPL4V8ojTE5ZnpYe8PhRzGOo365qo-w91HKnCSRos,124
|
|
2
2
|
figpack/cli.py,sha256=a5OQv1MEHifag_9qxOZEuMPj_Zh-w_UUypQyBvppiUs,10295
|
|
3
3
|
figpack/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
figpack/core/_bundle_utils.py,sha256=73E6FinAvrt1QATGncIqyg6JLeiWVmlGF8NOcFyeYSs,1913
|
|
5
|
-
figpack/core/_show_view.py,sha256=
|
|
6
|
-
figpack/core/_upload_bundle.py,sha256=
|
|
5
|
+
figpack/core/_show_view.py,sha256=uEUPyFsEr05QqrwMEpz3NrfI2oqBbyzoXMG8Tt9jvKw,4259
|
|
6
|
+
figpack/core/_upload_bundle.py,sha256=BmPZdHAdadLmN3KkNIvRJNEVvhzprCSU-lH-vLwH9i8,11307
|
|
7
|
+
figpack/core/config.py,sha256=6EU9CMvzGk9308Xlx8iJ2cIHJV6pqhXyiZGkK2snA4g,108
|
|
7
8
|
figpack/core/figpack_view.py,sha256=Ft5Mt6aOGPoV1lJpiLiOPxCvCw2KdDySqA31S3ULCL4,2128
|
|
8
|
-
figpack/figpack-gui-dist/index.html,sha256=
|
|
9
|
+
figpack/figpack-gui-dist/index.html,sha256=rZTiz7VZ328F7UAHdxX1qa3u5_j3KkK_gJjfNs6lEQ4,486
|
|
9
10
|
figpack/figpack-gui-dist/assets/index-BDa2iJW9.css,sha256=9Zg_hJUZuEk-nNZZ7qun6pYlhUySqVDSal9YD8_2vHo,5499
|
|
10
|
-
figpack/figpack-gui-dist/assets/index-
|
|
11
|
+
figpack/figpack-gui-dist/assets/index-DaeClgi6.js,sha256=hslnPoOFSF8njr2dIOzhkMNb-pXngDUwy8RbmoDGRrc,1466458
|
|
11
12
|
figpack/figpack-gui-dist/assets/neurosift-logo-CLsuwLMO.png,sha256=g5m-TwrGh5f6-9rXtWV-znH4B0nHgc__0GWclRDLUHs,9307
|
|
12
13
|
figpack/spike_sorting/__init__.py,sha256=09njqh-oFaCTdZUsc4HAOFTliUYV9DClddfZ0Q_dm0I,61
|
|
13
14
|
figpack/spike_sorting/views/AutocorrelogramItem.py,sha256=1giv4bMc1jBsJCWgmdlMPBxNe0e_JaDCHpuXjMWWgwo,1037
|
|
@@ -19,21 +20,21 @@ figpack/spike_sorting/views/UnitsTable.py,sha256=kQZvMlnPk8MAMPr3GlL4T3cAvGfSHBb
|
|
|
19
20
|
figpack/spike_sorting/views/UnitsTableColumn.py,sha256=zBnuoeILTuiVLDvtcOxqa37E5WlbR12rlwNJUeWXxY4,847
|
|
20
21
|
figpack/spike_sorting/views/UnitsTableRow.py,sha256=rEb2hMTA_pl2fTW1nOvnGir0ysfNx4uww3aekZzfWjk,720
|
|
21
22
|
figpack/spike_sorting/views/__init__.py,sha256=h8b8GWfZnjt9Sv9T6IUIlgRcLQvVu0nHkQAp4Dno98c,630
|
|
22
|
-
figpack/views/Box.py,sha256=
|
|
23
|
-
figpack/views/Image.py,sha256=
|
|
23
|
+
figpack/views/Box.py,sha256=TfhPFNtVEq71LCucmWk3XX2WxQLdaeRiWGm5BM0k2l4,2236
|
|
24
|
+
figpack/views/Image.py,sha256=xbnkmiqlrYD9_BGsQgSGgqXJbvNECTI7iJhLsEd3kSg,2990
|
|
24
25
|
figpack/views/LayoutItem.py,sha256=wy8DggkIzZpU0F1zFIBceS7HpBb6lu-A3hpYINQzedk,1595
|
|
25
26
|
figpack/views/Markdown.py,sha256=KEqEAz5VXErLXr8dYJrWY1I8_VdRazDIcjCNcHfUGPA,769
|
|
26
27
|
figpack/views/MatplotlibFigure.py,sha256=LQSvPY3_iSHO-ZfWjRO6iOVUp5W-mmlt3mj8GBoK18w,1939
|
|
27
|
-
figpack/views/MultiChannelTimeseries.py,sha256=
|
|
28
|
+
figpack/views/MultiChannelTimeseries.py,sha256=sWr2nW1eoYR7V44wF7fac7IoQ6BOnus1nc4STkgIkYw,8501
|
|
28
29
|
figpack/views/PlotlyFigure.py,sha256=B02nfWFM89GnDUZiS2v89ZtGBdSZtAwcXUD_7rV7kN4,1633
|
|
29
30
|
figpack/views/Splitter.py,sha256=x9jLCTlIvDy5p9ymVd0X48KDccyD6bJANhXyFgKEmtE,2007
|
|
30
31
|
figpack/views/TabLayout.py,sha256=5g3nmL95PfqgI0naqZXHMwLVo2ebDlGX01Hy9044bUw,1898
|
|
31
32
|
figpack/views/TabLayoutItem.py,sha256=xmHA0JsW_6naJze4_mQuP_Fy0Nm17p2N7w_AsmVRp8k,880
|
|
32
33
|
figpack/views/TimeseriesGraph.py,sha256=OAaCjO8fo86u_gO_frNfRGxng3tczxGDGKcJEvZo3rE,7469
|
|
33
34
|
figpack/views/__init__.py,sha256=8y4KdRtrdDF0-xtQQkj4k_d8Ajk44Q7myztl3StdZcU,407
|
|
34
|
-
figpack-0.1.
|
|
35
|
-
figpack-0.1.
|
|
36
|
-
figpack-0.1.
|
|
37
|
-
figpack-0.1.
|
|
38
|
-
figpack-0.1.
|
|
39
|
-
figpack-0.1.
|
|
35
|
+
figpack-0.1.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
36
|
+
figpack-0.1.7.dist-info/METADATA,sha256=q4VF_9I3qyV1sdgXnl2CBhz-i-YOul8kfFzOk2yTQk0,5862
|
|
37
|
+
figpack-0.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
figpack-0.1.7.dist-info/entry_points.txt,sha256=l6d3siH2LxXa8qJGbjAqpIZtI5AkMSyDeoRDCzdrUto,45
|
|
39
|
+
figpack-0.1.7.dist-info/top_level.txt,sha256=lMKGaC5xWmAYBx9Ac1iMokm42KFnJFjmkP2ldyvOo-c,8
|
|
40
|
+
figpack-0.1.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|