# # FILTER GALAXIES # ################################################################################ temp_infile = open(survey_name + 'mask.pickle', 'rb') mask_resolution, maskfile = pickle.load(temp_infile) temp_infile.close() coord_min_table, mask, ngrid = filter_galaxies(infile, maskfile, mask_resolution, min_dist, max_dist, survey_name, mag_cut, rm_isolated) temp_outfile = open(survey_name + "filter_galaxies_output.pickle", 'wb') pickle.dump((coord_min_table, mask, ngrid), temp_outfile) temp_outfile.close() ################################################################################ # # FIND VOIDS # ################################################################################ temp_infile = open(survey_name + "filter_galaxies_output.pickle", 'rb') coord_min_table, mask, ngrid = pickle.load(temp_infile) temp_infile.close() find_voids(ngrid, min_dist, max_dist, coord_min_table, mask, mask_resolution, out1_filename, out2_filename, survey_name, num_cpus)
# Calculate comoving distance if 'Rgal' not in infile.columns: infile['Rgal'] = Distance(infile['z'], Omega_M, h) ################################################################################ # # FILTER GALAXIES # ################################################################################ coord_min_table, mask, ngrid = filter_galaxies(infile, maskfile, min_dist, max_dist, survey_name, mag_cut, rm_isolated) temp_outfile = open("filter_galaxies_output.pickle", 'wb') pickle.dump((coord_min_table, mask, ngrid), temp_outfile) temp_outfile.close() ################################################################################ # # FIND VOIDS # ################################################################################ temp_infile = open("filter_galaxies_output.pickle", 'rb') coord_min_table, mask, ngrid = pickle.load(temp_infile) temp_infile.close() find_voids(ngrid, min_dist, max_dist, coord_min_table, mask, out1_filename, out2_filename, survey_name)