[CXC logo]
Skip to the navigation links
Last modified: 25 Sept 2011

URL: http://cxc.harvard.edu/iris/v1.0/threads/save/thread.html

Saving SED Data in Iris

Iris Threads


Overview

Synopsis:

This thread describes how to save the SED data currently displayed in Iris to a file in one of the supported formats, fitted model data to a text file, and the main display to an image file. An Iris output file containing SED data may be read into the application at a later time to restore the session.

Last Update: 25 Sep 2011 - updated for Iris 1.0


Saving SED Data to File

The X and Y (spectral and flux) data values comprising the currently displayed SED data segment(s), along with associated metadata, may be saved to a file in one of the following formats:

  • VOTable (.vot) / XML (.xml) - 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, select the appropriate "File->Save as" menu option; for example, to write in FITS format, select "File->Save as FITS". A save window will open where you can enter a filename or browse to select a file.

Iris copies the metadata from the input SED file to the saved output file. When multiple input files are plotted together in the main display, the output file contains the merged metadata from all input files together. The goal is to allow the SED builder to gather separate SED data segments from various places and save them together as an aggregate SED which complies with the IVOA Spectrum V1.03 model.

Saved SED data may be opened in a future session of Iris simply by selecting the File->Read from File option.

Saving Data Images

The SED data currently displayed in Iris may be printed to a hardcopy image in either JPG (.jpg), PNG (.png), GIF (.gif), BITMAP (.bmp), WBITMAP(.wbmp) format, by selecting File->Print to image file, and making the desired image format selection.

There is also the option to generate a printed hardcopy of the Iris main plot area via the "Print main display" option in the File menu, which is available for both imported data and data read from file.

Saving Fitted Model Data

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: 3c273.xml

Fri Sep 23 12:59:08 EDT 2011  Iris 1.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                   
             

History

08 Aug 2011 updated for Iris Beta 2.5
25 Sep 2011 updated for Iris 1.0

Return to Threads Page: Top | All | Intro

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