Thursday, December 18, 2014

Galacticus v0.9.3 released

We're happy to announce the release of Galacticus v0.9.3. As usual, you can get Galacticus direct from our repo at BitBucket, just use:

hg clone -u v0.9.3

to grab v0.9.3, or you can download a source tarball. v0.9.3 becomes the stable version (supported and will receive bug fixes), v0.9.2 becomes deprecated (no longer supported and will not receive bug fixes) and development moves to v0.9.4.

One of the major internal changes to Galacticus in v0.9.3 has been to begin moving all of the algorithms to a fully object-oriented framework. This mostly makes for cleaner (and less!) code, but has some notable effects visible to users. In particular, there are now several cases where an algorithm functions by modifying another algorithm. A good example of this is the new warm dark matter halo concentrations algorithm. This works by taking a CDM halo concentration algorithm and modifying it. This functionality is possible because of the new object-oriented design.

Some of the other notable changes and improvements to Galacticus are described below.

New components

Several new component classes have been added to Galacticus, most of which allow the tracking of various useful statistics of galaxies and halos:
  • Galaxy dynamics - this component records a time series of properties related to bar instability in galaxy disks (instability timescale and adiabatic ratio);
  • Hot halo mass outflows - tracks the mass of gas in a galaxy's hot halo which arrived there directly via outflows;
  • Mass flows - tracks the cumulative mass of gas which has ever cooled onto a galaxy
  • Host halo history - tracks the maximum mass ever reached by a satellite galaxy's host halo;
  • Age statistics - tracks the stellar mass-weighted mean ages of disk and spheroid components of galaxies;

 New outputs

  • Output filters:
    • Filter on a combination of stellar mass and spheroid-to-total mass ratio;
    • The lightcone filter can now prune trees which lie entirely outside the lightcone so that they do not have to be processed at all;
      • This filter also now handles non-small angle geometries correctly.
  • Physical properties:
    • The λR parameter of Cappellari et al. (2007);
    • Stellar half-mass radii; 
    • Satellite status (i.e. if satellite is an orphan);

New physical models

New tools and functionality

  • A script is now provided to help migrate Galacticus parameter files between versions - it intelligently updates your parameter file to handle changes in parameter names and definitions between versions;
  • The script used to launch batches of Galacticus models has been re-written and modularized, making it easier to launch models on different systems (PBS, SLURM, etc.);
  • Reading of merger trees from file is now split into data import (reading the data from file) and data processing (manipulating the data into a form that Galacticus can use), allowing for import from multiple different merger tree file formats;
  • Updates of external codes:
  • Luminosity filters:
    • Arbitrary tophat filters can now be specified using topHat_Lmin_Lmax_R - this gets expanded into a top-hat filter  between wavelengths Lmin and Lmax with resolution R;
    • A filter redshift can now be set to "all" to cause the filter to be used for all available output redshifts;
  • Optimizations:
    • HDF5 output can now be more effectively buffered which results in much lower I/O overheads when outputting large numbers of redshifts;
    • Stellar population luminosities integrated under filters can be stored to file for rapid re-use;
  • Help:
    • Lists of suitable components to support requested functionality are automatically reported whenever the selected component is insufficient;
    • When a requested method is unrecognized, a list of available methods is printed.

Friday, December 12, 2014

Tracking Satellite Halo Orbits

The final major new addition to v0.9.3 of Galacticus has just been added. This is the subhalo evolution code written by Anthony Pullen which was used in our recent work on the subhalo population in warm dark matter halos.

The new model is similar to previous works by Taylor & Babul (2001), Benson et al. (2002), and Zentner et al. (2005). It tracks the orbit of each subhalo directly, accounting for the gravitational potential of the host halo, dynamical friction, tidal mass loss, and tidal shocking, but ignoring subhalo-subhalo interactions to minimize the computational cost.

The result is that Galacticus can predict the radial and mass distributions of subhalos directly, without the need to extract these from N-body simulations. An example of the distribution of halos is shown below (image credit: Anthony Pullen):

Each circle represents a subhalo within a Milky Way-mass dark matter halo at z=0, with the radius indicating the current tidal radius of the subhalo.

Wednesday, December 3, 2014

Modeling Reionization

As the result of work by Caltech SURF student, Daniel McAndrew, Galacticus now has a fully self-consistent calculation of reionization (and the ionization and thermal state of the intergalactic medium in general). This model uses the spectrum of photons emitted by model galaxies and AGN to compute the evolution of ionization states of hydrogen and helium in the intergalactic medium (IGM), along with the IGM temperature. The thermal evolution of the IGM is then used to compute the filtering mass, and this affects later galaxy evolution via the gas accretion rate into halos (Naoz & Barkana, 2007).

The result is an internally self-consistent model which can predict when reionization occurs. There are some simplifications (the biggest among them probably being the escape fraction of ionizing photons from galaxies, and the clumping factor in the IGM) but we hope that future work will address some of those.

