Try run_sbpy_simp.py. Only the most common parameters are shown in that example script. Author: Ryan Tanner email: [email protected] """ datapaths = sb.indata datapaths.output_dir = './sboutput' datapaths.SB99_dir = '../../starburst99' model_name = 'happy' sbinput = sb.SbInput(model_name, rank = 3) sbinput.set_star_formation(fixed_mass = False, SFR = 1.0) sbinput.set_star_formation(fixed_mass = True, total_mass = 1e6) sbinput.set_IMF(IMF = 'Salpeter') sbinput.set_IMF(IMF = 'Kroupa') sbinput.set_IMF(IMF_exp = [1.3,2.3], IMF_bound = [0.1, 0.5, 120.0], mass_lo = 0.1, mass_hi = 120.0) sbinput.set_SN_cut_off(lo_mass = 8.0, hi_mass = 120.0) sbinput.set_evolve_track(track = 'Genevav40', Z = 0.002) sbinput.set_wind_model(wind = 'Evolution') sbinput.set_time(start_time = 0, end_time = 1e8, log_scale = True, nsteps = 2000)
# Sets path links to current directory, output directory, and the directory where # the Starburst99 fortran code is compiled. Defaults set to current directory. datapaths = sb.indata datapaths.output_dir = './sboutput' datapaths.SB99_dir = '../../starburst99' # A model name must be passed in to make the input object. model_name = 'happy' # The input object "sbinput" contains all the input parameters and methods for # setting all parameters, and a method for running Starburst99. # If just the model name is given then the default parameters are set to the # defaults from the Starburst99 webpage. sbinput = sb.SbInput(model_name) # Method for running Starburst99 based on input parameters that have been set. output_data = sbinput.run_starburst() # Data from Starburst99 is in # output_data.data # # Headers from the output files are found in # output_data.headers # # See run_sbpy_all_options.py for examples of all possible input parameters.
# -*- coding: utf-8 -*- """ A script to run multiple Starburst99 models. Runs 10 models with continuous star formation with SFR from 1.0 to 100.0 spaced logarithmically. Author: Ryan Tanner email: [email protected] """ import StarburstPy as sb import numpy as np datapaths = sb.indata datapaths.output_dir = '../sboutput/sfr' datapaths.SB99_dir = '../../starburst99' model_name = 'happy' sbinput = sb.SbInput('happy', chatter = 2) sbinput.set_time(start_time = 0, end_time = 1e7, log_scale = False, dt = 1e5) sbinput.set_output(out_type = 'original') sfrrange = np.logspace(1,2,num=10) for sfr in sfrrange: sbinput.set_model_name(model_name = model_name+'{0}'.format(int(sfr))) sbinput.set_star_formation(fixed_mass = False, SFR = sfr) print(model_name+'{0}'.format(int(sfr))) output_data = sbinput.run_starburst()