Demo for thinking about how to integrate lists of spectra with Glue.
This demo requires using the in-development "table" branch of GitHub. The best way to set this up is to install Glue in "development" mode:
Checkout glue source code from github:
git clone https://github.com/glue-viz/glue.git
cd glue
git remote update
git checkout table
python setup.py develop
Confirm that you are now using the development version of Glue by cd ~/
, starting python, and running
import glue
print glue
The output path should point directly to the glue source code directory, and not something like .../python2.7/site-packages/...
. If it doesn't, delete the Glue directory output from this line, and repeat
At this point, Glue will always import from the source code in the Git directory, meaning changes to that directory immediately propagate
Download the http://www2.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/GSA-SV/GN-2001B-SV-101 directory, untar it, and cd into GN-2001B-SV-101/proc_logs
. The view.py
script depends upon NGC6940.fits
and mrgN20010813S106_add.fits
Running view.py
starts Glue with 2 datasets: an image
(normal 2D image), and spectra
(a catalog of spectra and associated information. You can Overplot the spectra on the image by dragging the spectra dataset on an image widget, as normal. You can also look at a tabular view of spectra
using the Table
viewer. The last column of that viewer shows a bunch of 1D data
cells, which contain the actual spectral information. Highlighting a set of them and hitting v
will display them as spectra.
That's about all it does for now. I don't love the way the spectra are stored in this data set, so I'd like to think of better ways to get that to work. Input on typical datasets and usecases would help