Commit 0bac3629 authored by Laure Ciesla's avatar Laure Ciesla Committed by Médéric Boquien
Browse files

Radio non thermal emission

parent 9e47749b
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Centre de données Astrophysiques de Marseille
# Copyright (C) 2013 Institute of Astronomy, University of Cambridge
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Médéric Boquien
Radio module
This module implements the radio emission of galaxies, taking into account only the non-thermal emission.
The thermal emission is handled by the nebular module.
The parameters that this module takes as input are:
- the value of the coefficient of the FIR/radio correlation
- the value of the spectral index of the power law emission from synchrotron.
import numpy as np
import scipy.constants as cst
from collections import OrderedDict
from . import CreationModule
class Radio(CreationModule):
"""Radio emission
Given the number of Lyman photons, the module computes the free-free (thermal) emission of galaxies.
Based on the SN collapse rate, the module computes the synchrotron (non-thermal) emission of galaxies.
parameter_list = OrderedDict([
("qir", (
"The value of the FIR/radio correlation coefficient.",
("alpha", (
"The slope of the power-law synchrotron emission.",
out_parameter_list = OrderedDict([
("qir", "The value of the FIR/radio correlation coefficient."),
("alpha", "The slope of the power-law synchrotron emission.")
def _init_code(self):
"""Build the model for a given set of parameters."""
qir = float(self.parameters["qir"])
alpha = float(self.parameters["alpha"])
# We define various constants necessary to compute the model. For
# consistency, we define the speed of light in nm s¯¹ rather than in
# m s¯¹.
c = cst.c * 1e9
# We define the wavelength range for the non thermal emission
self.wave = np.logspace(5., 9., 1000.)
# We compute the synchrotron emission normalised at 21cm
self.lumin_nonthermal = (1./self.wave)**(-alpha + 2) / (1./2.1e8)**(-alpha + 2)
# Normalisation factor from the FIR/radio correlation to apply to the
# IR luminosity
S21cm = (1./ (10**qir*3.75e12))*(c/(2.1e8)**2)
self.lumin_nonthermal *= S21cm
def process(self, sed):
"""Add the radio contribution.
sed: pcigale.sed.SED object
if 'dust.luminosity' not in
sed.add_info('dust.luminosity', 1., True)
luminosity =['dust.luminosity']
sed.add_module(, self.parameters)
sed.add_info("radio.qir", self.parameters["qir"])
sed.add_info("radio.alpha", self.parameters["alpha"])
sed.add_contribution('radio_nonthermal', self.wave, self.lumin_nonthermal * luminosity)
# CreationModule to be returned by get_module
Module = Radio
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment