Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/AstroStat/HEAD2004/presentation_aneta.pdf
Дата изменения: Fri Oct 15 02:13:09 2004
Дата индексирования: Tue Oct 2 05:06:43 2012
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п
Sherpa

Aneta Siemiginowska

1

SHERPA
CIAO's Modeling and Fitting Application

Aneta Siemiginowska

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

2

Modeling and Fitting Software
XSPEC - analysis of 1D X-ray data (imaging + grating) ISIS and Pint of Ale- primarily for analysis of highresolution (ie grating) X-ray data Sherpa - generalised multi-dimensional fitting package All programs use the technique of forward fitting:
a model is evaluated, compared to the actual data, and then the parameters are changed to improve the match. This is repeated until convergence occurs.

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

3

What can you do in Sherpa?
Standard PHA based analysis. Model data in many spectral bands simultaneously, e.g., optical/ Xrays. Access ATOMDB and GUIDE/ISIS for grating data analysis. Fit radial profiles. Simulate 1D data. Model 2D image data, e.g., fit surface brightness of the extended source. Get normalization of your PSF, while fitting the data with 1D/2D PSF. Use the PSF as a convolution kernel in the 2D image analysis(FFT or sliding cell). Convolution using the TCD library kernel. Use of exposure maps in the image analysis. Jointmode data: spatialspectral, spatialtiming Use scripts based on Sherpa only commands. Use Slang on command line and in Slang based scripts. Slang allows you to access directly the internal information about the data, models, statistics. Use your own models with User Models and Slang user models. CXC
Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa Combined to create a Sourc

Aneta Siemiginowska

4

A set of Models

e Expression Model Parameters

Instrument Stack (ARF&RMF for PHA data
Exposure Map and/or PSF for an image, NONE for radial profile)

What happens in Sherpa?

Add on the

Background Stack
(with Errors)

Input Data

Predicted Data

Compare

Fit Statistics
CXC

Optimization

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

5

Main SHERPA Components
Data Input/Output. Visualization through ChIPS and ds9 Model library and model language. Statistics and Error Analysis. Optimization Methods. Access to the internals through Slang.

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

6

Data Input/Output
General use of data type and dimensionality. Supported types of files: ASCII, FITS binary tables and Images,PHA types I \& II, IRAF IMH and QPOE files Sherpa:
groups the data if appropriate; treats integer, float or double precision data; supports data of arbitrary dimensionality

I/O interface through Data Model and Varmm Filtering while reading the data. Input data on the command line in two ways.
CXC
Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

7

MODELS
Three main type of models:
Source Background Instrument

Model library consists of several models (plus XSPEC v.11) which can be used to define a source or background model There are different types of instrument models to support both 1D and 2D analysis. Instrument models are convolved with Source and Background models before the model predicted data is compared with the observed data. Instrument and Background models are NOT required. Source models have to be defined for fitting.

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

8

Fit Statistics in Sherpa:
Sherpa has a large array of statistics appropriate for analyzing Poissondistributed (i.e. counts) data.

·Statistics based on 2 :
­ ­ ­ ­ ­ C C C C C HI GEHRELS HI DVAR HI MVAR HI PARENT HI PRIMINI

·Statistics based on the Poisson likelihood:
­ CASH ­ BAYES If the data are not Poissondistributed (i.e. fluxes), then alternatives include: leastsquares fitting: setting all variances to one providing errors in an input file. CXC
Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

9

Optimization in Sherpa
Optimization => minimizing the statistics ( the thawed parameters of the model.
2

or log L) by varying

Find a local minimum:
LEVENBERG-MARQUARDT POWELL SIMPLEX

Fast, but not appropriate for finding the global minimum of a complex statistical space when starting from a random point

Attempt to find the global minimum:
GRID GRID-POWELL MONTECARLO MONTE-LM MONTE-POWELL SMULATED ANNEALING

Computationaly intensive algorithms designed to search comlicated statistical surfaces.

Optimize/Reject/Filter:
SIGMA-REJECTION outliers are filtered from the data.

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

10

Confidence Intervals
Vary a parameter's value, while holding the values of all the parameters to their bestfit values, until the fit statistic increases by some preset amount from its minimum value ( 2 = 1 for 1 ).

Uncertainty Projection
Calculate Covariance matrix:
1 confidence intervals are given by C
i,i



where

Cj,i = I

1 i,j

and Ii,j the information matrix computed at the bestfit point:

2 2 Ii,j = pipj
CXC



or any other statistics

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

11

Visualize Confidence Levels
Data and the Best Fit Model Underpredicted

Uncertainty

Projection Well behave parameter space!

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

12

Customize Sherpa
Sherpa State Object (e.g. Configuration file) ­ Slang variable initialized at the start of the Sherpa session:
sherpa> print(sherpa) plot = sherpa_Plot_State dataplot = sherpa_Plot_State fitplot = sherpa_FitPlot_State resplot = sherpa_Plot_State multiplot = sherpa_Draw_State output = sherpa_Output_State regproj = sherpa_VisParEst_State regunc = sherpa_VisParEst_State intproj = sherpa_VisParEst_State intunc = sherpa_VisParEst_State proj = sherpa_Proj_State cov = sherpa_Cov_State unc = sherpa_Unc_State con_levs = NULL modeloverride = 0 multiback = 0 deleteframes = 1 clobber = 0

Customize Plotting Customize Confidence Levels
sherpa> print(sherpa.regproj) fast = 1 expfac = 3 arange = 1 min = Double_Type[2] max = Double_Type[2] log = Integer_Type[2] nloop = Integer_Type[2] sigma = Double_Type[3]



CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

13

Customize Sherpa
Sherpa Resource File:
a text file with Sherpa/Chips/Slang commands

Access:
Environment variable SHERPARC File .sherparc in current directory $PWD File .sherparc in HOME directory $HOME

Example:


unix% more .sherparc # Example Sherpa resource file message("Starting to process sherparc") paramprompt off method simplex define q () { () = sherpa_eval("quit"); } message("Finished processing .sherparc")

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004


Sherpa

Aneta Siemiginowska

14

Learn More on Sherpa Web Page
http://cxc.harvard.edu/sherpa/

CXC

Astrostatistics Workshop, HEAD meeting, New Orleans, Septemter 2004