[CXC logo]
Skip to the navigation links
Last modified: 27 Nov 2012

URL: http://cxc.harvard.edu/iris/threads/plot/thread.html

Visualizing SED Data in Iris

Iris Threads


Overview

Synopsis:

The Iris GUI is an adaptation of the Specview (STScI) spectral visualization and analysis GUI, and as a result is equipped with several of the data display preferences and editing capabilities offered by that application. This thread presents the various options available for interacting with and customizing the SED data display in the Iris Visualizer.

Note: As most Specview features remain unchanged between the standard and the Sherpa-enabled Iris version, the documentation provided in the Specview help documentation serves as an exhaustive reference for most of the data visualization features in Iris.

Last Update: 27 Nov 2012 - updated for Iris 1.2


Contents


Introduction

When SED data is read into Iris, it displays in the Iris Visualizer, where you can interact with the data plot in various ways. The options available for customizing the data display are described in this thread.

[Iris screenshot image]

When multiple segments and/or photometric points have been read into the Iris session and coplotted in the main display, it is important to note that the spectral data are not combined, coadded, or spliced in memory in any way; the raw data from the multiple input spectrograms/points is completely preserved in the resulting combination. This means that two separate SED data segments loaded into Iris for a particular source - e.g., observed with two different observatories and spanning separate (or overlapping) spectral ranges - may be offset from one another, as Iris does not scale, trim, and join the separate segments to form a seamless SED for the source. This is illustrated in the image below.

Iris GUI snapshot[]

Setting Display Preferences

Adjusting the coordinates view port

The set of widgets in the upper-left corner of the data display are available for adjusting the view and orientation of the SED segment(s) within the main display.

[Iris screenshot image] Auto/fixed coordinates - automatically scale the coordinates view port to fully encompass the data each time the plot is refreshed; or, fix the coordinates view port so that all subsequent plot refreshes that result from a data change will take place on a fixed coordinates view port.
[Iris screenshot image] Reset - set the coordinates view port to a full view of the data.
[Iris      screenshot image] Reset to central data - set the coordinates view port to a central view of the data, with edges discarded. The central third of the wavelength span of the data is used to normalize the view port.
[Iris screenshot image] Back - return to the previously used coordinates view port. Successive application of this function causes a walk back throughout the coordinates view port history.
[Iris    screenshot image] Zoom out/in - zoom out/in by 20%
[Iris screenshot image] Move left/right - move the coordinates view port to the left/right
[Iris screenshot image] Expand - expand the coordinates view port in the X direction only.


Refreshing the Data Plot

[Iris screenshot image]

The "Redraw" button is available within the Iris main display for refreshing the data plot, e.g., to clear any visual garbling or crosshair cursor leftovers which arise under certain combinations of computer platform and CPU speed.



Units

[Iris screenshot image]

The preferred units for the data display, e.g., "ergs/cm2/s/angstrom" versus "angstrom", may be set using either the "Units" or "Flux density" buttons in the upper-right corner of the main display.

The "Flux density" selection box allows you to choose the type of spectral quantity to be displayed on the Y axis, either "Flux density" or "Flux", and also enables the selection of units for the spectral axis quantity. Once a selection is made, a dialog box populated with all available physical units appropriate for that quantity, will pop up (this pop-up box matches the "Units" selections). Selecting the desired units and clicking on the "Apply" button adjusts the data display to the desired preference.

[Iris screenshot image]


Axis Scale

[Iris screenshot image]

The scale of the data plot axes in the Iris main display can be changed using the "Plot Type" button, or by clicking the cursor near any one of the four corners of the display; this will open a small window in which the X and Y axes scale may be set to linear or logarithmic (regular or extended).



Grid

[Iris screenshot image]

Selecting the "Grid" option in the main display overlays a coordinate grid onto the main plot.

[Iris screenshot image]


Displaying Metadata and Data Values

Clicking the "Metadata" button in the upper-right corner of the Iris display opens a window with tabs containing different levels of data and metadata in the SED.

Point Metadata tab

[Iris screenshot]

When available, the Metadata tab includes many useful pieces of information about the data points currently displayed. When a SED is imported from NED, as in the example considered in this thread, the metadata includes such things as the bibliographic reference code for each data point, the spectral range covered by instrument used to obtain data point, data point uncertainty and flux values as they are published, data point significance values, among other properties. The full list of metadata information available for each data point will depend on the specific data sources.

The metadata table may be sorted by clicking the header of the column by which you would like to sort - once for ascending order, twice for descending order, and three times to restore the default sorting - and rearranged by clicking and dragging columns left or right. A nested sort may be achieved by first selecting the column which will set the master sort, clicking and holding the Control key, and then selecting the column by which to sort the groups of the master sort.

Segment Metadata tab

Metadata that is common to all data points in a SED segment is displayed under this tab, in a similar table as the one that appears under the Point Metadata tab.

Data tab

[Iris screenshot]

The X and Y coordinate values of each SED data point in the Iris display are contained in the "Spectral Axis" and "Flux Axis" columns of the Data tab in the Metadata window, and reflect the values as they were imported into Iris from NED or uploaded from a file on your hard disk - i.e., not what is currently plotted in the Iris display (in the event that you changed the units of the data plot within the display). For example, if the data were uploaded in Jansky flux units versus frequency in Hertz, but then you change the display units to ergs/s/cm2/Angstrom versus Angstrom, the data point values returned will be in Jansky flux units and Hertz.


Selecting and Masking SED Data Points

