msoechting / lexcube Goto Github PK
View Code? Open in Web Editor NEWLexcube: 3D Data Cube Visualization in Jupyter Notebooks
Home Page: https://www.lexcube.org
License: GNU General Public License v3.0
Lexcube: 3D Data Cube Visualization in Jupyter Notebooks
Home Page: https://www.lexcube.org
License: GNU General Public License v3.0
Describe the solution you'd like
I use the viz a lot for debugging my data. It would often be nice to be able to tap through each timestep manually. Dragging with the mouse is imprecise and much slower.
This could either be a button or some key on the keyboard.
Describe the bug
Hi @msoechting ,
I was just trying lexcube (it looks awesome!) and ran into an error when using it from Python 3.9. In Python 3.10 it works nicely.
To Reproduce
Steps to reproduce the behavior:
Install lexcube in a Python 3.9 environment and run this code:
import lexcube
This error pops up:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import lexcube
2 import xarray as xr
3 import numpy as np
File ~\mambaforge\envs\bio39\lib\site-packages\lexcube\__init__.py:20
1 #!/usr/bin/env python
2 # coding: utf-8
3
(...)
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <https://www.gnu.org/licenses/>.
---> 20 from .cube3d import Cube3DWidget, Sliders
21 from ._version import __version__
23 def _jupyter_labextension_paths():
File ~\mambaforge\envs\bio39\lib\site-packages\lexcube\cube3d.py:46
41 def cancel(self):
42 self._task.cancel()
45 @widgets.register
---> 46 class Cube3DWidget(widgets.DOMWidget):
47 _model_name = Unicode('Cube3DModel').tag(sync=True)
48 _model_module = Unicode(module_name).tag(sync=True)
File ~\mambaforge\envs\bio39\lib\site-packages\lexcube\cube3d.py:70, in Cube3DWidget()
66 zwrap = Bool(False).tag(sync=True)
68 isometric_mode = Bool(False).tag(sync=True)
---> 70 def __init__(self, data_source, cmap: str | list | None = None, vmin: float | None = None, vmax: float | None = None, isometric_mode: bool = False, use_lexcube_chunk_caching: bool = True, **kwargs):
71 super().__init__(**kwargs)
72 self.cmap = cmap
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Expected behavior
A clear and concise description of what you expected to happen.
Either this bug could be fixed, or the installation instructions should mention support for Python >= 3.10 only. Also this line should be removed:
Line 31 in a2b5fc1
And this one modified:
Line 13 in a2b5fc1
I'm happy to send a pull-request with either one of the solutions if you like.
Best,
Robert
** Feature request**
Hi Maximilian,
Lexcube is very interesting. I played with the web interface a little bit (https://www.lexcube.org/?!esdc-3.0.2/air_temperature_2m/0-1976/0-718/596-1312) and also with a sample ocean model output of temperature (a 4D dataset) in a jupyter lab framework. Working with geophysical fields mostly (coupled atmosphere and ocean model) it would be useful to be able to add coastlines and coordinates gridlines.
** Solution **
Something similar to cartopy coastlines feature and gridlines.
(ex. latitude and latitude gridlines at specific intervals, i.e like regular 10 degrees.
Same thing for vertical z coordinates, ex depth at 10m intervals, ...)
https://scitools.org.uk/cartopy/docs/v0.13/index.html
Jean-Marc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.