Monday, April 11, 2016

Enhancing the Resolution of N-body Merger Trees

We've just submitted a paper to the arXiv which describes a technique for enhancing the resolution of merger trees extracted from N-body simulations. The goal of this technique is to ensure that semi-analytic models applied to merger trees from cosmological N-body simulations give converged results.

This isn't as simple as it first appears - even if an N-body simulation has resolution sufficient to resolve the halos which you expect to host galaxies of interest with, say, 100 particles, that doesn't mean it has sufficient resolution to resolve the progenitors of that halo. Since structure formation in CDM is inherently hierarchical any halo gets built through the merging of smaller systems.

Importantly for semi-analytic models galaxies which form in those smaller, progenitor halos can influence the physical properties of the galaxy forming in the final halo. For example, galaxies in progenitor halos can produce metals which contaminate the halo of the main galaxy altering cooling rates, or can simply lock up baryons into stars making them unavailable for star formation in the main galaxy. If those progenitor halos are not resolved then this potentially important activity lower down the hierarchy is missed, and the main galaxy properties can be computed incorrectly.

To remedy this problem, we propose augmenting the resolution of N-body merger trees by grafting in higher resolution branches - generated using a Monte Carlo procedure (the PCH algorithm from Parkinson, Cole & Helly 2008) - which match the existing halo masses of the tree but provide a statistically valid sample of lower mass progenitor halos.

The process is illustrated by this schematic:

Panel a: A simplified diagram of a merger tree extracted from an N-body simulation. Circles represent halos (with radius indicating mass). Time increases in the direction shown by the arrow, and halos are located at quantized redshifts, labelled z0...z2 , and shown by horizontal, dot-dot-dashed lines. Dashed lines connect halos to their direct progenitors. One halo at z0 (highlighted by the yellow color and red outline) is selected for augmentation. This halo’s progenitors at z1 are also highlighted in yellow. Panel b: A trial tree (shown in blue) is generated using the PCH algorithm and compared to the halos of interest in the original tree. In this case, the match between trial tree and original tree halo masses is sufficiently close
to be deemed acceptable. Panel c: The accepted trial tree is grafted into the original tree. Note that the augmented node and its progenitors from the original tree are retained (so their masses are unchanged), but now with the structure of the trial tree grafted between them. Panel d: Where the trial tree has halos at z1 which did not match any halo in the existing tree (and are below the resolution of the original tree by construction), a new tree is grown from each such halo and attached. This process is repeated for each of the green halos in the original tree.

How well does it work? Very well! Check the paper for tests of the convergence of the technique and its ability to recover the statistics of N-body merger tree conditional mass functions. We also explore how well it leads to convergence in galaxy properties. Here's an example where we augment tree from the Millennium Simulation to match the resolution of the Millennium-II Simulation and then compare per-halo galaxy stellar mass functions:
Solid lines are for central galaxies, dashed are for satellite galaxies. Galaxies formed in unaugmented Millennium trees (red lines) differ significantly in their properties from those formed in Millennium-II trees (blue lines). These trees differ only in their resolutions, all other properties are identical. If we augment the Millennium trees to match the resolution of Millennium-II we get the green lines, which now agree much more closely with the results from the Millennium-II trees.

The augmenting code is available within Galacticus as a merger tree operator. A merger tree operator is applied to each tree before galaxy formation calculations begin and can make arbitrary modifications to the tree. In the case of augmenting we actually want to apply several operators. So, to augment you'd add something like this to your parameter file:

