spacetelescope / jdaviz

JWST astronomical data analysis tools in the Jupyter platform
https://jdaviz.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
139 stars 74 forks source link

[FEAT] Mosviz: Import data through file dialog #601

Open duytnguyendtn opened 3 years ago

duytnguyendtn commented 3 years ago

Description

573 adds a file dialog to the Jdaviz framework. While this is a temporary solution, the permanent one proposed will be similar, just using the system file selector rather than a custom one. Currently it can only load a single data FILE. Mosviz's load_data() takes three arrays: mosviz.load_data(spectra_1d, spectra_2d, images=images), one for each data product. I think we will need to add folder selection options to our file dialog to support Mosviz. Otherwise, everything else we can probably work around. I provided a few suggestions in my review of #573 that I've copied below for convenience:

Additional context

  1. Select folders for each datatype (that's not a great solution, since in our examples, all the files are in the same folder)?
  2. Select a zip folder and unzip it (Also not great, because what happens if the user has already unzipped it? Will they need to re-zip it???)?
  3. Select a folder and then use our auto-detection logic to parse out the bits (this will require us to add a folder selection option, but the most sensible one to me).
pllim commented 3 years ago
  1. Specify all your files into some YAML file and then use the file dialog to open the YAML file that would load all the necessary files into Mosviz. Pro: No changes to existing dialog. Con: User needs to create YAML file.
  2. Implement a multi-step dialog (like a wizard). Pro: More user friendly, maybe. Con: More dev work.