Saving SED Data in Iris
This thread describes how to save the SED data currently displayed in the Iris Visualizer to file, as well as record fitting sessions and fitted model parameters, images, and integrated flux calculations to file. This also explains how data can be exported to other programs. Saved SED data and fitting session files may be read back into the application at a later time to restore the analysis session.
Last Update: 05 Aug 2013 - added "Save Plot Image to File", "Save Integrated Flux" and "Export SED Data to External Applications" discussions
- Saving SED Data to File
- Saving Fitted Model Data
- Saving Plot Image to File
- Saving Flux Calculations from SED Integration
- Exporting SED Data to External Applications
The SED Builder has the capability to save separate SED segments from various locations as one aggregate SED. The X and Y (spectral coordinate and flux) data values comprising the currently displayed SED data segment(s) in the Iris Visualizer, along with associated metadata, may be saved to a file in one of the following formats:
- VOTable (.vot) - XML standard for the interchange of data represented as a set of tables. Consists of an unordered set of rows, each of a uniform structure, as specified in the table metadata. Each row in a table is a sequence of table cells, and each of these contains either a primitive data type, or an array of such primitives.
- FITS (.fits) - consists of a series of Header Data Units (HDUs), each containing two components: an ASCII text header and the binary data. The header contains a series of header keywords that describe the data in a particular HDU and the data component immediately follows the header.
In order to write your SED data to file, simply select one of the two "Save" menu options in the SED Builder window: use the one at the top to save all open SED segments together, or the "Save" option in the "Segments" section to save a single segment to file. Doing so will open a small window where you can enter a filename and file format, VOT or FITS.
You have the option to save the data as a "Single Table." Checking this box will save all the SED segments in that aggregate SED as one, full SED, without any distinction between segments. Tables are saved with the spectral, flux, error and original flux columns; the metadata is not saved. This makes the data more compliable for use in external applications. The user supplies the desired X and Y units for the new SED from the drop-down menus; this converts all SED segments to the same units.
If you do not check the "Single Table" box, all the SED segments will remain as individual spectro-photometric segments with their original units and metadata. Iris copies the metadata from the input SED files to the saved output file. One caveat is that external programs that cannot read metadata may have trouble loading the data, in which case the "Single Table" option should be checked.
Saved SED data may be opened in a future session of Iris simply by selecting the Load File icon on the Iris desktop, and then using the Location on Disk option in the data-loading window which opens.
Note: You do not need to write the extension (.vot or .fits) to load the file back into Iris, but Iris will not add the extension after the filename for you.
Note: If you accidentally exit the SED Builder window or Iris Visualizer, your data will still be there; just click on the SED Builder/SED Viewer icon to restore the SEDs. However, if you wish to revisit the SED data in a later Iris session, you must save the data before exiting Iris.
After fitting a model to SED data in Iris, the model X and Y data arrays may be saved separately from the source data by selecting the "Save" option in the Iris Fit window after finalizing a fit, and prior to exiting the fitting session with the "Dismiss" button (see the "Modeling and Fitting SED Data" section of the Iris How-to Guide for details). Saved custom fit parameters may be restored in a future Iris session by opening the saved CDB-format file from within the Iris Fit window, using the File->Read from File menu option.
Selecting File -> Write to text file, instead, saves the model data to a human-readable text file. The saved model values contained in such a text file would appear in the format shown below.
% more bpl_active_comps.txt File: Sed0 Fri Jun 15 16:35:05 EDT 2012 Iris 2.0 TARGNAME: 3C 273 Fit parameters: Final fit statistic: 0.01153118077229248 Reduced statistic: nan Probability [Q-value]: nan Degrees of freedom: 447.0 Data points: 450 Last function evaluation: 342 Component 1: brokenpowerlaw F refer = 5000.0 angstroms ampl = 0.008196716 index1 = 0.040695254 index2 = -0.18412833
The SED data currently displayed in Iris may be printed to a hardcopy image in either JPG (.jpg), PNG (.png), GIF (.gif) or BITMAP (.bmp) format, by selecting File->Save plot to image file, and making the desired image format selection. The image will scale to the size and shape of the plot in the Iris Visualizer. Below is an example image saved in JPG format.
Under the "Shift, Interpolate, Integrate" icon, you can calculate the flux through a user-inputted passband or through one of the pre-loaded photometry filters (see Integration of SEDs in Iris in the "Shifting, Interpolating and Integrating SED Data in Iris" thread for more information). You have the option to save any or all of the calculated fluxes in ASCII format by highlighting the ones you wish to save; clicking "Save" without highlighting any of the Results will save all fluxes. You can convert the calculated fluxes and effective wavelengths/passbands into whichever units you want by using the X and Y drop-menus. Below is an example of the ASCII file displaying the output file:
% more ngc7714_interp_flux.ascii # Iris Flux Integration output # This file was generated by Iris, the VAO SED building and analysis tool # # # File created on Tue Jul 02 10:46:35 EDT 2013# # # Effective Wavelength in Hz # Flux in Jy # # EffectiveWavelength Flux 6.42721074261295E13 0.29712741929699993 1.9607843137254902E12 1.9663344315100003E7 1.213123221986972E12 3.08233702331 6.042903064713391E11 0.36357631321600004 1.996007984031936E11 2.3297399680000003E7
Simple Application Messaging Protocol (SAMP) allows separate programs to communicate with each other. Iris uses SAMP to communicate with other SAMP-enabled applications, such as TOPCAT and Aladin. So long as the SAMP status in the lower left-hand corner of the Iris desktop says "connected", we can transmit tabular data back-and-forth between Iris and other SAMP-enabled Virtual Observatory programs.
Iris exports data to outside applications via the "Broadcast" button. Iris can broadcast data from the SED Builder, which allows us to send the metadata for SED segments and aggregate SEDs, and from the Metadata Browser, from which we can select specific data points to send. The SED Builder window has two "Broadcast" buttons: one at the very top of the window, which allows for the highlighted SED in the Open SEDs box to be exported, and one in the Segments section, which allows one or multiple SED segments to be broadcasted; its icon is a radio tower. The Metadata Browser "Broadcast" button is in the bottom right-hand corner of the window.
With the external application open and connected to the SAMP network, highlighted SED segments or data points may be broadcasted from Iris to the external application. In the example below, we have loaded an SED of M82 from NED in Iris, highlighted the SED segment in the Segments section, and exported the data to TOPCAT by clicking on the highlighted "Broadcast" button in the SED Builder window. We view the table in TOPCAT by clicking Views -> Table Data.
See "Transmitting Data from a SAMP-enabled Application" for an example of exporting SED data from the Metadata Browser in Iris to TOPCAT.
|08 Aug 2011||updated for Iris Beta 2.5|
|25 Sep 2011||updated for Iris 1.0|
|15 Jun 2012||updated for Iris 1.1|
|02 Jan 2013||updated for Iris 1.2|
|02 Jul 2013||updated for Iris 2.0|
|05 Aug 2013||added "Save Plot Image to File", "Save Integrated Flux" and "Export SED Data to External Applications" discussions|