forked from sherpa-deproject/deproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixing.txt
56 lines (41 loc) · 2.16 KB
/
mixing.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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.