fritz2006.py 5.16 KB
Newer Older
1
2
3
4
5
6
7
8
9
# -*- coding: utf-8 -*-
# Copyright (C) 2013, 2014 Department of Physics, University of Crete
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Laure Ciesla

"""
Fritz et al. (2006) AGN dust torus emission module
==================================================

10
This module implements the Fritz et al. (2006) models.
11
12
13
14
15
16
17
18
19
20
21

"""

from collections import OrderedDict
from pcigale.data import Database
from . import CreationModule


class Fritz2006(CreationModule):
    """Fritz et al. (2006) AGN dust torus emission

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    The AGN emission is computed from the library of Fritz et al. (2006) from
    which all of the models are available. They take into account two emission
    components linked to the AGN. The first one is the isotropic emission of
    the central source, which is assumed to be point-like. This emission is a
    composition of power laws with variable indices, in the wavelength range of
    0.001-20 microns. The second one is the thermal and scattering dust torus
    emission. The conservation of the energy is always verified within 1% for
    typical solutions, and up to 10% in the case of very high optical depth and
    non-constant dust density. We refer the reader to Fritz et al. (2006) for
    more information on the library.

    The relative normalization of these components is handled through a
    parameter which is the fraction of the total IR luminosity due to the AGN
    so that: L_AGN = fracAGN * L_IRTOT, where L_AGN is the AGN luminosity,
    fracAGN is the contribution of the AGN to the total IR luminosity
    (L_IRTOT), i.e. L_Starburst+L_AGN.
38
39
40
41
42
43

    """

    parameter_list = OrderedDict([
        ('r_ratio', (
            'float',
44
45
            "Ratio of the maximum to minimum radii of the dust torus. "
            "Possible values are: 10, 30, 60, 100, 150.",
46
            60.
47
48
49
        )),
        ('tau', (
            'float',
50
51
            "Optical depth at 9.7 microns. "
            "Possible values are: 0.1, 0.3, 0.6, 1.0, 2.0, 3.0, 6.0, 10.0.",
52
            1.0
53
54
55
        )),
        ('beta', (
            'float',
56
            "Beta. Possible values are:-1.00, -0.75, -0.50, -0.25, 0.00.",
57
            -0.50
58
59
60
        )),
        ('gamma', (
            'float',
61
            "Gamma. Possible values are: 0.0, 2.0, 4.0, 6.0.",
62
            4.0
63
64
65
        )),
        ('opening_angle', (
            'float',
66
67
            "Full opening angle of the dust torus (Fig 1 of Fritz 2006)."
            "Possible values are: 60., 100., 140.",
68
            100.
69
70
71
        )),
        ('psy', (
            'float',
72
73
            "Angle between AGN axis and line of sight (Fig 2 of Fritz 2006)."
            " Psy = 90◦ for type 2 objects and Psy = 0◦ to type 1. Possible values are: "
74
75
            "0.001, 10.100, 20.100, 30.100, 40.100, 50.100, 60.100, 70.100, "
            "80.100, 89.990.",
76
            50.100
77
78
79
        )),
        ('fracAGN', (
            'float',
80
            "AGN fraction.",
81
            0.1
82
83
84
85
86
87
88
89
90
91
92
93
94
95
        ))
    ])

    out_parameter_list = OrderedDict([
        ('fracAGN', 'Contribution of the AGN'),
        ('L_AGN', 'Luminosity of the AGN contribution')
    ])

    def _init_code(self):
        """Get the template set out of the database"""
        r_ratio = self.parameters["r_ratio"]
        tau = self.parameters["tau"]
        beta = self.parameters["beta"]
        gamma = self.parameters["gamma"]
96
97
        opening_angle = (180. - self.parameters["opening_angle"]) / 2.
        psy = 90. - self.parameters["psy"]
98
99
100

        with Database() as base:
            self.fritz2006 = base.get_fritz2006(r_ratio, tau, beta, gamma,
101
                                                opening_angle, psy)
102
103
104
105
106
107

    def process(self, sed):
        """Add the IR re-emission contributions

        Parameters
        ----------
108
109
        sed: pcigale.sed.SED object
        parameters: dictionary containing the parameters
110
111
112
113

        """

        if 'dust.luminosity' not in sed.info.keys():
114
            sed.add_info('dust.luminosity', 1., True)
115
116
117
118
119
120
121
122
123
124
125
126
127
128
        luminosity = sed.info['dust.luminosity']

        fracAGN = self.parameters["fracAGN"]

        sed.add_module(self.name, self.parameters)
        sed.add_info('r_ratio', self.parameters["r_ratio"])
        sed.add_info('tau', self.parameters["tau"])
        sed.add_info('beta', self.parameters["beta"])
        sed.add_info('gamma', self.parameters["gamma"])
        sed.add_info('opening_angle', self.parameters["opening_angle"])
        sed.add_info('psy', self.parameters["psy"])
        sed.add_info('fracAGN', self.parameters["fracAGN"])

        # Compute the AGN luminosity
129
130
131
132
133
        if fracAGN < 1.:
            L_AGN = luminosity * (1./(1.-fracAGN) - 1.)
        else:
            raise Exception("AGN fraction is exactly 1. Behaviour "
                            "undefined.")
134
135
136
137
138
139
140

        sed.add_contribution('agn_fritz2006_therm', self.fritz2006.wave,
                             L_AGN * self.fritz2006.lumin_therm)
        sed.add_contribution('agn_fritz2006_scatt', self.fritz2006.wave,
                             L_AGN * self.fritz2006.lumin_scatt)
        sed.add_contribution('agn_fritz2006_agn', self.fritz2006.wave,
                             L_AGN * self.fritz2006.lumin_agn)
141
142
143

# CreationModule to be returned by get_module
Module = Fritz2006