Tools FADO RemoveYoung
A tool for the removal of the young stellar component in galaxies within an adjustable age cutoff

The optical morphology of galaxies holds the cumulative record of their assembly history, and techniques for its quantitative characterization offer a promising avenue toward understanding galaxy formation and evolution. However, the morphology of star-forming galaxies is generally dictated by the youngest stellar component, which can readily overshine faint structural/morphological features in the older underlying stellar background (e.g., relics from recent minor mergers) that could hold important insights into the galaxy build-up process. Stripping off galaxy images from the emission from stellar populations younger than an adjustable age cutoff t_cut can therefore provide a valuable tool in extragalactic research.
RemoveYoung (RY), a publicly available tool that was presented in Gomes & Papaderos (2016, A&A 594, A49)  exploits the combined power of integral field spectroscopy (IFS) and population spectral synthesis (PSS) toward this goal.
Two-dimensional post-processing of PSS models to IFS data cubes with RY permits computation of the spectral energy, surface brightness, and stellar surface density distribution of stellar populations older than a user-defined t_cut. This suggests a variety of applications to star-forming galaxies, such as interacting or merging galaxy pairs and lower-mass starburst galaxies near and far, and blue compact and tidal dwarf galaxies.

RemoveYoung (RY) requires as input the Population Vector (PV) obtained by fitting a galaxy spectrum with a PSS code. The PV is essentially an array holding the best-fitting set of mass fractions of Simple Stellar Populations (SSPs) picked up by the PSS code from a base library. The latter may contain SSPs spanning a range in stellar age and metallicity from, e.g., Bruzual & Charlot (2003; MNRAS, 344, 1000; available online here) or MILES.
The current version (v.01) of RY is adapted to the post-processing of PVs computed with the Starlight code (Cid Fernandes et al. 2005, MNRAS 358, 363). An example of the PV obtained by fitting the optical spectrum of an emission-line galaxy with Starlight can be found here.

A PV can be post-processed with RY by executing in a Linux terminal the command:

$ ./RY01.exe par1 par2 ... par10


par1 spectrum.PV (PV obtained from PSS modeling of a galaxy spectrum)
par2 distance to the galaxy in Mpc
par3 directory where the PV is stored
par4 directory where the library SSPs are stored
par5 directory where the photometric filter transmission curves are stored
par6 requested time cutoff t_cut in Gyr
par7 flux units of the modeled galaxy spectrum
par8 1: correction for the intrinsic extinction A_V inferred from the PSS fit (and included in spectrum.PV)
0: no correction for intrinsic extinction will be applied
par9 0: execution of RY without storage of its output
1: storage of a list of synthetic magnitudes for a set of photometric filters
2: additionally, storage of the spectroscopic output from the code
par10 verbosity level of the terminal output (0/1: no terminal output/terminal output)

Example: Removal of the contribution of stellar populations younger than 0.1 Gyr from the best-fitting spectral energy distribution (SED) to the spectral continuum of a galaxy. The population vector spectrum.PV obtained by the PSS model is stored in the local subdirectory /PVs and the transmission curves of photometric passbands for which RY will compute synthetic magnitudes are stored in the sub-directory /PhotometricFilters.
The subdirectory /SSPs must contain i) a listing of the SSP spectra used by the PSS code for modeling a galaxy spectrum (the entry preceding the [arq_base] in the specific case of a PV computed with Starlight) and ii) the SSP spectra themselves.
The output from RY will include both photometric and spectroscopic quantities, which will be exported in the ascii files spectrum.PV.MAG.out and spectrum.PV.SPC.out (see below).

$ ./RY01.exe spectrum.PV 10.0 ./PVs/ ./SSPs/ ./PhotometricFilters/ 0.1 1.e-16 0 2 0

RY can also be executed in batch mode:

$ ./RY01.exe <

where is an ascii listing of PVs with the following structure

100 [number of PVs in the list]
/home/RY_user/PVs/ [ PV_Dir   ]
/home/RY_user/SSPs/ [ SSP_Dir  ]
/home/RY_user/PhotometricFilters/ [Filter_Dir]
[t_cut Gyr ]
[ Ext_Corr ]
[ Output   ] 0-only run RY 1-MAG file 2-MAG & SPC files
[Verbosity ] 0/1: no terminal output/terminal output
spectrum.PV         010.000 [PV file   ] [Distance]
spectrum1.PV        022.400 [PV file   ] [Distance]
spectrum2.PV        006.700 [PV file   ] [Distance]
spectrum99.PV       047.200 [PV file   ] [Distance]

