SpecGen

SpecGen

SpecGen is an [R] based package which allows users to generate simulated galaxy spectra using a number of input parameters and databases of mock galaxy spectra. Simulated spectra can either be produced individually, in batch mode from an input text file, or from a user-defined grid over a specific multi-dimensional parameter space (currently limited to 50 sources).

In the single spectrum generator, the user can create a single simulated galaxy spectrum using a pre-defined set of model templates.

Firstly a template library is selected from the 'Model Catalogue' option. Currently only SDSS (SN>30) catalogues in the GAMA regions are available, but additional catalogues can be added on request.

Once a database has been selected the user can input the desired SFR, stellar mass and g-i colour of their simulated spectrum. SpecGen then matches these parameters to the closest source in the model database - where parameters are defined by the GAMA team (see Driver et al 2011 & Liske et al 2015 for details). This matched catalogue source then defines the continuum shape, line strengths and line ratios of the simulated spectrum. The SDSS database is split into SF and passive galaxies (based on emission line diagnositics). If the user selects SFR>0, SF galaxies are used, whereas SFR=0 will use passive galaxies.

The user can provide numerous inputs to edit this best match spectrum, changing the redshift, providing a magnitude scaling in a specific band, changing the nebular emission and stellar absorption line widths, changing the resultant spectra range and resolution, and adding noise - where the noise is defined as continuum signal to noise at 6500A and the noise is added as a random normal distribution with sigma=F_6500/SN (i.e. the input signal to nosie of the spectrum will be the continuum flux/the standard deviation of the errors at 6500A).

Once the desired spectrum has been produced it can be saved as either FITS, ASCII or PDF.

In addition to generating the simulated galaxy spectrum, SpecGen also dymanically estimates the redshift of the spectrum using AUTOZ (see Baldry et al 2014). The AUTOZ best-fit redshift and probability (0-1) is displayed in the top right of the plotting window. This functionallity allows the user to estimate at what SN a redshift will not be obtainable for the given source. Note that at very low SN AUTOZ is senstive to the exact noise distribution and as such, different AUTOZ runs will produce different redshift confidences.

SpecGen also allows the user to estimate the minimun SN at which a redshift would be obtainable for the current spectrum. This option will run 5 separate noise realizations at each SN and display the minimum SN required for to obtain a redshift in all 5 realizations (i.e. a realistic estimation of the minimum SN you could observe this spectrum and still obtain a redshift given a varying, random noise distribution). This function requires ~5min runtime and hence the user should be patient while waiting for results - a progress bar will be displayed at the top of the browser window. The results of this function are displayed in the plot window. The realizations will only run when selected and if the user spectrum is changed significantly, this function must be re-run.

Plotting: The best matched database spectrum is displayed in the upper panel of the plotting window. Below this, the distribution of all sources in the model database are shown in the sSFR vs colour and stellar mass vs colour planes. The user input parameters are marked with the large orange circle and the best match database source is matched with the small pink circle.

The multiple spectrum generator provides the same functionality as the single spectrum generator, but allows the user to upload a text file of parameters to generate multiple spectra. Currently this is limited to 50 spectra per iteration. If a file of >50 sources is uploaded, only the first 50 are used. If more iterations are required, please contact the site administrator. The uploaded text file must have the following format (space separated, without column headers):

The user can then select if the files will be written out in FITS or ASCII format. To generate the spectra click "Run" once. A progress bar at the top of the page will display progress of your request. Once the request is finished, use the "Download" button to download a tarball containing all of your requested model spectra.

The grid spectrum generator allows the user to produce a regularly gridded set of simulated spectra over the full distribution of possible redshifts, magnitudes, SFRs, stellar masses and g-i colours. The user can provide the range of each of these parameters and a grid spacing, SpecGen will produce a single simulated spectrum for each multi-dimensional grid bin. This process is once again limited to 50 grid positions.

Spectrum output parameters of noise, nebular and stellar line widths, wavelength range and resolution can be selected.

Once the request is finished, all simulated galaxies can be downloaded using the "Download" button. The resultant spectra names are given the format -> yyyy-mm-dd_hh_mm_ss_spec_z_mag_sfr_mass_col. The downloaded tarball also contains a text file detailing the full input parameters of the request.

The create tab allows the user to generate a synthetic galaxy spectrum with given continuum shape, magnitude, line strengths and noise. All input variables can be dynamically changed until the required spectrum is produced. The spectrum can then be saved as either FITS, ascii or PDF.

Currenly Maraston et al (2005) and Bruzual and Charlot (2003), continuum shapes are available. The user decides on an e-folding timescale, metallicity and age to define the continuum shape, and a stellar mass and mass to light ratio to define the continuum scaling. The user can add extinction from either a Calzetti, Milkyway or Large Magelanic Cloud extinction model and Madau IGM absorption.

Once the continuum shape is defined, the user can add emission line features. This can be done in one of two ways: i) the user adds lines manually, giving an EW and width for each lines or ii) the user gives a SFR and line width. For the SFR method, the given SFR is converted to Ha emission line strength using the Kennicutt relation. All other hydrogen lines are included assuming case-B recombination. Other emission line strengths are calculated using the metallictiy selected above, and using multiple line-ratio to metallicity diagnositcs.

In a similar manner to the "Multiple" function, the Multiple-Create Spectrum generator provides the same functionality as the Create Spectrum generator, but allows the user to upload a text file of the parameters for multiple spectra to be created. Currently this is also limited to the Maraston et al (2005) models and 50 spectra per iteration. If a file of >50 sources is uploaded, only the first 50 are used. The uploaded text file must have the following format (space separated, without column headers):