Firefly icon indicating copy to clipboard operation
Firefly copied to clipboard

add ability to select and download data

Open ageller opened this issue 1 year ago • 1 comments

I am working toward creating the ability for a user to select a region of data and either download it or have access to it in Python. Currently there is a branch called data_selection that has the work in progress. Here are the important updates currently enabled:

  • in the GUI main/general/data segment there are new tools to control a spherical data selection region:
    • on/off checkbox,
    • radius slider,
    • distance from viewer slider,
    • download data button
  • the spherical selection region moves with the camera. (So the user must move the view around the select different objects, except for moving the sphere in the z direction relative to the camera.)
  • the download button will retrieve a .json file with all the data enclosed in the sphere.
  • if using flask, there is also a hook that will allow the user to have access to the data directly in python (see ntks/selecting_data.ipynb). HOWEVER, it is currently only working for a small amount of data (seems like there is some limitation in sockets <-- maybe I can just do this without sockets?).

Once I fix this limit on the amount of data that can be passed via flask, I think this branch can be merged into main. But we should probably discuss if we want to integrate this in any way with passing settings back and forth (which is in the python_data_passing branch). I don't think there's any reason to combine the two, but I may be missing something. It's worth a discussion.

Also note that there is some discussion surrounding this topic in issue #166 (about passing setting to and from firefly via flask).

ageller avatar May 10 '23 14:05 ageller

I fixed the issue with accessing large amounts of data in flask by chunking up the data, and recompiling it in Python before making it available to the user. This also allowed for a nice progress bar. I think this completes the goals of selecting data and retrieving it for the user. @agurvich let's discuss sometime soon and then merge this baby into main!

ageller avatar May 12 '23 21:05 ageller