def test_blackbody_synphot():
 fac = ((np.pi * ((const.R_sun / const.kpc) ** 2)) * u.sr)
 with np.errstate(all=u'ignore'):
  flux = (blackbody_nu(([100, 1, 1000, 10000.0, 100000.0] * u.AA), 5000) * fac)
 assert (flux.unit == FNU)
 assert (np.log10(flux[0].value) < (-143))
 np.testing.assert_allclose(flux.value[1:], [0, 2.01950807e-34, 3.78584515e-26, 1.90431881e-27], rtol=0.01)

def test_blackbody_synphot ( ) : fac = ( ( np . pi * ( ( const . R_sun / const . kpc ) ** 2 ) ) * u . sr ) with np . errstate ( all = u'ignore' ) : flux = ( blackbody_nu ( ( [ 100 , 1 , 1000 , 10000.0 , 100000.0 ] * u . AA ) , 5000 ) * fac ) assert ( flux . unit == FNU ) assert ( np . log10 ( flux [ 0 ] . value ) < ( - 143 ) ) np . testing . assert_allclose ( flux . value [ 1 : ] , [ 0 , 2.01950807e-34 , 3.78584515e-26 , 1.90431881e-27 ] , rtol = 0.01 )
test that it is consistent with iraf synphot bbfunc .