forked from sherpa-deproject/deproject
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aldcroft
committed
Apr 29, 2009
1 parent
ea99234
commit eb343bc
Showing
2 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|