Exemple #1
0
else:
    # note - the generation of the SEDs is called within
    # add_binned_seds itself, unlike add_newstars, which requires
    # that sg.allstars_sed_gen() be called first.

    m = add_binned_seds(df_nu, stars_list, diskstars_list, bulgestars_list,
                        pf.cosmological_simulation, m, sp)

# save SEDs
# stars and black holes can't both be in the sim and write stellar SEDs to a file becuase they have different wavelength sizes
if (par.STELLAR_SED_WRITE == True) and not (par.BH_SED):
    stellar_sed_write(m)

# provisional and not tested or implemented yet
SKIRT_data_dump(pf, ad, m, stars_list, 10)

nstars = len(stars_list)
nstars_disk = len(diskstars_list)
nstars_bulge = len(bulgestars_list)
'''
#EXPERIMENTAL FEATURES
if par.SOURCES_IN_CENTER == True:
    for i in range(nstars):
        stars_list[i].positions[:] =  np.array([xcent,ycent,zcent])
    for i in range(nstars_bulge):
        bulgestars_list[i].positions[:] =  np.array([xcent,ycent,zcent])
    for i in range(nstars_disk):
        diskstars_list[i].positions[:] = np.array([xcent,ycent,zcent])

if par.SOURCES_RANDOM_POSITIONS == True:
Exemple #2
0
else:
    # note - the generation of the SEDs is called within
    # add_binned_seds itself, unlike add_newstars, which requires
    # that sg.allstars_sed_gen() be called first.

    m = add_binned_seds(df_nu, stars_list, diskstars_list, bulgestars_list,
                        ds.cosmological_simulation, m, sp)

# save SEDs
# stars and black holes can't both be in the sim and write stellar SEDs to a file becuase they have different wavelength sizes
if (par.STELLAR_SED_WRITE == True) and not (par.BH_SED):
    stellar_sed_write(m)

if ds_type in ['gadget_hdf5', 'tipsy', 'arepo_hdf5']:
    SKIRT_data_dump(reg, ds, m, stars_list, ds_type, 10)

nstars = len(stars_list)
nstars_disk = len(diskstars_list)
nstars_bulge = len(bulgestars_list)
'''
#EXPERIMENTAL FEATURES
if par.SOURCES_IN_CENTER == True:
    for i in range(nstars):
        stars_list[i].positions[:] =  np.array([xcent,ycent,zcent])
    for i in range(nstars_bulge):
        bulgestars_list[i].positions[:] =  np.array([xcent,ycent,zcent])
    for i in range(nstars_disk):
        diskstars_list[i].positions[:] = np.array([xcent,ycent,zcent])

if par.SOURCES_RANDOM_POSITIONS == True:


#set the random seets
if cfg.par.FORCE_RANDOM_SEED == False:
    m.set_seed(random.randrange(0,10000)*-1)
else:
    m.set_seed(cfg.par.seed)

# save SEDs
# stars and black holes can't both be in the sim and write stellar SEDs to a file becuase they have different wavelength sizes
if (par.STELLAR_SED_WRITE == True) and not (par.BH_SED):
    stellar_sed_write(m)

if ds_type in ['gadget_hdf5','tipsy','arepo_hdf5'] and cfg.par.SKIRT_DATA_DUMP:
    SKIRT_data_dump(reg, ds, m, stars_list, bulgestars_list, diskstars_list, ds_type, sp)

nstars = len(stars_list)
nstars_disk = len(diskstars_list)
nstars_bulge = len(bulgestars_list)


'''
#EXPERIMENTAL FEATURES
if par.SOURCES_IN_CENTER == True:
    for i in range(nstars):
        stars_list[i].positions[:] =  np.array([xcent,ycent,zcent])
    for i in range(nstars_bulge):
        bulgestars_list[i].positions[:] =  np.array([xcent,ycent,zcent])
    for i in range(nstars_disk):
        diskstars_list[i].positions[:] = np.array([xcent,ycent,zcent])