To activate this calculation, include the following in your parameters file:

  <!-- IGM evolver -->
  <!-- Background radiation -->

  <!-- Halo accretion options -->

The first block of parameters switches Galacticus to using an internal calculation for the state of the IGM, instructs it to solve for IGM properties as a function of time, and specifies that IGM properties should be updated 10 times per decade of cosmic time. Specifically, at each of these time intervals, solving of galaxy evolution is halted and the IGM evolved up to this time using the currently computed photoionizing background spectrum.

The second block of parameters activates an internal calculation of cosmic background radiation, in which the background is computed from the emissivities of model galaxies and AGN. The number of points at which to tabulate the background per decade of wavelength and cosmic time are specified.

Finally, the third block of parameters tells Galacticus to use the Naoz & Barkana (2007) prescription for computing gas accretion into halos from the IGM. This prescription uses the filtering mass to determine accretion rates, and will take the filtering mass from the internal IGM evolution calculation.

Once completed, data on the IGM and background radiation are written to the Galacticus output file in the igmProperties and backgroundRadiation groups respectively.

Sunday, November 2, 2014

Computing Emission Line Properties

The latest update to Galacticus v0.9.3 allows calculation of emission line luminosities for galaxies. Much of the work to make this happen was carried out by Pomona College student Gabe Currier over the summer of 2013. The calculation is based on the methodology of Panuzzo et al. (2003). Briefly, HII region models are constructed using Cloudy for a variety of gas densities and metallicities, and HI, HeI, and OII ionizing luminosities. Emission line luminosities are then computed by interpolating in these tables based on the instantaneous properties of model galaxies.

To compute emission line luminosities it is therefore necessary to run Galacticus including the following rest-frame luminosity filters at each redshift of interest: Lyc, HeliumContinuum, OxygenContinuum. This causes the ionizing luminosity for each three species to be computed and output.

Emission line luminosities can then be found using Galacticus's data extraction modules, by simply importing the Galacticus::EmissionLines module. Emission line luminosites (in units of Solar luminosities) can then be accessed as named properties using names such as  


which will return the Hα luminosity at z=0. Equivalent properties for disk and spheroid are provided (simply replace "total" with "disk" or "spheroid").

Currently available lines are:
  • balmerAlpha6563
  • balmerBeta4861
  • oxygenII3726
  • oxygenII3729
  • oxygenIII4959
  • oxygenIII5007
  • nitrogenII6584
  • sulfurII6731
  • sulfurII6716

Additionally, if a line is requested as


then the line luminosity is computed under the provided filter, and the luminosity is returned in units of maggies for easy conversion to AB magnitudes.

Sunday, September 14, 2014

Migrating parameter files between Galacticus versions

The names and allowed values of parameters often change between versions of Galacticus - due to changes in naming conventions, attempts to unify parameter names, and changes in the structure of the code.

To permit easy and error-free migration between versions a script is provided to translate parameter files from earlier to later versions - preserving the layout of your parameter file, including comments. To migrate a parameter file simply use:

scripts/aux/ parameters.xml newParameters.xml

By default, this script will translate from the previous to the current version of Galacticus. If your parameter file contains a version element then this will be used to determine which version of Galacticus the parameter file was constructed for. The migration script will then migrate the parameter file through all intermediate versions to bring it into compliance with the current version. You can also specify input and output versions directly:

scripts/aux/ parameters.xml newParameters.xml --inputVersion 0.9.0 --outputVersion 0.9.3

will convert parameters.xml from version 0.9.0 syntax to version 0.9.3 syntax.

Thursday, June 5, 2014

Stellar Population Synthesis Including Binary Stars

I'm making available a script which will convert the stellar population spectra from the BPASS project into Galacticus HDF5 format, so that they can be used in Galacticus calculations. Just drop the script into your Galacticus directory, run it, and it will download, unpack, and convert the BPASS data. You'll be left with two files (one for populations including only single stars, and another for populations including binaries) in the data/stellarPopulations/ directory that you can then use in Galacticus when computing galaxy luminosities.

Binaries can have a significant effect on galaxy colors (see the papers on the BPASS page for more details). For example, the following plot shows the distribution of u-z colors for galaxies at z=0 when computed using the FSPS stellar population code, and when using the BPASS code (with single and binary populations).

The galaxies with binary stars are offset bluewards by about 0.2 magnitudes. I wonder what effect this has on stellar mass estimates based on broad-band photometry..........?

Thursday, May 22, 2014

Fitting the Stellar Mass Function at z=0

I've just posted this paper to arXiv (full resolution version here, but be warned, it' about 180Mb), which is the first in a series that attempts to carefully explore constraints on Galacticus from observations of the galaxy population.

