Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.adass.org/adass/proceedings/adass96/reprints/does.pdf
Дата изменения: Wed Jan 14 23:20:46 1998
Дата индексирования: Tue Oct 2 09:38:01 2012
Кодировка:

Поисковые слова: m 17
Astronomical Data Analysis Software and Systems VI ASP Conference Series, Vol. 125, 1997 Gareth Hunt and H. E. Payne, eds.

Fitting and Modeling in the ASC Data Analysis Environment
S. Doe, A. Siemiginowska, W. Joye, and J. McDowell Smithsonian Astrophysical Observatory, 60 Garden Street, MS 81, Cambridge, MA 02138 Abstract. As part of the AXAF Science Center (ASC) Data Analysis Environment, we will provide to the astronomical community a Fitting Application. We present a design of the application in this pap er. Our design goal is to give the user the flexibility to use a variety of optimization techniques (Levenb erg-Marquardt, maximum entropy, Monte Carlo, Powell, downhill simplex, CERN-Minuit, and simulated annealing) and fit statistics (2 , Cash, variance, and maximum likelihood); our modular design allows the user easily to add their own optimization techniques and/or fit statistics. We also present a comparison of the optimization techniques to b e provided by the Application. The high spatial and sp ectral resolutions that will b e obtained with AXAF instruments require a sophisticated data modeling capability. We will provide not only a suite of astronomical spatial and sp ectral source models, but also the capability of combining these models into source models of up to four data dimensions (i.e., into source functions f (E , x, y , t)). We will also provide tools to create instrument resp onse models appropriate for each observation.

1.

Introduction

Fitting models to data is a vital part of the analysis of astronomical data. As part of the ASC Data Analysis Environment, we have designed a Fitting Application. Although other fitting packages (e.g., XSPEC; see Arnaud 1996) exist, the high resolution and sensitivity of AXAF data present new challenges to the modeling and fitting of data; fitting models of the form f (E , x, y , t) is a requirement for our software, and so we have b een comp elled to design our own Fitting Application. This pap er presents a design of the flight version (Release 3) of our Fitting Application. We also discuss a preliminary test of the p erformance of the XRay Calibration Facility (XRCF), Release 1 version of our fitting software (Doe, Conroy, & McDowell 1996).

2.

Design of the Fitting Application Application is shown in Figure 1. The Application is , the Fit Monitor/Navigator. (The modules and tools b e run from outside, without invoking the Navigator.) the progress of the Fitting Engine through parameter 492

The design of our Fitting controlled through a GUI discussed b elow may also As a Monitor, it monitors

© Copyright 1997 Astronomical Society of the Pacific. All rights reserved.


Fitting and Modeling in the ASC Data Analysis Environment
FITTING APPLICATION PREDICTOR
Predictor Commands

493

VISUALIZATION Model Tools
Predictor Commands Predictor Results

MODEL GENERATOR
Profile Status Profile Edits

Predictor Results

Visualization Results

FITTING ENGINE

Visualization commands

CHARACTERIZATION TOOLS

Model Builder Commands

Model Builder
Model Builder Status

PROFILE EDITOR

Model Definition Commands Model Definition Results Request Profile Editor

FIT MONITOR/ NAVIGATOR

Fit Status

Model Definition

Fit Commands

Characterization Results Characterization Commands

Figure 1.

The Fitting Application.

space, and can halt the engine when necessary. As a Navigator, it allows the user to invoke the following utilities: · Fitting Engine. This is the main comp onent, resp onsible for searching parameter space. Given data, a parameterized model, and some convergence criteria, the Engine calculates predicted data values, compares them to the observed data, and searches parameter space for the parameters that yield a "b est fit." The history of the search is recorded in a history file; the "b est predicted data" are also calculated with the b est-fit parameters. The Engine supp orts a variety of fit optimization algorithms, fit statistics, and convergence criteria. · Model Generator and Predictor. The Model Generator has two functions. The Generator allows the user to define a model, by combining simpler models according to the rules imp osed by the modeling language, and by setting the parameters of the model. The Generator also allows the user to build a model, by parsing the modeling language expression and storing the result in a format used by the Predictor. The Predictor may then take a model built by the Model Generator, and calculate predicted data over some data (sub)space. This may involve calls to pre-defined functions (e.g., a Gaussian or a p ower-law), or the execution of a series of external programs, which have b een defined in a profile built with the Profile Editor. · Profile Editor. With the Profile Editor, a profile, listing a numb er of programs, and their order of execution, may b e built. Once such a profile


