import pyfits
from scipy import special
from matplotlib import rc
import os, sys, time, getopt, math, random
from matplotlib.ticker import MaxNLocator


savedpi = 250
fileformat = 'png'
savepath = 'radialProfilesSFR/'
#inputfile = '/media/daten/transfer/galacticus.hdf5'
inputfile = 'inputtemp'

h5file = tables.openFile(inputfile,"r")

timeTable = getData.getTimestepTable(h5file)
print timeTable

# In order to plot the physical values we need h
h = 0.73

# Boxsize in Mpc, for easy centering
#boxSize = 32000/1000

# Calculate the center of mass coordinates
# Get dataset at z=0
nodeData = getData.getOutput(h5file,timeTable[len(timeTable)-1,0])
#print 'Check time at center of mass calculation: ', timeTable[len(timeTable)-1,1]
nHalos = len(nodeData.positionX)
comCoord = np.zeros(3)
for i in range(nHalos):
예제 #2
0
import tables
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import math
import getData

savedpi = 250
fileformat = 'png'
savepath = './positionPlots/'
#inputfile = '/media/daten/transfer/galacticus.hdf5'
inputfile = './galacticus_stages_19.hdf5'

h5file = tables.openFile(inputfile, "r")

timeTable = getData.getTimestepTable(h5file)
print timeTable

# In order to plot the physical values we need h
h = 0.72

# Boxsize in Mpc, for easy centering
boxSize = 32000 / 1000

# Calculate the center of mass coordinates
# Get dataset at z=0
nodeData = getData.getOutput(h5file, timeTable[len(timeTable) - 1, 0])
#print 'Check time at center of mass calculation: ', timeTable[len(timeTable)-1,1]
nHalos = len(nodeData.positionX)
comCoord = np.zeros(3)
for i in range(nHalos):