dustem_mathis_field.pro 1.24 KB
FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit
; computes the Mathis interstellar radiation field SED (ISRF)
; in W/m2 (4*!pi*nu*I_nu)
; from Mathis et al. 1983, A&A 128, 212
; X	(I): X-grid for the ISRF
; UNIT	(I): unit of the ISRF. Choices are 
;	     'W': wave in um [Default]
;	     'F': frequency in cm-1
;	     'E': energy in eV

 if n_elements( UNIT ) EQ 0 then unit = 'W' $
 else unit = strupcase( strcompress( unit,/rem) )

 ly_limit = 9.11267101235d-2

 x = double( x )

;
; visible part 
;
 wdil = 4.d0 * [ 4.d-13, 1.d-13, 1.d-14]	; Mathis definition
						; 4*!pi*Wdil*B_nu
 field = !pi * x * DUSTEM_BLACKBODY( x, [ 3.d3, 4.d3, 7.5d3 ], wdil=wdil, unit=unit )

;
; UV part
;

; first convert to (lambda / 1e3 AA)
 CASE unit of 

   'W': x3 = 1.d1 * x 

   'F': x3 = 1.d5 / x

   'E': x3 = 12.4 / x

 ENDCASE
 
 il = where( x3 LE 2.46, cl ) 
 if cl GT 0 then field(il) = 0.D0

 il = where( x3 GE 1d1*ly_limit AND x3 LT 1.11, cl )
 if cl GT 0 then field(il) = 1.4817d-6 * x3(il)^(4.4172)
 il = where( x3 GE 1.11 AND x3 LT 1.34, cl ) 
 if cl GT 0 then field(il) = 2.0456d-6 * x3(il)
 il = where( x3 GE 1.34 AND x3 LT 2.46, cl )
 if cl GT 0 then field(il) = 3.3105d-6 * x3(il)^(-0.6678)
  

 RETURN, field
END                             ;FUNCTION DUSTEM_MATHIS_FIELD