Class GalSED

Inheritance Relationships

Base Type

Class Documentation

class GalSED : public SED

concrete SED implementation for galaxy objects (object_type GAL)

Public Functions

inline GalSED(SED const &p)

Copy constructor from base class.

inline GalSED(GalSED const &p)

Copy constructor.

GalSED(const string nameC, int nummodC = 0)

Standard constructor.

GalSED(const string name, double tau, double age, string format, int nummod, int idAge)

Extended constructor also setting the star-formation history timescale and format

Parameters:
  • name – Arbitrary name for the SED object, stored via SED::name

  • tau – e-folding timescale (yr) of the star formation history, stored in tau

  • age – age of the stellar population

  • format – SED input format code, stored in format

  • nummod – Identification number of the SED object

  • idAge – index of the age for this SED object

inline ~GalSED()
virtual void compute_luminosities()

Compute some integrals to be stored in the object This computes variables SED::luv, SED::lopt, SED::lnir, and SED::ltir luv, lopt, lnir, are monochromatic equivalent luminosities, for a source at 10 parsecs. As the SED unit is taken as erg/cm2/s/Hz, the monochromatic luminosity is obtained by integrating the SED in an interval [lmin, lmax], divided by (lmax-lmin) and multiplied by \(4\pi(10pc)^2\). Note that given the units of an SED, it is defined as dF/dnu for F the corresponding flux. As a result the integral shows a \(\lambda^2/c\) term so that \(\frac{dF}{d\nu} = \frac{dF}{d\lambda} \frac{\lambda^2}{c}\) can be integrated in \(\lambda\). For the variables computed here, in order to speed computation, \(\lambda^2/c\) is evaluated at the center of the interval and taken out of the integral.

vector<double> add_neb_cont(double qi)

Compute the nebular continuum emission from the ionizing photon flux, add it to lamb_flux, and return it

Parameters:

qi – number flux of H-ionizing photons (see SED::qi)

Returns:

the nebular continuum flux added to each point of lamb_flux

GalSED generateEmSED(const string &emtype)

Build a GalSED holding only the emission lines for this template, dispatching to the physical or empirical recipe selected by emtype

Parameters:

emtype – emission line method, “PHYS” for the photoionization-based recipe (requires calc_ph()/add_neb_cont() to have been called beforehand), “EMP_UV” or “EMP_SFR” for the empirical recipes based respectively on the UV luminosity or the SFR

Returns:

a new GalSED containing the emission-line spectrum

void generateEmEmpUV(double MNUV_int, double NUVR)

Empirical emission-line recipe based on the absolute UV magnitude

Parameters:
  • MNUV_int – intrinsic absolute NUV magnitude

  • NUVR – NUV-R rest-frame color

void generateEmEmpSFR(double MNUV_int, double NUVR)

Empirical emission-line recipe based on the star formation rate

Parameters:
  • MNUV_int – star formation rate ( \(M_\odot\)/yr)

  • NUVR – NUV-R rest-frame color

void generateEmPhys(double zmet, double qi)

Physically-motivated emission-line recipe based on photoionization

Parameters:
  • zmet – stellar metallicity

  • qi – number flux of H-ionizing photons (see SED::qi)

void generateEmSpectra(int nstep)

Resample the emission lines onto a spectrum with nstep points per line, to be summed with the continuum by sumEmLines()

Parameters:

nstep – number of wavelength steps used to sample each line

virtual void sumEmLines()

Add the emission-line flux (flEm) to the continuum flux.

virtual void kcorrec(const vector<double> &magz0)

Compute the k-correction in each filter as : \(k = mag(z) - mag(z=0) - \mu\)

void rescaleEmLines()

Rescale all emission-line fluxes in fac_line by fracEm.

void zdepEmLines(int flag)

Apply a redshift-dependent correction to the [OIII] doublet flux relative to H-beta

Parameters:

flag – 0 to reference the OIII/Hbeta ratio at z=0, non-zero to reference it at z=2.12 (needed to match the physical recipe)

void calc_ph()

Compute the number flux of photons able to ionize HeII, HeI, H, and H2 For a given SED, this amounts to compute the integral \(\int_0^{w_i} SED(\lambda)\cdot \frac{\lambda}{hc}\,d\lambda\quad,\) where \(w_i\)=hc/54.42, hc/24.52, hc/13.60, and 1108.7 A for HeII, HeI, H, and H2 respectively, and where \(hc\) is in ergs.A. This normalization assumes that the SED are provided in args/cm2/s/A. In practice the integral is approximated by : \(\sum_{\lambda_{min}}^{w_k}\frac{SED_{j-1}+SED_j}{2}\cdot(\lambda_j-\lambda_{j-1})\cdot\frac{\lambda_j}{hc}\).

Results are stored in the \(q_i\) array member of size 4 of the SED instance.

virtual void writeSED(ofstream &ofs, ofstream &ofsPhys, ofstream &ofsDoc)

Write this SED to the binary/physical-parameters/doc output streams. Behaviour is specialised in the GalSED/QSOSED/StarSED subclasses.

Parameters:
  • ofs – binary output stream for the SED

  • ofsPhys – output stream for the physical parameters (GAL only)

  • ofsDoc – output stream for the human-readable documentation file

virtual void readSEDBin(ifstream &ins)

read the SED library when it is in binary format

void writeMag(bool outasc, ofstream &ofsBin, ofstream &ofsDat, vector<flt> allFilters, string magtyp) const

Write the synthetic magnitudes and physical parameters of this galaxy SED to the magnitude library output streams (see SED::writeMag)

virtual void readMagBin(ifstream &ins)

Read the synthetic magnitudes of this SED from a binary magnitude library stream. No-op in the base class; specialised in the GalSED/QSOSED/StarSED subclasses.

Parameters:

ins – input stream positioned at this SED’s magnitude record

inline virtual void clean()

Clear the base class content (see SED::clean) as well as flEm.

Public Members

vector<double> flEm

emission-line flux added on top of the continuum, one value per lamb_flux point

string format

SED input format code (e.g. ‘A’ for ASCII)

double tau

e-folding timescale (yr) of an exponentially declining star-formation history, SFR(t) \(\propto e^{-t/\tau}\)

double zmet

stellar metallicity

double d4000

4000 Angstrom break amplitude, defined as the ratio of the integrated flux in [4050,4250] A over [3750,3950] A

double fracEm

fraction of the emmission line considered