los_rho_H_ewald = skewers_ewald.rhoH_over_rhoHmean * rho_H_mean los_rho_ewald = los_rho_H_ewald / X los_vel_ewald = skewers_ewald.vel_HI dens_ewald = los_rho_ewald.flatten() / rho_gas_mean_ewald vel_ewald = np.abs(los_vel_ewald.flatten()) #Load Cholla skewers add_factor = True nSnap_cholla = 90 axis_list = ['x', 'y', 'z'] n_skewers_list = [1667, 1667, 1666] data_skewers = load_skewers_multiple_axis(axis_list, n_skewers_list, nSnap_cholla, input_dir, set_random_seed=True) dens_cholla = data_skewers['density'].flatten() / rho_gas_mean_cholla vel_cholla = np.abs(data_skewers['velocity'].flatten()) if add_factor: vel_cholla *= np.sqrt(current_a) current_z = data_skewers['current_z'] print('Current z: {0}'.format(current_z)) n_skewers = data_skewers['n_skewers'] dens_start = np.log10(min(dens_ewald.min(), dens_cholla.min())) dens_end = np.log10(max(dens_ewald.max(), dens_cholla.max())) dens_start = -1.5 dens_end = 3 vel_start = min(vel_ewald.min(), vel_cholla.min())
space_group = outFile.create_group(space) if rank == 0: print('Loading Otical Depth: {0}'.format(nSnap)) inFileName = optical_depth_dir + 'optical_depth_{0}.h5'.format(nSnap) inFile = h5.File(inFileName, 'r') flux_mean_all = inFile[space]['F_mean_vals'][...] F_mean_val = flux_mean_all.mean() current_z_tau = inFile.attrs['current_z'] inFile.close() # Load skewer data skewer_dataset = load_skewers_multiple_axis(axis_list, n_skewers_list, nSnap, input_dir, set_random_seed=False, print_out=print_out) current_z = skewer_dataset['current_z'] current_a = 1. / (current_z + 1) if current_z != current_z_tau: print("ERROR Redshift Mismatch") continue los_density = skewer_dataset['density'] los_HI_density = skewer_dataset['HI_density'] los_velocity = skewer_dataset['velocity'] los_temperature = skewer_dataset['temperature'] power_all = [] for i, skewer_id in enumerate(skewers_ids_proc):