redshiftfile = rp.identify_string(lines, rp.redshiftfile_str, rp.splitting_str) #sys.argv[4] ionfile = rp.identify_string(lines, rp.ionfile_str, rp.splitting_str) #sys.argv[1] densfile = rp.identify_string(lines, rp.densfile_str, rp.splitting_str) double_precision = rp.identify_int(lines, rp.double_precision_str, rp.splitting_str) isPadded = rp.identify_int(lines, rp.padded_str, rp.splitting_str) #np.int32(sys.argv[3]) isPadded_factor = isPadded**(1. / 3.) if (isPadded != 0): gridsize = np.int32( rp.identify_int(lines, rp.gridsize_str, rp.splitting_str) / isPadded_factor) boxsize = rp.identify_float(lines, rp.boxsize_str, rp.splitting_str) / isPadded_factor else: gridsize = rp.identify_int(lines, rp.gridsize_str, rp.splitting_str) boxsize = rp.identify_float(lines, rp.boxsize_str, rp.splitting_str) solve_he = rp.identify_int(lines, rp.solve_he_str, rp.splitting_str) HeIIionfile = rp.identify_string(lines, rp.HeIIionfile_str, rp.splitting_str) HeIIIionfile = rp.identify_string(lines, rp.HeIIIionfile_str, rp.splitting_str) if (solve_he == 1): HeIIionfile = rp.identify_string(lines, rp.HeIIionfile_str, rp.splitting_str) HeIIIionfile = rp.identify_string(lines, rp.HeIIIionfile_str, rp.splitting_str) redshift, snap = np.loadtxt(redshiftfile,
if (solve_he > 0): ionfile = rp.identify_string(lines, rp.HeIIIionfile_str, rp.splitting_str) #sys.argv[1] densfile = rp.identify_string(lines, rp.densfile_str, rp.splitting_str) double_precision = rp.identify_int(lines, rp.double_precision_str, rp.splitting_str) isPadded = rp.identify_int(lines, rp.padded_str, rp.splitting_str) #np.int32(sys.argv[3]) isPadded_factor = isPadded**(1. / 3.) if (isPadded != 0): gridsize = np.int32( rp.identify_int(lines, rp.gridsize_str, rp.splitting_str) / isPadded_factor) boxsize = rp.identify_float(lines, rp.boxsize_str, rp.splitting_str) / isPadded_factor else: gridsize = rp.identify_int(lines, rp.gridsize_str, rp.splitting_str) boxsize = rp.identify_float(lines, rp.boxsize_str, rp.splitting_str) Omegab = rp.identify_float(lines, rp.omega_b_str, rp.splitting_str) Omegam = rp.identify_float(lines, rp.omega_m_str, rp.splitting_str) h = rp.identify_float(lines, rp.h_str, rp.splitting_str) redshift, snap = np.loadtxt(redshiftfile, unpack='True', skiprows=0, usecols=(0, 1)) snap = np.int32(snap) print "\n--------------------------------"