figpack 0.2.3__py3-none-any.whl → 0.2.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.

Potentially problematic release.


This version of figpack might be problematic. Click here for more details.

@@ -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-DUR9Dmwh.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-CrYQmIda.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-Cmae55E4.css">
10
10
  </head>
11
11
  <body>
@@ -0,0 +1,77 @@
1
+ """
2
+ RasterPlot view for figpack - displays multiple raster plots
3
+ """
4
+
5
+ from typing import List
6
+ import numpy as np
7
+ import zarr
8
+
9
+ from ...core.figpack_view import FigpackView
10
+ from .RasterPlotItem import RasterPlotItem
11
+
12
+
13
+ class RasterPlot(FigpackView):
14
+ """
15
+ A view that displays multiple raster plots for spike sorting analysis
16
+ """
17
+
18
+ def __init__(
19
+ self,
20
+ *,
21
+ start_time_sec: float,
22
+ end_time_sec: float,
23
+ plots: List[RasterPlotItem],
24
+ height: int = 500,
25
+ ):
26
+ """
27
+ Initialize a RasterPlot view
28
+
29
+ Args:
30
+ start_time_sec: Start time in seconds for the plot range
31
+ end_time_sec: End time in seconds for the plot range
32
+ plots: List of RasterPlotItem objects
33
+ height: Height of the plot in pixels (default: 500)
34
+ """
35
+ self.start_time_sec = float(start_time_sec)
36
+ self.end_time_sec = float(end_time_sec)
37
+ self.plots = plots
38
+ self.height = height
39
+
40
+ def _write_to_zarr_group(self, group: zarr.Group) -> None:
41
+ """
42
+ Write the RasterPlot data to a Zarr group
43
+
44
+ Args:
45
+ group: Zarr group to write data into
46
+ """
47
+ # Set the view type
48
+ group.attrs["view_type"] = "RasterPlot"
49
+
50
+ # Store view-level attributes
51
+ group.attrs["start_time_sec"] = self.start_time_sec
52
+ group.attrs["end_time_sec"] = self.end_time_sec
53
+ group.attrs["height"] = self.height
54
+ group.attrs["num_plots"] = len(self.plots)
55
+
56
+ # Store metadata for each plot
57
+ plot_metadata = []
58
+ for i, plot in enumerate(self.plots):
59
+ plot_name = f"plot_{i}"
60
+
61
+ # Store metadata
62
+ metadata = {
63
+ "name": plot_name,
64
+ "unit_id": str(plot.unit_id),
65
+ "num_spikes": len(plot.spike_times_sec),
66
+ }
67
+ plot_metadata.append(metadata)
68
+
69
+ # Create arrays for this plot
70
+ group.create_dataset(
71
+ f"{plot_name}/spike_times_sec",
72
+ data=plot.spike_times_sec,
73
+ dtype=np.float32,
74
+ )
75
+
76
+ # Store the plot metadata
77
+ group.attrs["plots"] = plot_metadata
@@ -0,0 +1,28 @@
1
+ """
2
+ RasterPlotItem for figpack - represents a single unit's raster plot
3
+ """
4
+
5
+ from typing import Union
6
+ import numpy as np
7
+
8
+
9
+ class RasterPlotItem:
10
+ """
11
+ Represents spike times for a single unit in a raster plot
12
+ """
13
+
14
+ def __init__(
15
+ self,
16
+ *,
17
+ unit_id: Union[str, int],
18
+ spike_times_sec: np.ndarray,
19
+ ):
20
+ """
21
+ Initialize a RasterPlotItem
22
+
23
+ Args:
24
+ unit_id: Identifier for the unit
25
+ spike_times_sec: Numpy array of spike times in seconds
26
+ """
27
+ self.unit_id = unit_id
28
+ self.spike_times_sec = np.array(spike_times_sec, dtype=np.float32)
@@ -13,6 +13,8 @@ from .UnitsTableRow import UnitsTableRow
13
13
  from .AverageWaveforms import AverageWaveforms
14
14
  from .SpikeAmplitudesItem import SpikeAmplitudesItem
