예제 #1
0
 # Calculate the probability distribution of labels
 band_system = convert_lib.set_SCAO()
 fake_error = np.ones(100)
 IR3_arti_flux = np.transpose([
     np.logspace(np.log10(0.000107), np.log10(5500.0), num=100), fake_error
 ])
 IR4_arti_flux = np.transpose([
     np.logspace(np.log10(0.000216), np.log10(3830.0), num=100), fake_error
 ])
 MP1_arti_flux = np.transpose([
     np.logspace(np.log10(0.000898), np.log10(4370.0), num=100), fake_error
 ])
 print(IR3_arti_flux.shape)
 print(IR4_arti_flux.shape)
 print(MP1_arti_flux.shape)
 IR3_arti_mag = ensemble_mjy_to_mag(IR3_arti_flux, 'IR3', band_system)
 IR4_arti_mag = ensemble_mjy_to_mag(IR4_arti_flux, 'IR4', band_system)
 MP1_arti_mag = ensemble_mjy_to_mag(MP1_arti_flux, 'MP1', band_system)
 arti_mag_678 = np.asarray(
     list(
         itertools.product(IR3_arti_mag[:, 0], IR4_arti_mag[:, 0],
                           MP1_arti_mag[:, 0])))
 arti_flux_678 = np.asarray(
     list(
         itertools.product(IR3_arti_flux[:, 0], IR4_arti_flux[:, 0],
                           MP1_arti_flux[:, 0])))
 arti_label_678 = np.zeros(arti_flux_678.shape)
 #-----------------------------------
 # Load AI
 print('Loading AI...')
 width_of_data = 1
예제 #2
0
 IR1flux = np.array(np.transpose([inp_table[:, 11], inp_table[:, 12]]),
                    dtype=float) / 1000
 IR2flux = np.array(np.transpose([inp_table[:, 17], inp_table[:, 18]]),
                    dtype=float) / 1000
 IR3flux = np.array(np.transpose([inp_table[:, 23], inp_table[:, 24]]),
                    dtype=float) / 1000
 IR4flux = np.array(np.transpose([inp_table[:, 29], inp_table[:, 30]]),
                    dtype=float) / 1000
 MP1flux = np.array(np.transpose([inp_table[:, 33], inp_table[:, 34]]),
                    dtype=float) / 1000
 #-----------------------------------
 # Convert 2MASSflux to UKIDSSflux
 print('Convert 2MASSflux to UKIDSSflux')
 twomass_system = convert_lib.set_twomass()
 ukirt_system = convert_lib.set_ukirt()
 J2mag = convert_lib.ensemble_mjy_to_mag(J2flux, 'J', twomass_system)
 H2mag = convert_lib.ensemble_mjy_to_mag(H2flux, 'H', twomass_system)
 K2mag = convert_lib.ensemble_mjy_to_mag(K2flux, 'Ks', twomass_system)
 JUmag, HUmag, KUmag = convert_lib.ensemble_two2u(J2mag, H2mag, K2mag)
 JUflux, eJUflux = convert_lib.ensemble_mag_to_mjy_ufloat(
     JUmag, 'J', ukirt_system)
 HUflux, eHUflux = convert_lib.ensemble_mag_to_mjy_ufloat(
     HUmag, 'H', ukirt_system)
 KUflux, eKUflux = convert_lib.ensemble_mag_to_mjy_ufloat(
     KUmag, 'K', ukirt_system)
 # Form the sed table
 print('Form the tables')
 flux_sed = np.array(
     np.transpose([
         JUflux,
         HUflux,