Class Mag

Inheritance Relationships

Derived Types

Class Documentation

class Mag

abstract class to handle everything related to the computation of expected magnitudes

Subclassed by GalMag, QSOMag, StarMag

Public Functions

Mag(keymap &key_analysed)

Build a Mag instance from the keywords common to GAL/QSO/STAR runs (config file, object type, cosmology, IGM opacities)

Parameters:

key_analysed – map of keyword/value pairs parsed from the configuration file and command line

inline Mag()
virtual ~Mag()
void read_ext()

read the extinction laws into attribute extAll (vector of vectors of type ext)

void read_B12()

Read the long wavelength Bethermin+2012 templates to add the dust emission to the BC03 templates

void def_zgrid()

define the vector of redshifts, and associate to it vectors of age and distance modulus, based on the lcdm attribute

inline void set_zgrid(double dz, double zmin, double zmax)

helper function to set the grid of redshift

Parameters:
  • dz – : step in z in the grid

  • zmin – : minimum z

  • zmax – : maximum z

void write_doc()

Write in file sdocOut the documentation for the GALAXY/QSO/STAR case.

virtual void print_info()

print general information onscreen, valid for GAL/QSO/STAR objects

void open_files()

open all the input and output streams needed for the computations

void close_files()

close all opened files

virtual void read_SED() = 0

read SED files, apply extinction corrections, and store into a vector of instances of class SED

Public Members

vector<ext> extAll

extinction laws read from extlaw

vector<flt> allFlt

filters read from filtFile

vector<GalSED> B12SED

Bethermin et al. (2012) dust emission templates.

vector<double> gridz

redshift grid values

vector<double> gridT

age of the Universe at each gridz step

vector<double> gridDM

distance modulus at each gridz step

vector<opa> opaAll

extragalactic opacity curves used along the line of sight

Protected Attributes

object_type object

type of object (GAL/QSO/STAR) handled by this instance

string config

path to the configuration file (arg -c)

cosmo lcdm

fiducial cosmology used to build the redshift grid

string filtFile

path to the filter list file (keyword FILTER_FILE)

string magtyp

magnitude system, “AB” or “VEGA” (keyword MAGTYPE)

bool outasc

whether to also write the library in ASCII format

bool verbose

verbosity flag

bool add_dust

whether dust attenuation should be applied

vector<string> extlaw

list of extinction law file names to apply

vector<double> ebv

grid of E(B-V) values to apply

vector<double> magko

scratch buffer holding the k-corrected magnitudes of the SED currently being written

vector<int> modext

(min,max) SED model index ranges to which each extinction law is restricted (keyword MOD_EXTINC), stored as consecutive pairs

double dz

redshift step of the grid

double zmin

minimum redshift of the grid

double zmax

maximum redshift of the grid

string lib

name of the input SED library

string colib

base name (without extension) of the output magnitude library (keyword GAL_LIB_OUT/QSO_LIB_OUT/STAR_LIB_OUT)

string emlines = "NO"

emission line treatment (e.g. “NO”, “EMP”, “PHYS”), only relevant for galaxies

string sedlibFile

path to the binary SED library to read

string docFile

path to the output .doc file describing the library

string binOutFile

path to the output binary magnitude library file

string datFile

path to the output .dat physical parameter file

ifstream ssedIn

input stream for the binary SED library

ofstream sdocOut

output stream for docFile

ofstream sbinOut

output stream for binOutFile

ofstream sdatOut

output stream for datFile

ext milkyWayExtinction

Milky Way extinction law, applied when applyMilkyWayExtinction is true

bool applyMilkyWayExtinction

whether to apply a Milky Way extinction correction to the library