notebook accompanying catalog.py

  • Illustrates how to generate new subhalo accretion history catalogs

In [1]:
import numpy as np 
import catalog as Cat

import matplotlib.pyplot as plt
from ChangTools.plotting import prettycolors

generate new subhalo and central subhalo catalogs


In [6]:
sig = 0.0
smf = 'li-march'
nsnap0 = 20

In [2]:
subhist = Cat.SubhaloHistory(sigma_smhm=0., smf_source='li-march', nsnap_ancestor=20)

In [4]:
subhist.Build()


# in treepm.subhalo_io.Treepm():
  read /data1/arwetzel/lcdm250/snapshot.txt
  read  5407196 subhalo from subhalo_tree_01.dat
  read  5485481 subhalo from subhalo_tree_02.dat
  read  5517336 subhalo from subhalo_tree_03.dat
  read  5548084 subhalo from subhalo_tree_04.dat
  read  5583078 subhalo from subhalo_tree_05.dat
  read  5615345 subhalo from subhalo_tree_06.dat
  read  5650410 subhalo from subhalo_tree_07.dat
  read  5682696 subhalo from subhalo_tree_08.dat
  read  5715688 subhalo from subhalo_tree_09.dat
  read  5748795 subhalo from subhalo_tree_10.dat
  read  5779167 subhalo from subhalo_tree_11.dat
  read  5805949 subhalo from subhalo_tree_12.dat
  read  5824060 subhalo from subhalo_tree_13.dat
  read  5837797 subhalo from subhalo_tree_14.dat
  read  5841491 subhalo from subhalo_tree_15.dat
  read  5836226 subhalo from subhalo_tree_16.dat
  read  5823060 subhalo from subhalo_tree_17.dat
  read  5795900 subhalo from subhalo_tree_18.dat
  read  5753867 subhalo from subhalo_tree_19.dat
  read  5697344 subhalo from subhalo_tree_20.dat
Box Length 357.142863225
Box Hubble 0.7
0.920929627851  of subhalos have matches
0.887658409275  of subhalos have matches
0.859737653305  of subhalos have matches
0.835911810854  of subhalos have matches
0.814345549893  of subhalos have matches
0.793550113589  of subhalos have matches
0.773185399605  of subhalos have matches
0.752893551482  of subhalos have matches
0.732432299476  of subhalos have matches
0.711677364756  of subhalos have matches
0.69038573782  of subhalos have matches
0.668393932826  of subhalos have matches
0.645801261874  of subhalos have matches
0.622589600969  of subhalos have matches
0.598477473352  of subhalos have matches
0.573822735481  of subhalos have matches
0.548460976817  of subhalos have matches
0.522477454119  of subhalos have matches
0.49607652469  of subhalos have matches

In [5]:
subhist._CheckHistory()


0.49607652469  of the subhalos 
at nsnap = 1 has matches throughout
---
0.984198204081  of the subhalos with M*_sham > 9. 
at nsnap = 1 has matches throughout

generate central subhalo accretion history catalogs


In [8]:
censub = Cat.PureCentralHistory(sigma_smhm=sig, smf_source=smf, nsnap_ancestor=nsnap0)

In [9]:
censub.Build()


3887158  of 5407196  subhalos at nsnap=1 are pure centrals
1556958  of 3887158  central subhalos at nsnap=1 are pure (central throughout)
0.879953715851  central subhalos w/ M* > 9. at nsnap=1 are pure throughout z < 1
0.884057770618  central subhalos w/ M* > 9.5 at nsnap=1 are pure throughout z < 1
writing to ...  /home/users/hahn/projects/centralMS/dat/PureCentralHistory.sigma_SMHM0.0.smf_li-march.Anc_nsnap20.hdf5

In [10]:
censub.Downsample()


9.99479 15.4618
downsampled by  33 x
writing to ...  /home/users/hahn/projects/centralMS/dat/PureCentralHistory.sigma_SMHM0.0.smf_li-march.Anc_nsnap20.down33x.hdf5

In [ ]: