Skip to content

Commit

Permalink
Add text about mixing models
Browse files Browse the repository at this point in the history
  • Loading branch information
aldcroft committed Apr 29, 2009
1 parent ea99234 commit eb343bc
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
#html_split_index = False

# If true, the reST sources are included in the HTML build as _sources/<name>.
#html_copy_source = True
html_copy_source = False

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
Expand Down
56 changes: 56 additions & 0 deletions docs/mixing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Mixing models
----------------------
The source model created in :mod:`deproject` is just a special case of the
general class of mixing models where::

source_model[i] = Sum_j(M[i,j] * model_component[j])
M[i,j] = mixing matrix

The Sherpa model language implementation allows definition of models using
normal python addition and multiplication operators (+ and *) on model
component objects. This is very powerful because it means that
complex models can be created using normal programming syntax. For example::

create_model_component('xswabs', 'gal_abs') # galactic absorption
create_model_component('xszwabs', 'zabs') # galactic absorption
create_model_component('xsmekal', 'mekal') # galactic absorption
create_model_component('gauss1d', 'line') # galactic absorption
create_model_component('gauss1d', 'line2') # galactic absorption

source_intr = zabs * mekal + line
source_obs = gal_abs * source_intr

Expanding on this and allowing for mixing via matrix multiplication, one could
generate a cluster deprojection model that allows for variable absorption in
each annulus with something like the following::

dep = Deproject(radii)
n_annuli = len(radii)-1
n_shell = dep.nshell

# Make a normal Sherpa absorber model called gal_abs
create_model_component('xswabs', 'gal_abs')

# Make a stack of redshifted absorption models for each annulus
cluster_abs = ModelStack('xszwabs', n_annuli)
cluster_abs.redshift = 0.5

# Make a stack of thermal emission models for each shell
cluster_mekal = ModelStack('xsmekal', n_shell)

# Make the mixing model as volume normalization matrix * emission model stack
cluster_emission = dep.vol_norm * cluster_mekal

# Account for different absorption in each annulus by multiplying
# (element by element) the two ModelStacks
cluster_emission_absorbed = cluster_abs * cluster_emission

# Create final observed model after galactic absorption.
cluster_observed = gal_abs * cluster_emission_absorbed

This would make a stack of source models that can then be used to fit a stack
of data.

Full design and implementation of this concept is in work. Interested parties
should contact the author for updates or to provide comments.

0 comments on commit eb343bc

Please sign in to comment.