Function mag2flux_2mass_cohen, mag, wave=wave, z=z, band=band, $
slope=slope, fd_per_a=fd_per_a, fd_per_hz=fd_per_hz, jy=jy
;+
;NAME:
; mag2flux_2mass_cohen
;PURPOSE:
; compute 2MASS monochrontic flux from magnitude
;CALLING SEQUENCE:
; result=mag2flux_2mass_cohen(mag,wave=wave,band=band,slope=slope,/A)
;INPUT:
; mag ---- 2MASS magnitude
;OPTION KEYWORD INPUT:
; wave ---- wavelength at which the monochromatic flux to be
; calculated. (Unit:micrometer)
; if z (redshift) keyword is specified then this means
; the wavelength in the rest frame of the object at z
; z ---- redshift; unspecified if only observed frame is
; concerned
; slope ---- spctral slope in wavelength space
; S_nu=A*nu^(-slope)
; band ---- string, one of the following
; 'J','H','Ks'
;OUTPUT:
; flux at given wavelength as lambda*f(lambda)
; in erg/s/cm2 (default)
; If output keyword specified, then
; /fd_per_a: return flux density in erg/s/cm2/A
; /fd_per_hz: return flux density in erg/s/cm2/Hz
; /jy: return flux density in Jy
;METHOD:
; see Cohen Martin, Wheaton Wm.A, Megeath S.T
; Astronomical Journal, Volume 126,1090
; 'Spectral Irradiance Calibration in the Infrared.
; XIV. The Absolute Calibration of 2MASS '
;REVISION HISTORY:
; Original by DL.Wang,Oct-12-2007,Fri
;-
if not keyword_set(z) then z=0. ; default no redshift
;transform wavelength from micrometer to A
waveA=wave*1.0D+4
;transform wavelength from observation frame to rest frame
wave_z=waveA*(1.0+z)
;light velocity in vcaurme(A/s)
lightspeed=2.998D+18
;effective wavelengths of J, H, Ks in Unit (A)
effwave = [12350.0, 16620.0, 21600.0]
; zero point offset
zpoff = [0.001, -0.019, 0.017]
;0mag Flux in Jy
Flux_nu = [1594.0, 1024.0, 666.7]
;0mag Flux in W*(cm^-2)*(micrometer^-1)
Flux_lamda = [3.129E-13, 1.133E-13, 4.283E-14]
case band of
'J':begin
Flux_nu0=Flux_nu[0]
Flux_lamda0=Flux_lamda[0]
zpoff0=zpoff[0]
ewave=effwave[0]
end
'H':begin
Flux_nu0=Flux_nu[1]
Flux_lamda0=Flux_lamda[1]
zpoff0=zpoff[1]
ewave=effwave[1]
end
'Ks':begin
Flux_nu0=Flux_nu[2]
Flux_lamda0=Flux_lamda[2]
zpoff0=zpoff[2]
ewave=effwave[2]
end
endcase
flux_hz=Flux_nu0*10.0D0^(-0.4*(mag+zpoff0))
flux_A=Flux_lamda0*10.0D0^(-0.4*(mag+zpoff0))
flux_A_z=flux_A*(wave_z/ewave)^(-2.0+slope)
flux_hz_z=flux_hz*(wave_z/ewave)^(-slope)
if keyword_set(jy) then C00=1.0D-23 else C00=1.0D0
flux=wave_z*flux_A_z*1.0D3
flux0=(lightspeed/wave_z)*flux_hz_z*1.0D-23
print,'flux A :',flux
print,'flux Hz:',flux0
if keyword_set(fd_per_a) then begin
return,flux/waveA
endif else begin
if keyword_set(fd_per_hz) then begin
freq = lightspeed/waveA
return,flux0/freq/C00
endif else return, flux
endelse
End
https://blog.sciencenet.cn/blog-456360-657730.html
上一篇:
2MASS星等转化为SDSS AB星等的IDL程序下一篇:
写一个与2MASS数据库做位置匹配的上传文件的IDL程序