Skip to article frontmatterSkip to article content

Week 3 Assignment

The main goal this week is to get familiar with importing (and using) three really useful packages: numpy, astropy and matplotlib. Throughout the assignment we will also write some for-loops and practice logic statements This assignment is meant to be done in groups of 2-3 people.

Part 1: Loading in the SubHalo Merger Tree Data (10 - 15 minutes)

All galaxies live inside large accumulations of dark matter. These accumulations can be thought of as clouds or “halos”. A “merger tree” is a way of understanding the accretion history of a dark matter host halo. The trunk represents the present day host halo, and every branch is a merger event (a smaller halo being eaten up). The higher up the tree you go, the further back in time you look! I work with a code named SatGen that can create these merger trees and today you will be handling the output of the SatGen code.

The code outputs several numpy arrays that are compressed together into a single .npz file. (See this link https://numpy.org/doc/stable/reference/generated/numpy.savez.html)

Part 2: Playing around with halo mass (10 - 15 minutes)

Now that you have opened up the data, I can tell you that the host halo is saved in the first index of the mass array. The rest of the indices correspond to the subhalos that were accreted by the host during the “simulation”.

WOW! There are so many more low mass subhalos than there are high mass subhalos!! LCDM predicts a steep mass function!

Part 3: Plotting the merger tree! (20-25 minutes)

Okay so as we know, there are a bunch of subhalos in this merger tree. If we wanted plot all of them with respect to time, the figure would be a bit crowded. Instead lets only pick the ones that are above a given mass at present day.

Can you see the little dips in the accretion histories? That is when the subhalo is accreted onto the host! Notice there is no such dip for the red line!