forked from jamiefarnes/negative-mass-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipe.py
32 lines (23 loc) · 771 Bytes
/
pipe.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
""" pipe.py: A script to demonstrate a standard run of an N-body simulation.
PYTHONPATH=''
"""
from negmass_nbody.initialise.init import init_dm_halo, init_structure_formation
from negmass_nbody.simulate.sim import run_nbody
from negmass_nbody.visualise.vis import make_images, make_videos
__author__ = "Jamie Farnes"
__email__ = "[email protected]"
# Setup the simulation for either halo or structure formation:
SPECIFY_SIM = 'halo'
if SPECIFY_SIM == 'halo':
init_dm_halo()
elif SPECIFY_SIM == 'structure':
init_structure_formation()
else:
print("ERROR: Unknown simulation type.")
# Create the snapshots:
run_nbody()
# Make images from the data:
make_images()
# Concatenate images into video format:
make_videos()