# dust opacities. df = h5py.File(cfg.par.dustdir + cfg.par.dustfile, 'r') o = df['optical_properties'] df_nu = o['nu'] df_chi = o['chi'] df.close() # add sources to hyperion stars_list, diskstars_list, bulgestars_list, reg = sg.star_list_gen( boost, dx, dy, dz, reg, ds) nstars = len(stars_list) if cfg.par.BH_SED == True: BH_source_add(m, reg, df_nu, boost) # figure out N_METAL_BINS: fsps_metals = np.loadtxt(cfg.par.metallicity_legend) N_METAL_BINS = len(fsps_metals) if par.FORCE_BINNING == False: stellar_nu, stellar_fnu, disk_fnu, bulge_fnu = sg.allstars_sed_gen( stars_list, diskstars_list, bulgestars_list, ds.cosmological_simulation, sp) m = add_newstars(df_nu, stellar_nu, stellar_fnu, disk_fnu, bulge_fnu, stars_list, diskstars_list, bulgestars_list, ds.cosmological_simulation, m) else: # note - the generation of the SEDs is called within
df = h5py.File(cfg.par.dustdir + cfg.par.dustfile, 'r') o = df['optical_properties'] df_nu = o['nu'] df_chi = o['chi'] df.close() # add sources to hyperion ad = pf.all_data() stars_list, diskstars_list, bulgestars_list = sg.star_list_gen( boost, xcent, ycent, zcent, dx, dy, dz, pf, ad) nstars = len(stars_list) if cfg.par.BH_SED == True: BH_source_add(m, pf, df_nu, boost) # figure out N_METAL_BINS: fsps_metals = np.loadtxt(cfg.par.metallicity_legend) N_METAL_BINS = len(fsps_metals) if par.FORCE_BINNING == False: stellar_nu, stellar_fnu, disk_fnu, bulge_fnu = sg.allstars_sed_gen( stars_list, diskstars_list, bulgestars_list, pf.cosmological_simulation, sp) m = add_newstars(df_nu, stellar_nu, stellar_fnu, disk_fnu, bulge_fnu, stars_list, diskstars_list, bulgestars_list, pf.cosmological_simulation, m) else: # note - the generation of the SEDs is called within