In the case of par10 set to 2 (both photometric and spectroscopic output requested), RY produces for each PV two ascii files:
1) spectrum.PV.MAG.out : List of magnitudes (MAG) for currently 25 passbands computed from the observed spectrum (OBS)  and the fit to its spectral continuum (FIT). In cases when the spectral range of OBS only partially overlaps with a filter transmission curve, hybrid observed+hybrid magnitudes are computed through substitution of spectral intervals that are not included in OBS by the best-fitting synthetic SED (as an example, determination of the SDSS g magnitude for an OBS between 4500 Å and 8000 Å, i.e. when the observed spectrum does not cover the short-wavelength part of the SDSS g-band filter
transmission curve). The output stored in spectrum.PV.MAG.out includes:

col 01 Filter
col 02 An estimate of the fraction of the filter transmission curve within the spectral range of the modeled spectrum
col 03 As in column 02, but only for pixels with a flux > 0.0
col 04 Effective lambda of the filter transmission curve
col 05 Calibration zero point
col 06 MAG_OBS: MAG computed from the observed spectrum
col 07 MAG_FIT: computed from the FIT to the observed spectral continuum (i.e. excluding the contribution of emission lines)
col 08 MAG_FIT_Y: MAG obtained from the FIT for the young stellar component (i.e. for SSPs with an age .leq. t_cut)
col 09 MAG_FIT_O: MAG obtained from the FIT for the old stellar component (i.e. for SSPs with an age > t_cut)
col 10
MAG_OBS - MAG_SYNTH (i.e. luminosity increase in mag due to the nebular line emission)
col 11
col 12
MAG_OBS - MAG_FIT_O (i.e. magnitude corresponding to the young stellar component and nebular line emission)
col 15
logM_cor: log of currently available stellar mass (i.e. corrected for the stellar mass fraction returned to the ISM in the course of stellar evolution)
col 16
logM: log of stellar mass ever formed
col 17
logM_cor_y: as in col. 15 but for the young stellar component
col 18
logM_cor  : as in col. 16 but for the young stellar component
col 19
logM_cor_o: as in col. 15 but for the old stellar component
col 20 logM_cor  : as in col. 16 but for the old stellar component

2) spectrum.PV.SPC.out: Spectroscopic output from RY, includes:

col 01 Wavelength covered by SSP models from Bruzual & Charlot (2003) (91 Å - 1600000 Å)
col 02 Obs + synthetic over the spectral range between 91 Å and 1600000 Å 
col 03 Wavelength covered by the observed spectrum
col 04 Observed spectrum
col 05 as in col. 01
col 06 Synthetic spectrum best fit spectrum
col 07 Synthetic spectrum for the young stellar component
col 08 Synthetic spectrum for the old stellar component
col 09 Internal

A tar file with the executable of RemoveYoung and the necessary additional files (spectrum.PV, filter transmission curves, SSPs) for running the code is available for Linux and MacOS X Yosemite.
Jean Michel Gomes (JMG) and Polychronis Papaderos (PP) are researchers at Instituto de Astrofísica e Ciências do Espaço (IA).
This work was supported by Fundação para a Ciência e a Tecnologia (FCT) through the research grant UID/FIS/04434/2013 and conducted at IA.
JMG acknowledges support by FCT through the Fellowship SFRH/BPD/66958/2009 and POPH/FSE (EC) by FEDER funding through the Programa Operacional de Factores de Competitividade (COMPETE).
PP is supported by FCT through the Investigador FCT Contract No. IF/01220/2013 and POPH/FSE (EC) by FEDER funding through the program COMPETE.
JMG also acknowledges support by FCT through the Fellowship CIAAUP-04/2016-BPD at IA (FIS/04434) and POPH/FSE (EC) by FEDER funding through the COMPETE.
JMG & PP acknowledge support by the FCT under project FCOMP-01-0124-FEDER-029170 (Ref. PTDC/FIS-AST/3214/2012), funded by FCT-MEC (PIDDAC) and FEDER (COMPETE) and the exchange program “Study of Emission-Line Galaxies with Integral-Field Spectroscopy” (SELGIFS, FP7-PEOPLE-2013-IRSES-612701), funded by the EU through the IRSES scheme.
This paper is based on data from the Calar Alto Legacy Integral Field Area Survey, CALIFA, funded by the Spanish Ministery of Science under grant ICTS-2009-10, and the Centro Astronómico Hispano-Alemán.
Instituto de Astrofísica e Ciências do Espaço Universidade do Porto Faculdade de Ciências da Universidade de Lisboa Fundação para a Ciência e a Tecnologia