Data Implementation (Model)
Redesign Home Problem Fitting Plotting Data Modeling CCfits

The Data implementation deals with all of the objects representing data. DataSet objects represent data files that contain one or more spectra–these map naturally to OGIP format Type I and Type I files.

The DataSet class is an abstract type. It corresponds to a data file when a file format implementation is added to its interface by inheritance. Thus the DataSet is designed to support arbitrary input formats, as long as the files contain X-Ray spectra for analysis. Support for new formats can be implemented by writing a new IO interface class.

Reading and writing from files of different format (i.e. OGIP standard or other) is implemented in separate classes which act as IO interfaces. Typically these perform fitsio operations using the CCfits library. However, it is possible to support any data format so long as the files written in that format contain the data XSPEC needs to function. The task of determining which kind of objects to produce depending on the format of the data file is implemented using the Abstract Factory and Prototype patterns.

The basic unit of analysis is the SpectralData type, which in turn references objects of type Background and Correction representing background data and correction files.

The Data classes also implement Response objects, which contain RMF objects and ARF arrays. RMFs, which are the largest objects in the data domain, are reference counted and unique up to filename and grouping vector

Response supports two abstract subtypes: RealResponse, which implements detector responses comprised of a single RMF (the normal case) and MultiResponse, which allows for Responses to be composed of linear combinations of RMFs. MultiResponse is a new facility, which supports the Integral/SPI instrument, but may well be useful in future missions. As is the case for DataSet, the Response classes are made concrete by inheriting from a separate IO interface class. The third, a concrete subtype, is DummyResponses which are generated by the user for testing and plotting purposes.

[Redesign Home]
[Design]
[Problem]
[Scripting]
[Compatibility]

Xspec Xspec Home Page


HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 02-Mar-2011 11:28:48 EST

HEASARC Staff Scientist Position - Applications are now being accepted for a Staff Scientist with significant experience and interest in the technical aspects of astrophysics research, to work in the High Energy Astrophysics Science Archive Research Center (HEASARC) at NASA Goddard Space Flight Center (GSFC) in Greenbelt, MD. Refer to the AAS Job register for full details.