Wednesday, May 13, 2015

A New Format For Galacticus Parameter Files

As part of the Galacticus v0.9.4 development, we've introduced a major change in the structure of Galacticus parameter files. This change provides three improvements:
  1. Allows for more compact XML;
  2. Makes associations between groups of parameters more clear (and prevents the need for extremely long parameter names!);
  3. Paves the way for more complete object composition within Galacticus defined directly through the XML parameter file.
As an example, here's the old format for parameter files showing setting of cosmological parameters:

  <!-- Cosmological parameters -->


In the new format, this same set of parameters is described as:

  <!-- Cosmological parameters and options -->
  <cosmologyParametersMethod value="simple">
    <HubbleConstant  value="70.2"   />
    <OmegaMatter     value="0.2725" />
    <OmegaDarkEnergy value="0.7275" />
    <OmegaBaryon     value="0.0455" />
    <temperatureCMB  value="2.72548"/>


The parameter name is now simply the name of each XML element, and the parameter value is stored as an attribute of the element. (You can also store the value in a <value> element within each parameter if necessary.) In this example, values of the "simple" cosmology parameters method are now specified as subparameters within the cosmologyParametersMethod element itself.

If you have old-format parameter files, you can convert them to the new format using the migration script:

scripts/aux/ oldParametersFile.xml newParametersFile.xml

Internally, this new format will be used to allow detailed construction of objects (e.g. the ability to construct multiple cosmological models each with different sets of cosmology parameters), and, for example, to construct nested sets of filters which can be applied to merger tree construction (e.g. build a tree → measure the tree information content → prune the tree → measure the information content again).

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..........?