# BlackBody¶

class astropy.modeling.physical_models.BlackBody(temperature=<Quantity 5000. K>, scale=1.0, **kwargs)[源代码]

temperature数量 [“温度”]

scale浮动或

$B{\nu}（T）=A\frac{2h\nu^{3}/c^{2}}{exp（h\nu/kt）-1}$

>>> from astropy.modeling import models
>>> from astropy import units as u
>>> bb = models.BlackBody(temperature=5000*u.K)
>>> bb(6000 * u.AA)
<Quantity 1.53254685e-05 erg / (cm2 Hz s sr)>

import numpy as np
import matplotlib.pyplot as plt

from astropy.modeling.models import BlackBody
from astropy import units as u
from astropy.visualization import quantity_support

bb = BlackBody(temperature=5778*u.K)
wav = np.arange(1000, 110000) * u.AA
flux = bb(wav)

with quantity_support():
plt.figure()
plt.semilogx(wav, flux)
plt.axvline(bb.nu_max.to(u.AA, equivalencies=u.spectral()).value, ls='--')
plt.show()


(png _, svgpdf

 热通量。 此属性用于指示evaluate方法所需的单元或单元集，并返回将输入映射到单元（或 None 如果接受任何单位）。 当曲线用功率密度表示时的峰值波长。 当功率曲线为峰值时。 描述此类型模型的参数的名称。

 evaluate \（x，温度，刻度） 评估模型。

bolometric_flux

input_units
input_units_equivalencies = {'x': [(Unit("m"), Unit("Hz"), <function spectral.<locals>.<lambda>>), (Unit("m"), Unit("J"), <function spectral.<locals>.<lambda>>), (Unit("Hz"), Unit("J"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("m"), Unit("1 / m"), <function spectral.<locals>.<lambda>>), (Unit("Hz"), Unit("1 / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("J"), Unit("1 / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("1 / m"), Unit("rad / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("m"), Unit("rad / m"), <function spectral.<locals>.<lambda>>), (Unit("Hz"), Unit("rad / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("J"), Unit("rad / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>)]}
lambda_max

nu_max

param_names = ('temperature', 'scale')

scale = Parameter('scale', value=1.0, bounds=(0, None))
temperature = Parameter('temperature', value=5000.0, unit=K, bounds=(0, None))

evaluate(x, temperature, scale)[源代码]

x飘浮，

scale飘浮，

y号码或号码

ValueError

ZeroDivisionError