Skip to content

Commit

Permalink
prerun
Browse files Browse the repository at this point in the history
changed execute and starformation to running conditions
started plot convertion but not finished
  • Loading branch information
healther committed Apr 5, 2013
1 parent 920bb50 commit 0c4f11c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main(quiet = False):
else:
output_stream = sys.stdout

sfr = .001
sfr = .08
# star mass function
def f(x): # Kouper IMF
#http://adsabs.harvard.edu/abs/2001MNRAS.322..231K
Expand Down Expand Up @@ -52,14 +52,14 @@ def g(x):


# setting up model data
aperas = np.linspace(15000, 50000, 11)
avs = np.linspace(5.0, 50.0, 10)
aperas = np.linspace(10000, 50000, 5)
avs = np.linspace(10.0, 50.0, 5)
l = 0.
parameters = []
for i in range(len(avs)):
for j in range(len(aperas)):
for k in range(len(ages)):
starformation.main(massfunction = mf, starformationhistory = sf[k], A_v = avs[i], sfr = .001, \
starformation.main(massfunction = mf, starformationhistory = sf[k], A_v = avs[i], sfr = .08, \
apera = aperas[j], maxage = ages[k], appendix = "%s_%s_%s_%s" % ('sim',avs[i],aperas[j],ages[k]), quiet=True)
print(avs[i],aperas[j],ages[k], l/len(avs)/len(aperas)/len(ages), file=output_stream)
l = l+1
Expand Down
4 changes: 2 additions & 2 deletions plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main():


X, Y = np.meshgrid(avs, ages)
Z = 559./np.transpose(numbers[:,aperature,:])
Z = 559.*.08/np.transpose(numbers[:,aperature,:])
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm)
fig.colorbar(surf)

Expand Down Expand Up @@ -58,7 +58,7 @@ def main():

x2 = data[:,2].reshape(10, 11, 11)[visual_ex,:,:].reshape(121)
y2 = data[:,1].reshape(10, 11, 11)[visual_ex,:,:].reshape(121)
z2 = 559./data[:,3].reshape(10, 11, 11)[visual_ex,:,:].reshape(121)
z2 = 559.*.08/data[:,3].reshape(10, 11, 11)[visual_ex,:,:].reshape(121)
ax2.scatter(x2,y2,z2)
ax2.set_xlabel('age')
ax2.set_ylabel('apera')
Expand Down
2 changes: 1 addition & 1 deletion starformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ def g(x):
print( "total runtime %f" %(t6-t0), file=output_stream)
print( "finishing script %f" %t6, file=output_stream)

main()
main(sfr = .08)

0 comments on commit 0c4f11c

Please sign in to comment.