Data points can be masked, or 'grayed out' from the Iris plot display with a number of tools. The most basic works by simply selecting the rows corresponding to these points in any one of the Point Metadata, Segment Metadata, or Data tabs of the Metadata window, and then click "View un-selected" at the bottom of that window. In the display, the points selected in the Metadata window will appear fainter than the unselected points.

[Iris screenshot] [Iris screenshot]

The "View selected" button performs the reverse operation, and the "Restore" button restores the plot display to its original state. The "Un-select" button removes the selection state from all rows in the table, without affecting the plot display.

Note that these data masking operations relate to the display only. Internally, masked data is kept intact and will be used in data analysis and modeling performed by Iris. To really get rid of unwanted data, please refer to section 'Extracting a Filtered SED' below.

Data point selection can also be performed based on the plot itself, instead of the table. One way to do that is by clicking on a specific data point on the display. The corresponding row in both the Point Metadata and Data tables will be selected. This selection is non-destructive, meaning that by successively clicking on points on the display, one can add the rows corresponding to each one, to the set of selected rows.

Another way is by zooming over the region that contains the points one wants to select, and then clicking the "Select from plot" button on the Metadata window. The table rows corresponding to the data points that show up inside the plot viewport will be added to the selected set of rows already on the table.

[Iris screenshot] [Iris screenshot]

Selection by Boolean operations

The Point Metadata table can be hierarchically sorted by clicking on specific column headers. Clicking once sorts the rows in ascending order of that column; next click sorts it in descending order, and the next click places the rows back on their original ordering. By holding the Ctrl key pressed when clicking on a column header, the sorting state of previously sorted columns is kept unchanged, thus enabling hierarchical sorting.

Using that mechanism, rows can be re-ordered together according to relatively complex selection criteria against column content. This facilitates the lumping together of the desired rows, that can in turn be selected and operated upon with the tools described in the preceding paragraph.

Note that columns can be re-positioned at will by dragging their headers horizontally.

Note also that string-valued columns are treated in lexical order. Integer and floating-point-valued columns are treated in numerical order.

In order to enable even more complex selection criteria though, table rows can be selected based on the result of an arbitrary Boolean expression computed on selected column contents. This expression is entered in the 'Type boolean expression:' text field, and by hitting Return, or clicking on the 'Select points' button, the expression is computed for every row in the table, and the row is selected if the Boolean result is True.

Iris uses a Python interpreter to parse and execute the expression, thus the syntax for this expression is plain Python. All Python built-in and string functions are supported. See the Python documentation here: http://docs.python.org/2/library/functions.html http://docs.python.org/2/library/string.html#string-function

In the expression, columns are referred by their name prefix. Notice that each column name starts with a lower-case letter followed by a colon (':'). This is the prefix one should use in the expression to refer to the column.

An example of a valid expression that can be applied to the NED-supplied SED for 3C 066A could be:

l: > 1.0 and c:.rstrip().endswith('reported')

In this SED, column l: contains the DataFluxPublishedValue metadata property, a floating point value, and column c: contains the DataSignificance metadata property, a string.

Of course, in this very simple example the same selection could be accomplished by just sorting the table by column c: first, and then holding the Ctrl key and sorting by column l:. The desired rows would be easy to spot as a single group or contiguous rows, and could be selected with a simple mouse gesture.


Extracting a Filtered SED

The "Extract" function in the Metadata window allows you to go one step further than simply masking unwanted data points; it allows you to extract a whole new SED consisting of only the selected data points.

[Iris screenshot]

Making the desired row selections in the Metadata window and then clicking "Extract" will open a new SED in the SED Builder window named "FilterSED" - an ID which you can change - which will display in the Iris Visualizer.

[Iris screenshot]

Coloring data points based on metadata

The drop selector at the right bottom of the Point Metadata and Data tabs allows one to pick a specific column and have Iris paint each data point on the display with a color that linearly maps into the data range of the chosen column.

Floating point columns are mapped continuously into color space. Integer and string valued columns are mapped in such a way that the number of different colors used in the plot is the same as the number of unique values in the column. String-valued columns are mapped lexically into color space.

The color space is defined here


Simple aperture correction

By right-clicking (Ctrl-click on MacOS) on a specific data point on the Iris display plot, a window containing information for that point is brought to screen. The window contains tabs that display similar information as described above for the Point Metadata, Segment Metadata, and Data tabs for the entire SED, but relative to the selected point only.

This window has an extra tab named 'Aperture Correction' that enables one to apply a simple multiplicative flux correction to the data point.

By entering either the desired flux, or the ratio of the desired flux to the original flux, and clicking the appropriate button, the data point flux will be modified. Iris keeps the original flux so successive applications of this tool will not cause the original flux value to be lost. In that way, we can always assign a precise meaning to the ratio value.

The correction can be applied as well to the entire segment to which the point belongs to. Just select the Segments radio button and enter the desired flux ratio.

One can also apply a flux correction by directly dragging the desired point on the Iris display plot, holding the Shift key down while dragging. Note that this feature is always enabled, even when no Aperture Correction window is on screen.


History

08 Aug 2011 updated for Iris Beta 2.5
26 Sep 2011 updated for Iris 1.0
12 Jun 2012 updated for Iris 1.1
27 Nov 2012 updated for Iris 1.2

Return to Threads Page: Top | All | Intro

Last modified: 27 Nov 2012
[CXC logo] [Smithsonian Institute]
[VAO] [NED] [STScI]
[NSF] [NASA] AUI AURA
Copyright 2011-2014 VAO, LCC
Copyright 2015 Smithsonian Astrophysical Observatory