494

Doe et al. has b een built, it may b e sent directly to the Predictor, which will execute the programs listed in the profile and store the results in a file. Data from that file may then b e sent to Fitting Engine. · Characterization Tools. These tools may b e used to characterize a fit after a fit has b een p erformed. Characterizing a fit may include calculating a "goodness-of-fit," p erforming statistical tests, calculating residuals, or determining some confidence ranges associated with the b est-fit parameters. · Visualization. Finally, the user may examine the results and plot the observed data, the "b est-fit" predicted data, the residuals, and results from other statistical tests, in up to three dimensions. Since the search through parameter space is saved in the history file, it is also p ossible to plot regions of parameter space.

3.

Modeling Requirements

The Fitting Application is required to supp ort the following modeling features: · Empirical Mo dels. These models are analytical, empirical functions (e.g., p olynomial, Gaussian, Lorentzian, p ower-law, etc.), which are not folded through instrument resp onse models. · Astronomical Source Mo dels. These models include a variety of spatial, sp ectral, and temp oral models of astronomical X-ray sources. Sp ectral models from the XSPEC package will also b e available. However, the user may combine spatial, sp ectral, and temp oral models into models capable of modeling a data space of up to four dimensions (e.g., f (E , x, y , t)). · AXAF Instrument Resp onse Mo dels. Astronomical source models may b e folded through AXAF instrument and mirror resp onse models. From the instrument resp onses provided, a resp onse model appropriate for a given AXAF observation may b e generated. Resp onse models appropriate for other missions (e.g., Einstein, ROSAT ) may also b e used. · Modeling Language. Due to the high spatial and sp ectral the AXAF instruments, it is highly desirable to b e able to, models in "joint" spatial-sp ectral modes, which requires a guage sophisticated enough to p ermit users to build such "j 4. Comparison of Optimization Algorithms resolutions of e.g., combine modeling lanoint" models.

We have implemented a Release 1 (XRCF) version of the Fitting Engine; this implementation includes the optimization algorithms listed in the table b elow. The implementation of the Levenb erg-Marquardt algorithm is that contained in Numerical Recip es (1992); for the other algorithms, we have used the OPTIM library (Birkinshaw 1995). In this table, we present the execution time of the Engine, relative to the execution time of the Engine when the simplex algorithm has b een selected. (At present, we are exploring ways to optimize


Fitting and Modeling in the ASC Data Analysis Environment

495

the implementation of these algorithms, particularly the Powell and Levenb ergMarquardt routines.) In each run of the Engine, a 2-D Gaussian was fit to an array of 900 data p oints. We also present the numb er of lines of code for the implementation of each algorithm.

Table 1. Algorithm

Comparison of Optimization Algorithms. Execution Time
a

SLOCs 233 1058 332 163 977 814 259 265 1073 1079 368

b

grid search grid search + Powell Levenb erg-Marquardt Monte Carlo Monte Carlo + Powell Powell simulated annealing (1) simulated annealing (2) simulated annealing (1) + Powell simulated annealing (2) + Powell simplex
a b

1.6 2176.0 3.0 2.7 477.0 13.3 249.6 389.4 272.4 202.2 1.0

Relative to execution time for simplex. Source lines of code.

Acknowledgments. This pro ject is supp orted by NASA contract NAS839073 (ASC). We would like to thank Mark Birkinshaw for making his OPTIM library available at the ASC; we also thank Michael Wise and Antonella Fruscione for many fruitful discussions. References Arnaud, K. A. 1996, in ASP Conf. Ser., Vol. 101, Astronomical Data Analysis Software and Systems V, ed. G. H. Jacoby & J. Barnes (San Francisco: ASP), 17 Birkinshaw, M. 1995, CfA internal memo Doe, S., Conroy, M., & McDowell, J. 1996, in ASP Conf. Ser., Vol. 101, Astronomical Data Analysis Software and Systems V, ed. G. H. Jacoby & J. Barnes (San Francisco: ASP), 155 Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. 1992, Numerical Recip es, 2nd ed. (Cambridge, Cambridge University Press), 387