algotom / broh5

Browser-based GUI HDF Viewer https://broh5.readthedocs.io
https://broh5.readthedocs.io/
Apache License 2.0
11 stars 0 forks source link

Sparse matrix support #1

Closed lpawela closed 4 months ago

lpawela commented 5 months ago

It would be nice to be able to visualize sparse matrices, especially in the COO format. For instance if we have the following structure: :card_index_dividers: HDF5.File: (read-only) ├─ :open_file_folder: some_group │ ├─ :open_file_folder: matrix_coo │ │ ├─ :1234: I │ │ ├─ :1234: J │ │ └─ :1234: V

Also, support for matrices indexed from 1 would nice for this case.

nghia-vo commented 5 months ago

That should be doable, but would need you to change the way you format the data. If the matrix is 3 separated datasets: I, J, and V; like the above example, we have to combine them somehow to visualize them. This is impossible for the current NiceGUI framework (i.e. these actions: select I, select J, and select V is not doable with the current framework). If you can change matrix_coo = tuple(I,J,V) or matrix_coo = np.asarray([I, J, V]), I can add the requested visualization capability to broh5

nghia-vo commented 4 months ago

Let reopen this when it's doable.