Snapshots object stores the information how a lightcone is build from snapshots
snapshots = Snapshots()
snapshot.insert(filename_fof, filename_halo_mass, [a_snp, a_min, a_max])
Argument | Explaination |
---|---|
filename_fof | Filename of the halo catalogue at a_snp |
filename_halo_mass | Filename for the nfof - halo_mass calibration |
a_min, a_max | Range of scale factor used for a lightcone |
Method | Result |
---|---|
len(snapshots) | Number of snapshots inserted |
snapshot[i] | A tuple (filename_fof, a_snp, a_min, a_max) for i the snapshot |
In [1]:
import json
import mockgallib as mock
# Snapshot data are written in ../data/param.json file
with open('../data/param.json', 'r') as f:
param = json.load(f)
print('snapshot data in param.json')
param['snapshots']
Out[1]:
In [3]:
snapshots = mock.Snapshots()
for snp in param['snapshots']:
abc = snp['abc']
filename_fof = '../data/fof/%s/fof06100%s' % (abc, abc)
filename_halo_mass = '../data/halo_mass/halomass_%s.txt' % abc
snapshots.insert(filename_fof, filename_halo_mass, snp['a'])
print(len(snapshots))
for snp in snapshots:
print(snp)
In [4]:
%%html
<style>table {float:left}</style>