Ejemplo n.º 1
0
DR7_randoms_filename0  = "random-0.dr72bright.fits"
DR7_randoms_filename1  = "random-1.dr72bright.fits"
DR7_randoms_filename10 = "random-10.dr72bright.fits"
MaNGA_targets_filename = "MaNGA_targets_extNSA_tiled_ancillary.fits"

# Imports the DR7 RA/DEC/z/mag
(RA_d, DEC_d, z_d, mr) = md.DR7_data_importer(data_directory + DR7_data_filename)
# Read in the Random data
filenames = [data_directory + DR7_randoms_filename0,
			 data_directory + DR7_randoms_filename1,
			 data_directory + DR7_randoms_filename10]
(RA_r, DEC_r) = md.DR7_randoms_importer(filenames)
# Read in the MaNGA Target Catalogue data
(RA_mng, DEC_mng, z_mng, mr_mng) = md.MANGA_data_importer(data_directory + MaNGA_targets_filename)
# Set the RA/DEC window for galaxy observations
(RA_low, RA_high, DEC_low, DEC_high) = md.initialize_window(170, 20, 2, 2)
# Set bins
bin_num = 10
bin_select = np.logspace(np.log10(0.1), np.log10(50), bin_num, endpoint=True)

########################
# Select data galaxies #
########################
(RA_1, DEC_1, z_1) = md.data_selector(RA_d, DEC_d, z_d,
							   RA_low, RA_high, DEC_low, DEC_high)
data_3vec = [[RA_1[i], DEC_1[i], z_1[i]] for i in range(0, len(RA_1))]
data_cartesian = np.array([md.spherical_to_cartesian(ii[0], ii[1], ii[2])
						   for ii in data_3vec])
data_len  = len(RA_1)
print("Number of data galaxies selected: ", data_len)
Ejemplo n.º 2
0
# Imports the DR7 RA/DEC/z/mag
(RA_d, DEC_d, z_d,
 mr) = md.DR7_data_importer(data_directory + DR7_data_filename)
# Read in the Random data
filenames = [
    data_directory + DR7_randoms_filename0,
    data_directory + DR7_randoms_filename1,
    data_directory + DR7_randoms_filename10
]
(RA_r, DEC_r) = md.DR7_randoms_importer(filenames)
# Read in the MaNGA Target Catalogue data
(RA_mng, DEC_mng, z_mng, mr_mng,
 corr) = md.MANGA_data_importer(data_directory + MaNGA_targets_filename)
#print(corr[0:5])
# Set the RA/DEC window for galaxy observations
(RA_low, RA_high, DEC_low, DEC_high) = md.initialize_window(180, 10, 5, 5)
win = [RA_low, RA_high, DEC_low, DEC_high]
# Set bins
bin_num = 15
bin_select = np.logspace(np.log10(0.1), np.log10(50), bin_num, endpoint=True)
x_axis = (bin_select[1:] + bin_select[:-1]) / 2

manga_data = np.array([[RA_mng[ii], DEC_mng[ii], z_mng[ii]]
                       for ii in range(0, len(RA_mng))])
DR7_data = np.array([[RA_d[ii], DEC_d[ii], z_d[ii]]
                     for ii in range(0, len(RA_d))])
random = np.array([[RA_r[ii], DEC_r[ii]] for ii in range(0, len(RA_r))])
(data_sp, data_c, rand_sp,
 rand_c) = md.setup_data_and_randoms(DR7_data, random, win)
(manga_sp, manga_c, mrand_sp,
 mrand_c) = md.setup_data_and_randoms(manga_data, random, win)