#NEWLINE# def set_lte( self , optical_properties , mean_opacities ) : #NEWLINE# #INDENT# self . is_lte = True #NEWLINE# temperature = mean_opacities . temperature #NEWLINE# specific_energy = mean_opacities . specific_energy #NEWLINE# planck_nu = planck_nu_range ( temperature [ 0 ] , optical_properties [ ( - 1 ) ] ) #NEWLINE# self . nu = nu_common ( planck_nu , optical_properties . nu ) #NEWLINE# if ( planck_nu . min ( ) < optical_properties . nu . min ( ) ) : #NEWLINE# #INDENT# logger . warn ( 'Planck function for lowest temperature not completely covered by opacity function' ) #NEWLINE# self . nu = self . nu [ ( self . nu >= optical_properties . nu . min ( ) ) ] #NEWLINE# #UNINDENT# if ( planck_nu . max ( ) > optical_properties . nu . max ( ) ) : #NEWLINE# #INDENT# logger . warn ( 'Planck function for highest temperature not completely covered by opacity function' ) #NEWLINE# self . nu = self . nu [ ( self . nu <= optical_properties . nu . max ( ) ) ] #NEWLINE# #UNINDENT# kappa_nu = interp1d_fast_loglog ( optical_properties . nu , optical_properties . kappa , self . nu ) #NEWLINE# self . var_name = 'specific_energy' #NEWLINE# self . var = specific_energy #NEWLINE# self . jnu = np . zeros ( ( len ( self . nu ) , len ( temperature ) ) ) #NEWLINE# for ( it , T ) in enumerate ( temperature ) : #NEWLINE# #INDENT# self . jnu [ : , it ] = ( kappa_nu * B_nu ( self . nu , T ) )