15
15
  from .SpikeAmplitudes import SpikeAmplitudes
16
+ from .RasterPlotItem import RasterPlotItem
17
+ from .RasterPlot import RasterPlot
16
18
 
17
19
  __all__ = [
18
20
  "AutocorrelogramItem",
@@ -26,4 +28,6 @@ __all__ = [
26
28
  "AverageWaveforms",
27
29
  "SpikeAmplitudesItem",
28
30
  "SpikeAmplitudes",
31
+ "RasterPlotItem",
32
+ "RasterPlot",
29
33
  ]
@@ -0,0 +1,88 @@
1
+ """
2
+ Gallery view for figpack - a gallery layout container that handles other views with separate timeseries contexts
3
+ """
4
+
5
+ from typing import Any, Dict, List, Optional
6
+
7
+ import zarr
8
+
9
+ from ..core.figpack_view import FigpackView
10
+ from .GalleryItem import GalleryItem
11
+
12
+
13
+ class Gallery(FigpackView):
14
+ """
15
+ A gallery layout container view that arranges other views in a gallery format.
16
+
17
+ The Gallery view is functionally similar to TabLayout, but with a key difference:
18
+ each gallery item maintains its own independent timeseries selection context.
19
+ This means that time range selections, current time, and visible time ranges
20
+ are isolated between different gallery items, allowing for independent navigation
21
+ and analysis of timeseries data in each item.
22
+
23
+ This is particularly useful when comparing different datasets or views that
24
+ should not share the same time selection state.
25
+ """
26
+
27
+ def __init__(
28
+ self,
29
+ *,
30
+ items: List[GalleryItem],
31
+ initial_item_index: int = 0,
32
+ ):
33
+ """
34
+ Initialize a Gallery view
35
+
36
+ Args:
37
+ items: List of GalleryItem objects containing the child views.
38
+ Each item will have its own independent timeseries selection context.
39
+ initial_item_index: Index of the initially selected gallery item (default: 0).
40
+ Will be clamped to valid range if out of bounds.
41
+ """
42
+ self.items = items
43
+ # Ensure initial_item_index is within valid bounds
44
+ self.initial_item_index = (
45
+ max(0, min(initial_item_index, len(items) - 1)) if items else 0
46
+ )
47
+
48
+ def _write_to_zarr_group(self, group: zarr.Group) -> None:
49
+ """
50
+ Write the Gallery data to a Zarr group
51
+
52
+ This method serializes the gallery structure and all its child views
53
+ into a Zarr group format that can be read by the frontend components.
54
+ Each gallery item's view is written to its own subgroup within the
55
+ main gallery group.
56
+
57
+ Args:
58
+ group: Zarr group to write data into
59
+ """
60
+ # Set the view type identifier for the frontend
61
+ group.attrs["view_type"] = "Gallery"
62
+
63
+ # Store gallery-specific properties
64
+ group.attrs["initial_item_index"] = self.initial_item_index
65
+
66
+ # Create a list to store metadata for all gallery items
67
+ items_metadata = []
68
+
69
+ # Process each gallery item
70
+ for i, item in enumerate(self.items):
71
+ # Generate a unique name for this item's subgroup
72
+ item_name = f"gallery_item_{i}"
73
+
74
+ # Store item metadata (label, etc.) for the frontend
75
+ item_metadata = item.to_dict()
76
+ item_metadata["name"] = item_name
77
+ items_metadata.append(item_metadata)
78
+
79
+ # Create a subgroup for this gallery item's view
80
+ item_group = group.create_group(item_name)
81
+
82
+ # Recursively write the child view to the subgroup
83
+ # This allows any figpack view to be contained within a gallery item
84
+ item.view._write_to_zarr_group(item_group)
85
+
86
+ # Store the complete items metadata in the group attributes
87
+ # This will be used by the frontend to render the gallery structure
88
+ group.attrs["items"] = items_metadata
@@ -0,0 +1,47 @@
1
+ """
2
+ GalleryItem class for figpack Gallery view - represents an item in a gallery layout container
3
+ """
4
+
5
+ from typing import Optional
6
+
7
+ from ..core.figpack_view import FigpackView
8
+
9
+
10
+ class GalleryItem:
11
+ """
12
+ Represents an item in a Gallery with a label and view.
13
+
14
+ Similar to TabLayoutItem, but designed for gallery layouts where each item
15
+ maintains its own independent timeseries selection context.
16
+ """
17
+
18
+ def __init__(
19
+ self,
20
+ view: FigpackView,
21
+ *,
22
+ label: str,
23
+ ):
24
+ """
25
+ Initialize a GalleryItem
26
+
27
+ Args:
28
+ view: The figpack view to be contained in this gallery item
29
+ label: The label text to display for this gallery item
30
+ """
31
+ self.view = view
32
+ self.label = label
33
+
34
+ def to_dict(self) -> dict:
35
+ """
36
+ Convert the GalleryItem to a dictionary for serialization
37
+
38
+ This method is used when writing the gallery data to Zarr format.
39
+ The dictionary contains metadata about the item that will be stored
40
+ in the Zarr group attributes.
41
+
42
+ Returns:
43
+ Dictionary representation of the GalleryItem containing the label
44
+ """
45
+ return {
46
+ "label": self.label,
47
+ }
figpack/views/Image.py CHANGED
@@ -32,6 +32,43 @@ class Image(FigpackView):
32
32
 
33
33
  self.image_path_or_data = image_path_or_data
34
34
 
35
+ @staticmethod
36
+ def from_image_file(image_path: str) -> "Image":
37
+ """
38
+ Create an Image view from a file path
39
+
40
+ Args:
41
+ image_path: Path to the image file
42
+
43
+ Returns:
44
+ An Image view instance
45
+ """
46
+ return Image(image_path)
47
+
48
+ @staticmethod
49
+ def from_image_url(image_url: str) -> "Image":
50
+ """
51
+ Create an Image view from an image URL by downloading the image
52
+
53
+ Args:
54
+ image_url: URL of the image to download
55
+
56
+ Returns:
57
+ An Image view instance
58
+
59
+ Raises:
60
+ ValueError: If the image cannot be downloaded
61
+ """
62
+ import requests
63
+
64
+ try:
65
+ response = requests.get(image_url)
66
+ response.raise_for_status()
67
+ image_data = response.content
68
+ return Image(image_data)
69
+ except Exception as e:
70
+ raise ValueError(f"Failed to download image from URL: {str(e)}")
71
+
35
72
  def _write_to_zarr_group(self, group: zarr.Group) -> None:
36
73
  """
37
74
  Write the image data to a Zarr group
figpack/views/__init__.py CHANGED
@@ -1,4 +1,6 @@
1
1
  from .Box import Box
2
+ from .Gallery import Gallery
3
+ from .GalleryItem import GalleryItem
2
4
  from .Image import Image
3
5
  from .LayoutItem import LayoutItem
4
6
  from .Markdown import Markdown
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: figpack
3
+ Version: 0.2.5
4
+ Summary: A Python package for creating shareable, interactive visualizations in the browser
5
+ Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/flatironinstitute/figpack
8
+ Project-URL: Repository, https://github.com/flatironinstitute/figpack
9
+ Project-URL: Documentation, https://flatironinstitute.github.io/figpack
10
+ Project-URL: Bug Tracker, https://github.com/flatironinstitute/figpack/issues
11
+ Keywords: visualization,plotting,timeseries,interactive
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering :: Visualization
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: numpy
28
+ Requires-Dist: zarr<3
29
+ Requires-Dist: requests
30
+ Requires-Dist: psutil
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest>=7.0; extra == "test"
33
+ Requires-Dist: pytest-cov>=4.0; extra == "test"
34
+ Requires-Dist: pytest-mock>=3.10; extra == "test"
35
+ Requires-Dist: spikeinterface; extra == "test"
36
+ Requires-Dist: matplotlib; extra == "test"
37
+ Requires-Dist: plotly; extra == "test"
38
+ Requires-Dist: Pillow; extra == "test"
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=7.0; extra == "dev"
41
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
42
+ Requires-Dist: pytest-mock>=3.10; extra == "dev"
43
+ Requires-Dist: black>=24.0; extra == "dev"
44
+ Requires-Dist: pre-commit>=3.0; extra == "dev"
45
+ Provides-Extra: docs
46
+ Requires-Dist: sphinx>=7.0; extra == "docs"
47
+ Requires-Dist: myst-parser>=2.0; extra == "docs"
48
+ Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
49
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
50
+ Requires-Dist: linkify-it-py>=2.0; extra == "docs"
51
+ Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
52
+ Dynamic: license-file
53
+
54
+ # figpack
55
+
56
+ [![Tests](https://github.com/flatironinstitute/figpack/actions/workflows/test.yml/badge.svg)](https://github.com/flatironinstitute/figpack/actions/workflows/test.yml)
57
+ [![codecov](https://codecov.io/gh/flatironinstitute/figpack/branch/main/graph/badge.svg)](https://codecov.io/gh/flatironinstitute/figpack)
58
+ [![PyPI version](https://badge.fury.io/py/figpack.svg)](https://badge.fury.io/py/figpack)
59
+
60
+ A Python package for creating shareable, interactive visualizations in the browser.
61
+
62
+ ## Documentation
63
+
64
+ For detailed guidance, tutorials, and API reference, visit our **[documentation](https://flatironinstitute.github.io/figpack)**.
65
+
66
+ ## Quick Start
67
+
68
+ Want to jump right in? Here's how to get started:
69
+
70
+ ```bash
71
+ pip install figpack
72
+ ```
73
+
74
+ ```python
75
+ import numpy as np
76
+ import figpack.views as vv
77
+
78
+ # Create a timeseries graph
79
+ graph = vv.TimeseriesGraph(y_label="Signal")
80
+
81
+ # Add some data
82
+ t = np.linspace(0, 10, 1000)
83
+ y = np.sin(2 * np.pi * t)
84
+ graph.add_line_series(name="sine wave", t=t, y=y, color="blue")
85
+
86
+ # Display the visualization in your browser
87
+ graph.show(open_in_browser=True, title="Quick Start Example")
88
+ ```
89
+
90
+ ## License
91
+
92
+ Apache-2.0
93
+
94
+ ## Contributing
95
+
96
+ Visit the [GitHub repository](https://github.com/flatironinstitute/figpack) for issues, contributions, and the latest updates.
@@ -1,15 +1,17 @@
1
- figpack/__init__.py,sha256=qKVa2XgXzmxB506Y98CMOKvDXy8y-xdiDmkDLGJ3YE8,124
2
- figpack/cli.py,sha256=DYV-DxzWnQTMNywW-ZzhlTEFOEIt11rAKdobdBmRQFk,12051
1
+ figpack/__init__.py,sha256=MgpfFlGDmvR6fsmnN1k1RyoeOxl6pBtfaXgvZj1RStY,181
2
+ figpack/cli.py,sha256=xWF7J2BxUqOLvPu-Kje7Q6oGukTroXsLq8WN8vJgyw0,8321
3
3
  figpack/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- figpack/core/_bundle_utils.py,sha256=73E6FinAvrt1QATGncIqyg6JLeiWVmlGF8NOcFyeYSs,1913
5
- figpack/core/_server_manager.py,sha256=8uxJftMgJ7EcVXtLo_VQuaiCZIyqgE89yDfCXKEgyeQ,10922
6
- figpack/core/_show_view.py,sha256=WeHbQ1qdq5Lr54XTuNqmCIrwR4jbPWu8dT7Sm_UNcsk,5194
7
- figpack/core/_upload_bundle.py,sha256=8D3M778E7nvkl9xnyrFOBlFhOOhywdiwLzOSPCMm4KE,13351
8
- figpack/core/config.py,sha256=6EU9CMvzGk9308Xlx8iJ2cIHJV6pqhXyiZGkK2snA4g,108
9
- figpack/core/figpack_view.py,sha256=q-Xxk9X4dnLy_kGX0POC7FLB6qwmBfqrWD6uelPJZVE,3708
10
- figpack/figpack-gui-dist/index.html,sha256=HU8Dv1EzISPzQjibGxDA6tAz7VpzjL6o-HXOPKv4s4E,486
4
+ figpack/core/_bundle_utils.py,sha256=PIBVce4SXZyNTKpXsoEKlHbY7QUFRMBLwSECmJn0INE,1878
5
+ figpack/core/_save_figure.py,sha256=9fn37xxZgSBQVOHaKuzsPRMgD2pcibuJ1jkjhTVv4ks,1002
6
+ figpack/core/_server_manager.py,sha256=BTLeZtSbaJtAmtslAfgvp9C-SV0aJnn4WCpUJzd1Mlg,10997
7
+ figpack/core/_show_view.py,sha256=fwd6o6K0IHnlLDRMvo-dwQ_zrHs9bkAFqZJpID22Tso,5044
8
+ figpack/core/_upload_bundle.py,sha256=hseJDKe2s7fO8siWpAGuwGDniOlOvPJ5Jksql6SVMug,14192
9
+ figpack/core/_view_figure.py,sha256=o1x1I2VKFrp2W_TStUS3fQblRW8AvGbu7Uy7MgVjofA,4186
10
+ figpack/core/config.py,sha256=oOR7SlP192vuFhYlS-h14HnG-kd_3gaz0vshXch2RNc,173
11
+ figpack/core/figpack_view.py,sha256=NMinVYTByDG_JrplxyGNvPalN-XLnQNNhnwIsT4km1Q,6099
12
+ figpack/figpack-gui-dist/index.html,sha256=Iir-EDyhLfsZDZ3m0oGeB-N1AjXtIAC68lu3rOx2WKo,486
11
13
  figpack/figpack-gui-dist/assets/index-Cmae55E4.css,sha256=Yg0apcYehJwQvSQIUH13S7tsfqWQDevpJsAho0dDf0g,5499
12
- figpack/figpack-gui-dist/assets/index-DUR9Dmwh.js,sha256=iHbhpBXkfKoDzn-ZDxh2_uktWyzSTwes9gzgdBEM7PU,1590964
14
+ figpack/figpack-gui-dist/assets/index-CrYQmIda.js,sha256=3wyvEZye-j_IBlv5lBP4qCBY9-a6-sJ6inh0ZeTHDjA,1594728
13
15
  figpack/figpack-gui-dist/assets/neurosift-logo-CLsuwLMO.png,sha256=g5m-TwrGh5f6-9rXtWV-znH4B0nHgc__0GWclRDLUHs,9307
14
16
  figpack/franklab/__init__.py,sha256=HkehqGImJE_sE2vbPDo-HbgtEYaMICb9-230xTYvRTU,56
15
17
  figpack/franklab/views/TrackAnimation.py,sha256=3Jv1Ri4FIwTyqNahinqhHsBH1Bv_iZrEGx12w6diJ2M,5636
@@ -20,15 +22,19 @@ figpack/spike_sorting/views/Autocorrelograms.py,sha256=43EgKHvUmXUA9QSOJQZiTeLHq
20
22
  figpack/spike_sorting/views/AverageWaveforms.py,sha256=mvMkS3wf6MpI95tlGqKxBjxZlHqJr4aqG7SZvHigIsI,5193
21
23
  figpack/spike_sorting/views/CrossCorrelogramItem.py,sha256=uSd0i2hupteuILi_aKp7bYPYpL_PdC3CUDRMOEKUEM0,880
22
24
  figpack/spike_sorting/views/CrossCorrelograms.py,sha256=gqPXbEgg-GE3NCJQT2bahp1ITSW33F3q9ZuJRGrR68M,4061
25
+ figpack/spike_sorting/views/RasterPlot.py,sha256=gFdfH9SEm-tf8Ptqw4M1Q7IHRytUOULpBZfM2TdMfZQ,2215
26
+ figpack/spike_sorting/views/RasterPlotItem.py,sha256=iW7fuDEjSfvf5YMIwrF_6cmKvD76oCigOUMHtGgBsPI,638
23
27
  figpack/spike_sorting/views/SpikeAmplitudes.py,sha256=vQYWdJM-3qu568bcfGDC9k9LW_PgvU8j4tN9QYc08Mo,2665
24
28
  figpack/spike_sorting/views/SpikeAmplitudesItem.py,sha256=j5Na-diY-vRUAPu0t0VkyFCSKFnQ_f5HT077mB3Cy8c,1134
25
29
  figpack/spike_sorting/views/UnitSimilarityScore.py,sha256=cJA9MkETos9qHhV1tqgA7SfNEaPo-duXYCE76hSFGnA,948
26
30
  figpack/spike_sorting/views/UnitsTable.py,sha256=kQZvMlnPk8MAMPr3GlL4T3cAvGfSHBbB52jvMJ2-YAU,2173
27
31
  figpack/spike_sorting/views/UnitsTableColumn.py,sha256=zBnuoeILTuiVLDvtcOxqa37E5WlbR12rlwNJUeWXxY4,847
28
32
  figpack/spike_sorting/views/UnitsTableRow.py,sha256=rEb2hMTA_pl2fTW1nOvnGir0ysfNx4uww3aekZzfWjk,720
29
- figpack/spike_sorting/views/__init__.py,sha256=WdGhMcptNM5OJ5hG3PXOIyjGRsFcp12DtABocMehVSU,849
33
+ figpack/spike_sorting/views/__init__.py,sha256=iRq7xPmyhnQ3GffnPC0GxKGEWnlqXY_8IOxsMqYZ1IM,967
30
34
  figpack/views/Box.py,sha256=TfhPFNtVEq71LCucmWk3XX2WxQLdaeRiWGm5BM0k2l4,2236
31
- figpack/views/Image.py,sha256=xbnkmiqlrYD9_BGsQgSGgqXJbvNECTI7iJhLsEd3kSg,2990
35
+ figpack/views/Gallery.py,sha256=sHlZbaqxcktasmNsJnuxe8WmgUQ6iurG50JiChKSMbQ,3314
36
+ figpack/views/GalleryItem.py,sha256=b_upJno5P3ANSulbG-h3t6Xj56tPGJ7iVxqyiZu3zaQ,1244
37
+ figpack/views/Image.py,sha256=hmyAHlRwj0l6fC7aNmHYJFaj-qCqyH67soERm78V5dk,3953
32
38
  figpack/views/LayoutItem.py,sha256=wy8DggkIzZpU0F1zFIBceS7HpBb6lu-A3hpYINQzedk,1595
33
39
  figpack/views/Markdown.py,sha256=KEqEAz5VXErLXr8dYJrWY1I8_VdRazDIcjCNcHfUGPA,769
34
40
  figpack/views/MatplotlibFigure.py,sha256=LQSvPY3_iSHO-ZfWjRO6iOVUp5W-mmlt3mj8GBoK18w,1939
@@ -38,10 +44,10 @@ figpack/views/Splitter.py,sha256=x9jLCTlIvDy5p9ymVd0X48KDccyD6bJANhXyFgKEmtE,200
38
44
  figpack/views/TabLayout.py,sha256=5g3nmL95PfqgI0naqZXHMwLVo2ebDlGX01Hy9044bUw,1898
39
45
  figpack/views/TabLayoutItem.py,sha256=xmHA0JsW_6naJze4_mQuP_Fy0Nm17p2N7w_AsmVRp8k,880
40
46
  figpack/views/TimeseriesGraph.py,sha256=OAaCjO8fo86u_gO_frNfRGxng3tczxGDGKcJEvZo3rE,7469
41
- figpack/views/__init__.py,sha256=8y4KdRtrdDF0-xtQQkj4k_d8Ajk44Q7myztl3StdZcU,407
42
- figpack-0.2.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
43
- figpack-0.2.3.dist-info/METADATA,sha256=m_CybGYmcQYpRliR1ZkHMP7sM7qbSTR89sVKBzZvTOI,5886
44
- figpack-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
- figpack-0.2.3.dist-info/entry_points.txt,sha256=l6d3siH2LxXa8qJGbjAqpIZtI5AkMSyDeoRDCzdrUto,45
46
- figpack-0.2.3.dist-info/top_level.txt,sha256=lMKGaC5xWmAYBx9Ac1iMokm42KFnJFjmkP2ldyvOo-c,8
47
- figpack-0.2.3.dist-info/RECORD,,
47
+ figpack/views/__init__.py,sha256=npSsSmbxN7_tZcjCK76L2l9dRVqubVXIgBnxj1uhjf4,473
48
+ figpack-0.2.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
49
+ figpack-0.2.5.dist-info/METADATA,sha256=R5iFyGtb_oUZo9Txa1670Ax4pPZyIS5OULXaKbtcfEo,3577
50
+ figpack-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
51
+ figpack-0.2.5.dist-info/entry_points.txt,sha256=l6d3siH2LxXa8qJGbjAqpIZtI5AkMSyDeoRDCzdrUto,45
52
+ figpack-0.2.5.dist-info/top_level.txt,sha256=lMKGaC5xWmAYBx9Ac1iMokm42KFnJFjmkP2ldyvOo-c,8
53
+ figpack-0.2.5.dist-info/RECORD,,
@@ -1,168 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: figpack
3
- Version: 0.2.3
4
- Summary: A Python package for creating shareable, interactive visualizations in the browser
5
- Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
6
- License: Apache-2.0
7
- Project-URL: Homepage, https://github.com/magland/figpack
8
- Project-URL: Repository, https://github.com/magland/figpack
9
- Project-URL: Documentation, https://github.com/magland/figpack#readme
10
- Project-URL: Bug Tracker, https://github.com/magland/figpack/issues
11
- Keywords: visualization,plotting,timeseries,interactive
12
- Classifier: Development Status :: 3 - Alpha
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Intended Audience :: Science/Research
15
- Classifier: License :: OSI Approved :: Apache Software License
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Topic :: Scientific/Engineering :: Visualization
24
- Requires-Python: >=3.8
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE
27
- Requires-Dist: numpy
28
- Requires-Dist: zarr<3
29
- Requires-Dist: requests
30
- Requires-Dist: psutil
31
- Provides-Extra: test
32
- Requires-Dist: pytest>=7.0; extra == "test"
33
- Requires-Dist: pytest-cov>=4.0; extra == "test"
34
- Requires-Dist: pytest-mock>=3.10; extra == "test"
35
- Requires-Dist: spikeinterface; extra == "test"
36
- Requires-Dist: matplotlib; extra == "test"
37
- Requires-Dist: plotly; extra == "test"
38
- Provides-Extra: dev
39
- Requires-Dist: pytest>=7.0; extra == "dev"
40
- Requires-Dist: pytest-cov>=4.0; extra == "dev"
41
- Requires-Dist: pytest-mock>=3.10; extra == "dev"
42
- Requires-Dist: black>=24.0; extra == "dev"
43
- Requires-Dist: pre-commit>=3.0; extra == "dev"
44
- Dynamic: license-file
45
-
46
- # figpack
47
-
48
- A Python package for creating shareable, interactive visualizations in the browser.
49
-
50
- ## Overview
51
-
52
- figpack enables you to create interactive data visualizations that can be displayed in a web browser and optionally shared online. The package focuses on timeseries data visualization with support for complex, nested layouts.
53
-
54
- ### Key Features
55
-
56
- - **Interactive timeseries graphs** with line series, markers, and interval plots
57
- - **Flexible layout system** with boxes, splitters, and tab layouts
58
- - **Web-based rendering** that works in any modern browser
59
- - **Shareable visualizations** that can be uploaded and shared via URLs
60
- - **Zarr-based data storage** for efficient handling of large datasets
61
-
62
- ## Installation
63
-
64
- Install figpack using pip:
65
-
66
- ```bash
67
- pip install figpack
68
- ```
69
-
70
- ## Quick Start
71
-
72
- ```python
73
- import numpy as np
74
- import figpack.views as vv
75
-
76
- # Create a timeseries graph
77
- graph = vv.TimeseriesGraph(y_label="Signal")
78
-
79
- # Add some data
80
- t = np.linspace(0, 10, 1000)
81
- y = np.sin(2 * np.pi * t)
82
- graph.add_line_series(name="sine wave", t=t, y=y, color="blue")
83
-
84
- # Display the visualization
85
- graph.show(open_in_browser=True, title="Quick Start Example")
86
- ```
87
-
88
- ## Available Views
89
-
90
- figpack provides a comprehensive set of view components for creating interactive visualizations:
91
-
92
- ### Core Views
93
-
94
- - **[TimeseriesGraph](docs/timeseries-graph.md)** - Interactive line plots, markers, and intervals ([example](examples/example_timeseries_graph.py))
95
- - **[MultiChannelTimeseries](docs/multichannel-timeseries.md)** - Multi-channel timeseries visualization ([example](examples/example_multichannel_timeseries.py))
96
- - **[Image](docs/image.md)** - Display images with optional annotations ([example](examples/example_image.py))
97
- - **[Markdown](docs/markdown.md)** - Render markdown content ([example](examples/example_markdown.py))
98
-
99
- ### Layout Views
100
-
101
- - **[Box](docs/box.md)** - Flexible container with horizontal/vertical layouts ([example](examples/example_box.py))
102
- - **[Splitter](docs/splitter.md)** - Resizable split panes ([example](examples/example_splitter.py))
103
- - **[TabLayout](docs/tab-layout.md)** - Tabbed interface for multiple views ([example](examples/example_tablayout.py))
104
-
105
- ### External Figure Support
106
-
107
- - **[MatplotlibFigure](docs/matplotlib-figure.md)** - Embed matplotlib plots ([example](examples/example_matplotlib.py))
108
- - **[PlotlyFigure](docs/plotly-figure.md)** - Embed plotly visualizations ([example](examples/example_plotly.py))
109
-
110
- ### Spike Sorting Views
111
-
112
- - **[Autocorrelograms](docs/autocorrelograms.md)** - Auto-correlation analysis ([example](examples/example_autocorrelograms.py))
113
- - **[CrossCorrelograms](docs/cross-correlograms.md)** - Cross-correlation analysis ([example](examples/example_cross_correlograms.py))
114
- - **[UnitsTable](docs/units-table.md)** - Sortable table for spike sorting units ([example](examples/example_units_table.py))
115
-
116
- ## Examples
117
-
118
- See the `examples/` directory for working examples of each view type.
119
-
120
- ## Usage Modes
121
-
122
- ### Local-only Mode
123
-
124
- ```python
125
- view.show(open_in_browser=True, title="Local Visualization")
126
- ```
127
-
128
- ### Sharing Online
129
-
130
- Set the `FIGPACK_API_KEY` environment variable and use:
131
-
132
- ```python
133
- view.show(upload=True, open_in_browser=True, title="Shared Visualization")
134
- ```
135
-
136
- ### Development Mode
137
-
138
- Set `_dev=True` in the call to show() to enable development mode, which allows for live updates and development of figpack-gui.
139
-
140
- ## Command Line Interface
141
-
142
- figpack includes a command-line interface for working with figures:
143
-
144
- ### Download a Figure
145
-
146
- ```bash
147
- figpack download <figure-url> <dest.tar.gz>
148
- ```
149
-
150
- Download a figure from any figpack URL and save it as a local archive.
151
-
152
- ### View a Figure Archive
153
-
154
- ```bash
155
- figpack view <figure.tar.gz>
156
- ```
157
-
158
- Extract and view a figure archive in your browser. The server will run locally until you press Enter.
159
-
160
- Use `--port <number>` to specify a custom port.
161
-
162
- ## License
163
-
164
- Apache-2.0
165
-
166
- ## Contributing
167
-
168
- Visit the [GitHub repository](https://github.com/magland/figpack) for issues, contributions, and the latest updates.