-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_sbpy_simp.py
60 lines (42 loc) · 1.49 KB
/
run_sbpy_simp.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- coding: utf-8 -*-
import StarburstPy as sb
"""
A simple script with the major options.
Author: Ryan Tanner
email: ryan.tanner@nasa.gov
"""
datapaths = sb.indata
datapaths.output_dir = './sboutput'
datapaths.SB99_dir = '../../starburst99'
model_name = 'happy'
sbinput = sb.SbInput(model_name)
#sbinput.set_star_formation(fixed_mass = False, SFR = 15.0)
sbinput.set_star_formation(fixed_mass = True, total_mass = 1e6)
sbinput.set_IMF(IMF = 'Kroupa')
sbinput.set_evolve_track(track = 'Genevav40', Z = 0.002)
#sbinput.set_time(start_time = 0, end_time = 1e7, log_scale = True, nsteps = 1000)
sbinput.set_time(start_time = 0, end_time = 1e7, log_scale = False, dt = 1e5)
# Note: The writeinput option will make a txt file *separate* from the standard
# Starburst99 input file.
sbinput.set_output(writeinput = False,
QUANTA = True,
SNR = True,
HRD = False,
POWER = True,
SP = True,
YIELDS = True,
SPECTRUM = True,
LINE = True,
COLOR = True,
WIDTH = True,
FEATURES = True,
OVI = True,
HIRES = True,
WRLINES = True,
IFASPEC = True)
# Data from Starburst99 is in
# output_data.data
#
# Headers from the output files are found in
# output_data.headers
output_data = sbinput.run_starburst()