In this paper, I use an extremely simple galaxy formation model, and a single constraint - the z=0 stellar mass function of galaxies. What sets this study apart from previous, similar studies, is that I attempt to carefully quantify sources of random and systematic error in both the data and the model, and to account for these when constructing the model likelihood function. For example, I compute the full covariance matrix of the stellar mass function, which turns out to look like this (well, technically this is the correlation matrix):

The result is that a good match to the z=0 stellar mass function can be obtained, along with a moderately good "prediction" (which is really an extrapolation) of the evolution of the stellar mass function to z=1. Other statistics, such as the HI mass function of galaxies at z=0, don't work out as well.

Accounting for all sources of random and systematic error significantly broadens the posterior distributions on model parameters - which is important if we want to avoid ruling out viable models. Ignoring these errors also leads to discernable biases in the parameter posteriors.

This is just step one in constructing a data-driven, robustly constrained galaxy formation model. Work on step two is already underway.......

Wednesday, March 12, 2014

Calculating the Cosmic Background Radiation

The development version of Galacticus (v0.9.3) gained a nice new feature today - the ability to compute the evolution of cosmic background radiation self-consistently from the population of galaxies formed in the model. This is in preparation for a summer project (part of Caltech's SURF program) looking at the reionization of the Universe. For now, it's a relatively simple treatment - it include only the contribution from stars (no AGN), doesn't consider factors such as escape fractions or reprocessing of star light by dust - but it works! Here's the results of a test model in which the Universe gets reionized at z=10:

To carry out this calculation we added some useful new technical features to Galacticus. It's always been possible to attach "events" to halos in a Galacticus merger tree - when the halo reaches the event, some action is triggered before the halo is allowed to continue evolving. Now, it's possible to attach events to the entire universe of merger trees in Galacticus (and also to individual trees, but that's another story). Such a "universe event" causes all merger trees to halt at the event time. In the case of this background radiation calculation, universe events are used to halt the evolution of merger trees, compute their net emissivity, evolve the background radiation, and then let the trees evolve further until they reach the next universe event. Galacticus handles all of this transparently - it normally tries to evolve one tree at a time and then destroy it in order to keep its memory footprint small, but if a universe event is added it will process all merger trees simultaneously. This uses more memory, but allows for calculations that depend on the properties of the entire population of galaxies across all merger trees.

Look for more results utilizing this background radiation calculation later this year!

Wednesday, February 19, 2014

Postprocessing Stellar Spectra (For Fun and Profit)

It's been quiet around here recently. Not because development of Galacticus has slowed down - quite the opposite, development is proceeding rapidly and v0.9.4 (to be released around September 2014) should have some big new features. To prove that development is still happening, here's a short tutorial on Galacticus' functionality to postprocess stellar spectra (motivated by the recent addition of the Inoue et al. 2014 model of IGM absorption).

Stellar luminosities are computed by convolving a library of simple stellar populations with the star formation history of each galaxy. Galacticus allows the spectra of those simple stellar populations to be postprocessed (after being read from file or internally generated for example) before they are utilized in the convolution integral. This postprocessing can modify the spectra in arbitrary ways that depend on wavelength, redshift, and age of stellar population. Furthermore, Galacticus allows you to chain together stellar spectra postprocessors into a set to allow multiple postprocessings to be applied. Furthermore again(!), you can define an arbitrary number of sets and apply different sets to different luminosities.

Typical uses of stellar spectra postprocessors include accounting for absorption of galaxy light by the intervening IGM, or capturing only the light from recent star formation (erhaps so that additional dust extinction can be applied to the light of recently formed stars). A full list of the available postprocessors can be found in the Galacticus documentation.

If you don't specify a postprocessing set, the "default" set (consisting of the inoue2014 postprocessor) is applied to each luminosity calculation. To specify other postprocessing sets add the following to your parameter file:

   <value>default recent unabsorbded recentUnabsorbed</value>

where one set must be specified for each luminosity specified in the luminosityFilter parameter. Note that set names can be reused in order to apply the same postprocessor set to multiple luminosities.

The chain of postprocessors to apply for each set is then specified as follows:

   <value>inoue2014 recent</value>

In this case we've constructed three new sets, in addition to the default set (which applies just the inoue2014 postprocessor). The recent set applies both the inoue2014 IGM absorption postprocessor, followed by the recent postprocessor to retain only recently emitted light. The unabsorbed set ignores IGM absorption entirely - it does this by using the identity postprocessor which leaves the spectrum unaffected. Finally, the recentUnabsorbed set applies only the recent filter while ignoring IGM absorption.

In this way it is relatively easy to extract multiple different measures of luminosity from a Galacticus model. For example, you could construct four postprocessor sets, each corresponding to one of the four different IGM absorption models (lycSuppress, madau1995, meiksin2006, and inoue2014 - the latter three of which are shown below for a galaxy at z=3) and apply these to the same luminosity filter to assess how luminosity depends on the IGM model used.