Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying/exporting datasets #35

Closed
ghost opened this issue Mar 25, 2020 · 5 comments · Fixed by #885
Closed

Copying/exporting datasets #35

ghost opened this issue Mar 25, 2020 · 5 comments · Fixed by #885
Assignees
Labels
epic Issue that will need to be split up later on

Comments

@ghost
Copy link

ghost commented Mar 25, 2020

The goal is to be able to use a dataset somewhere else, like in a Jupyter Notebook. The copy could be done either by reference or by value. The export could be to CSV or other raw formats.

@ghost ghost changed the title Allow copying a dataset Copying datasets Mar 25, 2020
@axelboc axelboc changed the title Copying datasets Copying/exporting datasets Apr 2, 2020
@axelboc axelboc added the epic Issue that will need to be split up later on label May 18, 2020
@axelboc
Copy link
Contributor

axelboc commented Feb 3, 2021

User feedback suggested allowing rows/columns of the Matrix visualization to be selected and copied. Because the grid is virtualized, we can't rely on default text selection and copy; we'd have to provide a specific UI for this and make use of the Clipboard API.

For the UI:

  • We could have a button in the toolbar to copy the whole table, another to copy the current slice for 3D+ datasets, and an input of sorts to enter a range to copy (e.g. 0,0,:,:).
  • We could allow selection of visible rows and columns with click-and-drag -- when a selection is active, we could then show a button in the toolbar to copy the selection (and another button to clear the selection).
  • We could allow copying a single row/column by showing a button in the row/column header cell on hover.
  • ...

@axelboc
Copy link
Contributor

axelboc commented Jul 6, 2021

User feedback suggested allowing rows/columns of the Matrix visualization to be selected and copied.

We won't support this behaviour.

However, we should allow users to export data from other visualizations:

  • Line as CSV
  • Heatmap as CSV
  • NxSpectrum as CSV, with custom axis values, and with axis label and plot title as column headers
  • NxImage as CSV -- exact format to be discussed
  • TIFF and NPY formats should also be considered

@axelboc
Copy link
Contributor

axelboc commented Nov 29, 2021

We're going to implement TIFF encoding in H5Grove (i.e. in the back-end) and use provider-level feature detection to determine whether to show the export button in the toolbars.

Once we have the feature detection system implemented, we'll be able to do the same for the CSV and NPY exports.

@axelboc
Copy link
Contributor

axelboc commented Dec 2, 2021

Now that we have a proof of concept for TIFF export, we know we can do the same with CSV and NPY (and even replace the current CSV export feature on the Matrix vis so it's done server-side). The question is then: should we provide all three exports on all visualizations? Or does TIFF only make sense on Heatmap/NxImage, CSV on Matrix, etc.?

From a UI standpoint, we can merge the export toolbar controls into a single "Export" drop-down to save space. Which means that if we want to display all three exports (TIFF/CSV/NPY) on all visualizations, it's no problem at all.

@axelboc
Copy link
Contributor

axelboc commented Dec 3, 2021

As per our discussion:

  • MatrixVis : CSV ☑️ (to be delegated to H5Grove), NPY
  • LineVis : CSV, NPY
  • HeatmapVis : TIFF ✅ , NPY

Additional notes:

  • When dimension sliders are visible, only the current slice is exported, not the entire dataset.
  • NeXus visualizations could provide export either of the signal dataset only, or of the signal and axes combined in the form of an x/y/data scatter format. Until the user need arises for the latter, we will implement only the former.
  • The construction of the export data is to be done server-side like we did with TIFF in Add "Export" menu to toolbars with CSV/NPY/TIFF exports #885.
  • Providers must opt in to supporting these export features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Issue that will need to be split up later on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant