What’s new in glue?¶
On this page you will find information about significant changes in each release. Many smaller improvements and bug fixes are not mentioned here but can be found in the full list of CHANGES.md file if you are interested.
Before we get started, here’s a reminder on how to install/update glue. You can easily update glue if you are using Anaconda/Miniconda by doing:
conda install -c glueviz glueviz
If instead you installed glue with pip, you can update with:
pip install glueviz[all] --upgrade
What’s new in glue v0.12?¶
Improved 2D scatter viewer¶
It is now possible to show arrows/vectors in the 2D Scatter viewer:
To use this, see the new Vectors tab below the layer list when using the 2D Scatter viewer. In addition, we have made a number of improvements to the user interface of this viewer to make it easier to enable/disable different visualizations (markers, lines, errorbars, and vectors).
User interface improvements¶
We have made a number of improvements to the user interface and general usability. In particular, selecting disabled layers in a viewer will now give a clear explanation that the layer is disabled and will give possible causes, rather than relying solely on visual cues (such as graying out a layer).
Custom startup actions¶
It is now possible to define custom startup actions to execute when glue starts up by writing simple Python functions in a config.py file or in plugin packages. Startup actions are executed once glue is open and any data provided on the command-line (if any) has been opened. Find out more about writing custom startup actions.
Custom data/subset actions¶
It is now possible to specify custom actions that can be accessed by right/control-clicking on a dataset or subset, using the new @layer_action decorator. The following screenshot shows an example of a custom action added by a user to smooth data in a particular way:
Experimental SAMP plugin¶
A number of Astronomy applications including TOPCAT, Aladin, DS9, WorldWideTelescope and more support a message-passing system that allows data and subsets to be exchanged between applications. We have now developed a plugin that adds SAMP capabilities to glue. To try this out, you will need to install the glue-samp package, using:
conda install -c glueviz glue-samp
if you use conda, or:
pip install glue-samp
otherwise. To use this, once inside glue, go to the Plugins menu, then select Open SAMP plugin. The window that open will provide information on using this plugin. Note however that this plugin is experimental and is still missing a number of features. In addition, SAMP implementation in other applications is sometimes buggy, so you may encounter issues unrelated to glue.
Improved performance in 3D viewers¶
The 3D Volume Rendering is now signficantly faster for large datasets. In particular, the resolution of the rendering is now reduced when rotating or zooming, and we have made it so that the viewer is now much more efficient in terms of memory.
Experimental fixed layout/dashboards [advanced]¶
By default, glue uses a free-form canvas to contain viewers, which gives you the ability to arrange the data viewers in any way you like. However, for certain applications, it can be helpful to defined tabs that contain data viewers in a predefined layout. This is now possible, although note that this is still an experimental feature and requires some knowledge of how to set up Qt widgets. In future, we will make it possible to define layouts in a more intuitive way.
What’s new in glue v0.11?¶
The v0.11 release of glue includes a number of exciting new features and improvements, so let’s take a look at what’s new!
New Slack community¶
We have now set up Slack for any glue help/discussions, and we encourage you to sign up! You will need to first get an account here after which you will be able to sign in to http://glueviz.slack.com.
The main interface of the application has been improved, and now features a toolbar at the top with quick access to common functionality, as well as a clearer link to the error console (which replaces the square in the bottom right of the interface).
We’ve also done a lot of work to improve the layout of many of the option widgets, fixing font sizes, and so on. We hope you like the updated interface!
New built-in viewers¶
The built-in histogram, scatter, and image viewers have now been completely re-written and now include new functionality. For example, the scatter viewer now includes the ability to color-code or resize points based on another attribute (this was previously possible in the 3D scatter viewer only):
The scatter viewer now also includes the ability to show symmetric error bars in the x and/or y direction.
Finally, this viewer also allows you to plot the data using a continuous line rather than individual points.
The image viewer has also seen an overhaul - the main change in user experience is that multi-color images are now made via layers instead of using a special RGB mode, and any number of images can be combined using an arbitrary number of colormaps or colors, rather than being restricted to RGB colors:
Subset mask importers and exporters¶
While it was already possible to export data subsets as actual subsets of the data, it is now possible to import and export the boolean masks for subsets. At the moment, there is only built-in support for importing/exporting from FITS files, but defining new importers/exporters can easily be done, as described in Custom subset mask importers and Custom subset mask exporters. In future, we will add built-in support for a wider range of file formats.
This release includes a number of significant performance improvements. For example, there should now no longer be any delays when setting up links, and selections should propagate between viewers more efficiently.
Experimental WorldWide Telescope plugin¶
We have developed a plugin that provides a WorldWide Telescope (WWT) viewer inside glue:
To use this viewer, you will need to install the glue-wwt plugin, using:
conda install -c glueviz glue-wwt
if you use conda, or:
pip install glue-wwt
otherwise. This viewer is experimental and is still missing a number of features. For example, it can only be used to show datasets that have RA/Dec columns (not other types of coordinates). Please report any issues or feature requests here. If you would be interested in contributing to or help maintaining this plugin, we would also love to hear from you! (see here for different ways of getting in touch).
Experimental geospatial plugin¶
We have started to develop a plugin which aims to collect functionality relevant to the analysis of geospatial data. For now, the plugin provides a data factory that uses the rasterio package to read geospatial raster data. This includes reading in the coordinate system and showing longitude/latitude lines in image viewers, and also allows longitude/latitude scatter data to be overplotted:
To use this, you will need to install the glue-geospatial plugin, using:
conda install -c glueviz glue-geospatial
if you use conda, or:
pip install glue-geospatial
This plugin is experimental, and if you run into any issues or would like to see new features, please open an issue here. If you would be interested in contributing to or help maintaining this plugin, we would also love to hear from you! (see here for different ways of getting in touch).
If you programmatically create viewers from Python scripts, if you currently set attributes on viewers, you will need to update this code if using the built-in histogram, scatter, or image viewers.
The main change is that the viewer classes have been renamed as follows:
In addition, attributes related to the visualization are no longer set directly
on the viewer object but instead using a
state attribute on the viewers. For
example to set the
x attribute on the scatter plot viewer, you should set:
>>> viewer.state.x_att = ...
>>> viewer.xatt = ...
The motivation for this change is that the
state object is a new object that
represents the state of the viewer in a GUI-framework-independent way, and is a
cleaner way to encapsulate all the information needed to control the
visualization. See the Programmatically configuring viewers section for more details.
New conda glueviz channel¶
We now provide our own conda channel called
glueviz (rather than using
conda-forge), which should help alleviate installation issues some users have
reported in the past. This channel contains the stable versions of glue and
various plugin packages.
Note that it is also possible to install the latest developer version from the
glueviz/label/dev channel, though be aware that while you will get the
latest cutting-edge features, you may also be more prone to bugs/breakage.
What’s new in glue v0.10?¶
New data/subset exporters¶
It is now possible to easily export datasets and subsets by right-clicking (or control-clicking) on them and selecting Export Data or Export Subsets.
Custom data/subset exporters can be easily be defined by users - see Custom Data/Subset Exporters for more details. Currently only a small number of formats are supported by default but this will be expanded in future.
Performance has been significantly improved (in some cases by factors of 10-100) for cases where 2D datasets were linked with 3D or higher-dimensional datasets, and selections were made in 2D.
Ginga plugin now moved to a separate package¶
pip install glue-ginga
Compatibility with PyQt5 and Matplotlib 2.x¶
Glue and the 3D viewers are now fully compatible with PyQt5 and Matplotlib 2.x, which together provide sharper plots on high DPI (e.g. retina) displays.
Creating subset states for categorical components [advanced]¶
For users who like to create subsets programmatically or in the built-in IPython console, it is now possible to create subset states for categorical components using e.g.:
d.id['source'] == 'name'
What’s new in glue v0.9?¶
New table viewer¶
Glue now includes a table viewer for data with 1-dimensional components (such as tables). The table viewer highlights selections made in other viewers, and also allows selections to be made in the viewer:
To make a selection in the table, either select an existing subset in the Data Collection panel in the top left if you want to modify a subset, or make sure no subset is selected to make a new subset (as in other viewers), then click the button on the left in the table viewer toolbar, select rows you want to include in the subset, and press enter to validate the selection. You can also combine this with the ususal logical selections (‘and’, ‘or’, etc.) from glue to modify existing subsets by adding/removing rows.
Improvements to 3D viewers¶
There have been a number of improvements to the 3D viewers provided by the glue-vispy-viewers package (now automatically installed with glue).
The main changes are:
- The axes now include ticks, tick labels, and axis labels. For volume renderings, the values are the pixel coordinates for now, but in future we will allow the world coordinates to be shown.
- Catalogs/tables can now be overplotted on top of volume renderings, as for the 2-d image viewer. To use this, you will first need to make sure that you link three components of the catalog/table to the three world coordinates of the cube shown in the volume rendering, then drag the catalog/table dataset onto the volume rendering. By selecting the layer corresponding to the catalog, you can then change the appearance of the markers.
- There is now an option in the bottom left options panel to remove data that falls outside the coordinate axes box. This can be used for both the scatter viewer and volume rendering viewer.
- There is also now an option to show the data in its original aspect ratio, assuming that the voxels are cubes. By default, the 3D viewers stretch the data so that it fills a cube.
- It is now possible to visualize datasets of any dimensionality in the scatter plot viewer - however, note that this viewer currently becomes slow above a million points.
Improved plot.ly exporter¶
Glue has included the ability to export plots to the plot.ly service for a few versions now, but there was no way to control the privacy level of the resulting plots. When exporting to plotly, you will now be presented with a window that allows much finer control over the export:
World coordinates in slices¶
When viewing 3+ dimensional data in the image viewer, if the data has a world coordinate system defined, the coordinates can now be shown in the image slicers:
If the world coordinate system is not linearly related to the pixel slices, a warning will be shown to indicate that the world coordinates are measured along a line that goes down the center of the cube.
Improvements to Astronomy-specific functionality¶
If you have the spectral-cube package installed, glue can now use this to read in spectral cubes in FITS format. To use this, you will need to go through the Open Data Set menu item and explicitly select FITS Spectral Cube from the list:
We haven’t enable this by default at this time because this modifies the order of the axes, and splits the Stokes components into glue data components, which may not always be desirable.
In addition, units are now properly read from FITS and VO tables, and are shown in the table viewer. In future, we will also show the units in the different viewers.
Finally, a new linking function is now available to link celestial Galactic coordinates to 3D Galactocentric coordinates.
join_on_key() method can be used for advanced
linking scenarios - for instance linking datasets by e.g. an ID in two different
datasets. In this version, we have added some advanced possibilities, for
example linking by combinations of keys, as well as allowing one-to-many and
many-to-one linking. For more information, see the documentation for
This functionality is still experimental, and we will provide in future a window in the graphical user interface to explain and make it easy for users to set up these kinds of links.
Data updating [advanced]¶
A new method,
update_values_from_data() has been
added to allow values in datasets to be updated based on another dataset. This
allows users to open a dataset, create different viewers, make selections,
and then load a more recent version of the dataset and update the values,
keeping all the viewers open.
Infrastructure changes [advanced]¶
The code to handle toolbars in viewers has now been completely refactored, and it is much easier for people developing their own viewers to define toolbars and tools for their viewers. A new page, Custom tools for viewers and custom toolbars, has been added to the documentation to show how to use this functionality.
What’s new in Glue v0.8?¶
Playback controls for image slicing¶
When using the image viewer to view datasets with more than two dimensions, the sliders snow include playback controls that you can use to animate the slicing.
By clicking multiple times on the play forward or play back button (the buttons on either side of the stop button), you can speed up the animation.
Improved new component window¶
The Define New Component window has now been significantly improved. The syntax of the expression for the new component is now validated on-the-fly, and the component cannot be created until the expression validates:
Adding data to glue from Python¶
If you make use of the
qglue() function to launch glue from IPython
or the Jupyter notebook, you can now easily continue to add data to glue from
that Python session, by doing e.g.:
>>> app = qglue(data1=array1) >>> app.add_data(data2=array2)
More details can be found here.
New preferences dialog¶
A new dialog for preferences is now available via File -> Edit Preferences, and allows you to change the settings for the foreground/background color of viewers, as well as the default data color and transparency:
Improved feedback window¶
The Send Feedback functionality available through the Help menu and the window to send crash reports to the developers now also provide the option to specify an email address in case you want to be contacted about the feedback/bug report:
Circular and polygonal profile extraction¶
The spectrum/profile extraction tool for the image viewer now supports extraction using circular and polygonal regions.
What’s new in Glue v0.7?¶
Code and development reorganization¶
Since the v0.6.x releases, a lot of work has gone into reorganizing the Glue code base to make it more modular and more accessible for new developers. The documentation has also been completely reorganized and expanded, and now includes a description of some aspects of the Glue architecture and information for anyone interested in getting involved in Glue development.
We also have a new mailing list glue-viz-dev for anyone interested in development, so if you are interested in getting involved, please join the list and let us know!
As a result of the code reorganization, some imports may need to be updated if you are using glue from scripts. Please see this page for more details on what’s changed!
Layer artist options¶
When visualizing data in one of the data viewers, the list of layers is given in the ‘Plot Layers’ list in the left sidebar. While it was possible to edit the style of these layers via a contextual menu previously, we have now made the options more visible below the list:
This is currently implemented for the scatter and histogram viewers, and will be extended to other viewers in future.
Glue is now able to read in
.npz files produced by Numpy.
Thanks to Adrian Price-Whelan for contributing this feature!
Bug fixes and usability improvements¶
A number of usability issues have been fixed. Of particular note, in the v0.6.x releases, lasso selection no longer worked in scatter plots with categorical components on one or more of the axes, but this has now been fixed (thanks to Will Dampier for refactoring the way selection of categorical components is handled internally!).
What’s new in Glue v0.6?¶
Improved file readers¶
A significant amount of work has gone into improving the build-in readers for various data formats. In particular:
- Glue now supports a wider range of ASCII table formats. Any format that can be read by the Astropy package can now be read by Glue. If you run into ASCII tables that cannot be read, please let us know!
- The HDF5 file reader will now read in all datasets from a file, including both tabular and gridded data. The path to the HDF5 dataset is now reflected in the label for the dataset in Glue.
- The Excel file reader is now significantly more robust. In particular, it can now read in files with multiple sheets, and the sheet name is now included in the label for the data.
- The FITS file reader (a data format commonly used in Astronomy) will now read in all header-data units (HDUs) from FITS files rather than simply reading the first. In addition, FITS files with compressed HDUs will now be read correctly.
In Glue v0.5, we introduced the ability to develop separate plugin packages and have these be registered automatically with glue once installed. In some cases it can be useful to disable/enable specific plugins, so the Plugins menu now includes a plugin manager that can be used to enable/disable plugins. This is then stored in a configuration file in the user’s home directory, and the configuration is preserved from one session to the next:
Improvements to image viewer¶
The image viewer now includes an Aspect setting that can be used to control the aspect ratio of the pixels:
If this is set to Square Pixels (the default), the data is always shown with square pixels, which may result in empty space around the data but is more correct when the data is an actual image:
On the other hand, if this is set to Automatic, the data is distorted to fill the axes:
For data cubes, the slider(s) used to move through slices along the extra dimension(s) now includes the ability to manually specify the slice to move to, as well as buttons to step through slices, and go to the first or last slice:
Finally, when extracing a spectrum/profile from a data cube, the box used to extract the spectrum can now be moved around by pressing the control key and dragging the box around, resulting in the spectrum/profile being updated in real time.
For anyone developing custom data factories, the
can now accept a
priority= argument that should be set to a positive
integer value (with the default being zero). This priority is then used in
case of multiple data factories being able to read a given file. For example,
if you are develop a data factory that reads FITS files in a special way, and
want it to take precedence on all other data factories, you can set the
priority to a large value.
Experimental support for PyQt5¶
Python 2.6 support¶
This will be the last major release to support Python 2.6. Future releases will support only Python 2.7 and 3.3 and above.
In addition to the new features described above, we have made a number of internal improvements to the code structure, and have fixed a number of usability bugs reported by users.
What’s new in Glue v0.5?¶
Python 3 compatibility¶
Glue v0.5 is now fully compatible with Python 2.6, 2.7, and 3.3 and later.
Installation with conda¶
If you make use of Anaconda or Miniconda, Glue can now be installed very easily by doing:
conda install glueviz
This will install glue itself as well as all of the required and many optional dependencies.
Glue v0.5 includes a number of new features, in particular:
- The ability to include a copy of all datasets in
.glusession files, to make it easier to exchange session files with other users. When saving a session file, choose the option to include all data from the drop-down menu:
- The ability to write and register custom data importers, as well as custom menubar tools.
- An improved interface for creating new components, including tab-completion and color highlighting of component names.
- The ability to pass
HDUListobjects when using
- The ability to define floating-point and text parameter boxes when defining custom viewers.
- Support for more coordinate frames for the Astronomy coordinate system transformations.
- The ability to drag existing selection regions by pressing ‘control’, selecting a selection, and moving it around.
In addition to the new features described above, we have made a number of internal improvements to the code structure, and have fixed a number of usability bugs reported by users.