silx-kit / silx

silx toolkit
http://www.silx.org/doc/silx/latest/
MIT License
119 stars 70 forks source link

silx view: Large 2D datasets are open #4124

Open t20100 opened 1 month ago

t20100 commented 1 month ago

When opening a large 2D dataset containing many curves (shape: 1e6 x 3000, dtype: float32), it takes too long to display with the default view (raw?), while one want to browse the curves.

As a workaround, it is possible to open first another dataset and select the curves plot before selecting the 2D dataset.

It would be good to avoid this by either adding a confirmation before loading really large datasets or by changing the default view when the 2D data is really large.

Related to https://github.com/silx-kit/h5web/issues/1651

vasole commented 1 month ago

I guess the dataset does not identify itself as being of spectrum type.

What about deciding between spectrum and image based on the ratio between rows and columns when no previous visualization has taken place? I guess images will usually not have orders of magnitude between the two dimensions.

t20100 commented 1 month ago

There's no attributes or NXdata description, just a plain 2D dataset.

The ratio can be a good way to discriminate. I was also considering the number of pixels to give an idea how demanding it will be to load it. We probably don't want to display straight away a 1e6 x 1e6 pixel image either.