<mergerTreeOperatorMethod value="sequence">
  <mergerTreeOperatorMethod value="regridTimes">
    <expansionFactorEnd value="1.0" />
    <expansionFactorStart value="0.047" />
    <regridCount value="60" />
    <snapshotRedshifts value="19.915688 18.243723 16.724525 15.343073 14.085914 12.940780
                  11.896569 10.943864 10.073462  9.277915  8.549912  7.883204
                  7.272188  6.711586  6.196833  5.723864  5.288833  4.888449
                  4.519556  4.179469  3.865683  3.575905  3.308098  3.060419
                  2.831182  2.618862  2.422044  2.239486  2.070027  1.912633
                  1.766336  1.630271  1.503636  1.385718  1.275846  1.173417
                  1.077875  0.988708  0.905463  0.827699  0.755036  0.687109
                  0.623590  0.564177  0.508591  0.456577  0.407899  0.362340
                  0.319703  0.279802  0.242469  0.207549  0.174898  0.144383
                  0.115883  0.089288  0.064493  0.041403  0.019933  0.000000" />
    <snapshotSpacing value="list" />
      </mergerTreeOperatorMethod>
      <mergerTreeOperatorMethod value="pruneByMass">
    <massThreshold value="7.08e10" />
    <preservePrimaryProgenitor value="true" />
      </mergerTreeOperatorMethod>
      <mergerTreeOperatorMethod value="augment">
    <attemptsMaximum value="10000" />
    <massCutOff value="7.08e10" />
    <massCutOffAttemptsMaximum value="50" />
    <massCutOffScaleFactor value="0.0" />
    <mergerTreeBuilderMethod value="cole2000">
          <accretionLimit value="0.1" />
          <branchIntervalStep value="true" />
          <mergeProbability value="0.1" />
          <mergerTreeMassResolutionMethod value="fixed">
            <massResolution value="2.5e9" />
          </mergerTreeMassResolutionMethod>
          <randomSeedsFixed value="false" />
    </mergerTreeBuilderMethod>
    <rescaleMaximum value="20" />
    <retryMaximum value="50" />
    <snapshotRedshifts value="19.915688 18.243723 16.724525 15.343073 14.085914 12.940780
                  11.896569 10.943864 10.073462  9.277915  8.549912  7.883204
                  7.272188  6.711586  6.196833  5.723864  5.288833  4.888449
                  4.519556  4.179469  3.865683  3.575905  3.308098  3.060419
                  2.831182  2.618862  2.422044  2.239486  2.070027  1.912633
                  1.766336  1.630271  1.503636  1.385718  1.275846  1.173417
                  1.077875  0.988708  0.905463  0.827699  0.755036  0.687109
                  0.623590  0.564177  0.508591  0.456577  0.407899  0.362340
                  0.319703  0.279802  0.242469  0.207549  0.174898  0.144383
                  0.115883  0.089288  0.064493  0.041403  0.019933  0.000000" />
    <toleranceScale value="0.15" />
      </mergerTreeOperatorMethod>
      <mergerTreeOperatorMethod value="conditionalMF">
    <massRatioCount value="25" />
    <massRatioMaximum value="2.0" />
    <massRatioMinimum value="2.0e-6" />
    <outputGroupName value="treeStatisticsAfterInsertion" />
    <parentMassCount value="20" />
    <parentMassMaximum value="1.0e15" />
    <parentMassMinimum value="2.36e10" />
    <parentRedshifts value="0.0 0.0" />
    <primaryProgenitorDepth value="4" />
    <progenitorRedshifts value="0.508591 1.077875" />
  </mergerTreeOperatorMethod>
</mergerTreeOperatorMethod>

We use a sequence operator, which simply applies the sequence of operators it contains in order to each tree. That sequence of operators does the following:
  1. The regridTimes operator ensures that the halos of the tree are located precisely at the given set of redshifts. It will snap halos to those redshifts if they differ slightly (e.g. due to lack of precision in the input data), and interpolate halos to snapshots where they are missing. This ensures that the tree is in a suitable state for augmenting.
  2. The pruneByMass operator prunes away branches below the given mass scale - we want to ensure that we don't attempt to augment low mass halos where the N-body-determined properties may be unreliable (due to limited numbers of particles).
  3. The augment operator does the work of augmenting the tree. We specify the mass at which the trees were cut off (by the pruneByMass operator), and give it a tree builder algorithm with which to construct new branches (this also specifies the mass resolution of those new branches).
  4. Finally, we use a conditionalMF operator to accumulate statistics on the tree (including the conditional mass function) and output those to the Galacticus output file.
This technique should allow converged galaxies properties to be predicted even in simulations which do not fully resolve the galaxy formation hierarchy.

2 comments:

  1. Well this is a blast from the past. I worked on this for my Masters thesis with Hannah and Professor Cole. Don't suppose you used any of my old Galform code, did you? I never did get that paper published...

    Neat way of visualising the trees. The best I managed was this: http://www.greyfusion.net/plotter/images/38-1.png
    In fact, looks like I left the plotter interface online.

    - Chris Tonks

    ReplyDelete
    Replies
    1. Hi Chris - No, all newly written code within a different semi-analytic model. I'm hoping to be able to apply this method to some really large cosmological simulations in the near future. Still some work to do on optimizing it so that it can run fast enough though. -Andrew

      Delete