Пример #1
0
temp_outfile = open(survey_name + 'mask.pickle', 'wb')
pickle.dump((mask_resolution, maskfile), temp_outfile)
temp_outfile.close()

################################################################################
#
#   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()
Пример #2
0
    '''
    print(infile.columns)
    print('Please rename columns')
    exit()
    '''
    infile['magnitude'].name = 'rabsmag'

# 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)


################################################################################
#
#   FIND VOIDS
#
################################################################################


find_voids(ngrid, min_dist, max_dist, coord_min_table, mask, out1_filename, out2_filename, survey_name)