本文整理汇总了Python中hyperion.model.Model.set_copy_input方法的典型用法代码示例。如果您正苦于以下问题:Python Model.set_copy_input方法的具体用法?Python Model.set_copy_input怎么用?Python Model.set_copy_input使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hyperion.model.Model
的用法示例。
在下文中一共展示了Model.set_copy_input方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from hyperion.model import Model [as 别名]
# 或者: from hyperion.model.Model import set_copy_input [as 别名]
# Set up illuminating source:
wav, fnu = np.loadtxt('data/BB_T10000_L100000.dat', usecols=[0,1], unpack=True)
nu = c / (wav * 1.e-4)
nu = nu[::-1]
fnu = fnu[::-1]
s = m.add_point_source()
s.position = (0., 0., 4 * pc)
s.luminosity = 3.839e38
s.spectrum = (nu, fnu)
# Set up number of photons
m.set_n_photons(initial=settings['temperature']['n_photons'], imaging=0)
m.conf.output.output_specific_energy = 'all'
# The settings below converge after 4 iterations, so we force 10 iterations
# instead to be safe since this run doesn't take too long.
# m.set_n_initial_iterations(NITER_MAX)
# m.set_convergence(True, percentile=99.9, absolute=2., relative=1.01)
m.set_n_initial_iterations(settings['temperature']['n_iter'])
# Don't copy input into output
m.set_copy_input(False)
# Write out and run
model_name = 'models/hyper_slab_eff_t{0}_temperature'.format(TAU_LABEL[tau_v])
m.write(model_name + '.rtin', overwrite=True, copy=False)
# m.run(model_name + '.rtout', mpi=True, overwrite=True, n_processes=12)