It's totally legitimate to want to load 2D or 1D spectral data into Cubeviz to view in one of the image or spectrum viewers, respectively. Right now cubeviz.load_data accepts Spectrum1D objects as input, but using files or HDUs that contain 2D images or spectra fails. Images in particular are silently skipped over and the Data Loaded snackbar message is still displayed, which is confusing for the user.
I think that the ideal result is that the cubeviz.load_data method falls back on the Imviz or Specviz parsers for the appropriate data type, perhaps appending "[Spectrum]" or "[Image]" to the data label so that it's obvious in the data menus that the data isn't a full cube.
It's totally legitimate to want to load 2D or 1D spectral data into Cubeviz to view in one of the image or spectrum viewers, respectively. Right now
cubeviz.load_data
acceptsSpectrum1D
objects as input, but using files or HDUs that contain 2D images or spectra fails. Images in particular are silently skipped over and theData Loaded
snackbar message is still displayed, which is confusing for the user.I think that the ideal result is that the
cubeviz.load_data
method falls back on the Imviz or Specviz parsers for the appropriate data type, perhaps appending "[Spectrum]" or "[Image]" to the data label so that it's obvious in the data menus that the data isn't a full cube.