Blame view

src/idl/write_xcat_Fitzpatrick1999.pro 917 Bytes
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
PRO write_xcat_fitzpatrick1999,file,R_V,npts

; #################################################################################
;
; Write extinction law according to Fitzpatrick (1999) parametrization
; in IPAC format xcat
;
; AUTHORS : 
; 	Mathieu Compiegne & Vincent Guillet
;
; #################################################################################

; To read xcat file :
; -------------------
;st=read_xcat(file)
;help,st,/str

one_ps = {instru:'',filter:'',wave:0.,spec:0.,error:0.,unit:''}
st = replicate(one_ps,npts)

NHsurEBV=5.8d21

x=fltarr(npts)
x = 0.5 + (indgen(npts))/((npts-1)/9.5)
ext=fltarr(npts)
unc=fltarr(npts)

fitz99_ext, R_V, NHsurEBV, x, ext, unc

st.instru = 'EXTINCTION'
st.filter = 'Fitzpatrick1999'
st.wave = 1./x
st.spec = ext
st.error = unc
st.unit = 'cm2/H'

; Write out IPAC file
write_xcat,st,file

; Plot result
window,0
ploterror,x,ext,x*0.,unc,psym=4
oplot,x,ext

END