Документ взят из кэша поисковой машины. Адрес оригинального документа : http://jet.sao.ru/hq/lsfvo/devices/scorpio-2/filters/ifp_fil.pro
Дата изменения: Mon Nov 18 17:53:28 2013
Дата индексирования: Fri Feb 28 03:07:43 2014
Кодировка:

Поисковые слова: флуоресценция
; plot sky spectra
function SKY_SPECTRA,lam,w

d=[[4314.4 , 7 ],$
[4333.7 , 6 ],$
[4358.34 , 40 ],$
[4492.8 , 5 ],$
[4581.5 , 6 ],$
[4587.1 , 4 ],$
[4628.6 , 3 ],$
[4637.4 , 4 ],$
[4660.1 , 3 ],$
[4669.6 , 4 ],$
[4672.3 , 7 ],$
[4816.2 , 5 ],$
[4839.8 , 7 ],$
[4844.9 , 4 ],$
[4851.7 , 3 ],$
[4880.4 , 4 ],$
[4885.4 , 5 ],$
[4895.8 , 3 ],$
[4903.5 , 3 ],$
[4904.8 , 3 ],$
[4938.5 , 3 ],$
[5089.4 , 3 ],$
[5188.5 , 4 ],$
[5202.966 , 14 ],$
[5202.984 , 14 ],$
[5206.725 , 11 ],$
[5206.824 , 11 ],$
[5218.5 , 4 ],$
[5224.116 , 4 ],$
[5224.158 , 4 ],$
[5238.704 , 10 ],$
[5238.789 , 10 ],$
[5256.012 , 4 ],$
[5256.153 , 4 ],$
[5256.741 , 4 ],$
[5256.753 , 4 ],$
[5256.753 , 4 ],$
[5256.770 , 4 ],$
[5295.7 , 5 ],$
[5358.2 , 1 ],$
[5431.7 , 2 ],$
[5460.7 , 12 ],$
[5532.3 , 1 ],$
[5542.228 , 6 ],$
[5542.245 , 6 ],$
[5544.571 , 5 ],$
[5544.587 , 5 ],$
[5544.869 , 5 ],$
[5544.885 , 5 ],$
[5562.933 , 2 ],$
[5563.993 , 10 ],$
[5569.493 , 3 ],$
[5569.583 , 3 ],$
[5577.338 ,5000 ],$
[5581.190 , 3 ],$
[5581.236 , 3 ],$
[5589.103 , 10 ],$
[5589.152 , 10 ],$
[5597.771 , 6 ],$
[5597.799 , 6 ],$
[5605.094 , 12 ],$
[5605.192 , 12 ],$
[5617.158 , 4 ],$
[5617.163 , 4 ],$
[5623.751 , 6 ],$
[5623.910 , 6 ],$
[5639.268 , 5 ],$
[5639.316 , 5 ],$
[5645.158 , 4 ],$
[5645.386 , 4 ],$
[5664.181 , 3 ],$
[5865.447 , 18 ],$
[5865.461 , 18 ],$
[5865.989 , 12 ],$
[5865.991 , 12 ],$
[5867.234 , 5 ],$
[5867.273 , 5 ],$
[5867.532 , 20 ],$
[5867.548 , 20 ],$
[5868.290 , 8 ],$
[5868.311 , 8 ],$
[5869.467 , 6 ],$
[5869.512 , 6 ],$
[5872.725 , 10 ],$
[5872.729 , 10 ],$
[5887.089 , 5 ],$
[5887.169 , 5 ],$
[5888.171 , 25 ],$
[5888.196 , 25 ],$
[5889.953 , 350 ],$
[5894.422 , 5 ],$
[5894.514 , 5 ],$
[5895.923 , 225 ],$
[5906.673 , 8 ],$
[5906.725 , 8 ],$
[5915.275 , 35 ],$
[5915.327 , 35 ],$
[5924.705 , 15 ],$
[5924.741 , 15 ],$
[5932.810 , 40 ],$
[5932.914 , 40 ],$
[5945.930 , 20 ],$
[5945.933 , 20 ],$
[5953.336 , 25 ],$
[5953.505 , 25 ],$
[5970.256 , 10 ],$
[5970.299 , 10 ],$
[5976.953 , 12 ],$
[5977.200 , 10 ],$
[5997.765 , 4 ],$
[6003.744 , 5 ],$
[6004.078 , 6 ],$
[6028.436 , 3 ],$
[6033.783 , 4 ],$
[6034.214 , 2 ],$
[6067.147 , 3 ],$
[6068.684 , 3 ],$
[6136.541 , 5 ],$
[6136.566 , 5 ],$
[6136.767 , 5 ],$
[6136.804 , 5 ],$
[6138.859 , 9 ],$
[6138.863 , 9 ],$
[6139.447 , 21 ],$
[6139.485 , 21 ],$
[6143.368 , 12 ],$
[6143.381 , 12 ],$
[ 6144.462, 30],$
[ 6144.491, 30],$
[ 6150.917, 11],$
[ 6150.934, 11],$
[ 6170.621, 70],$
[ 6170.656, 70],$
[ 6176.223, 22],$
[ 6176.350, 22],$
[ 6184.264, 11],$
[ 6184.551, 11],$
[ 6192.910, 21],$
[ 6192.964, 21],$
[ 6202.688, 40],$
[ 6202.752, 40],$
[ 6213.045, 20],$
[ 6213.071, 20],$
[ 6221.710, 50],$
[ 6221.832, 50],$
[ 6234.289, 85],$
[ 6234.297, 85],$
[ 6235.662, 60],$
[ 6235.672, 60],$
[ 6235.942, 50],$
[ 6235.956, 50],$
[ 6236.006, 50],$
[ 6236.023, 50],$
[ 6236.964, 30],$
[ 6237.017, 30],$
[ 6237.394, 40],$
[ 6237.427, 40],$
[ 6240.176, 35],$
[ 6240.219, 35],$
[ 6241.686, 35],$
[ 6241.689, 35],$
[ 6243.546, 30],$
[ 6243.738, 30],$
[ 6247.957, 10],$
[ 6248.047, 10],$
[ 6256.900, 30],$
[ 6256.982, 30],$
[ 6257.949, 210],$
[ 6257.974, 210],$
[ 6261.721, 15],$
[ 6261.792, 15],$
[ 6262.664, 0],$
[ 6262.804, 0],$
[ 6265.168, 65],$
[ 6265.261, 65],$
[ 6268.270, 30],$
[ 6268.540, 40],$
[ 6272.217, 0],$
[ 6272.373, 0],$
[ 6275.485, 40],$
[ 6275.698, 30],$
[ 6278.060, 30],$
[ 6278.121, 30],$
[ 6287.407, 180],$
[ 6287.462, 180],$
[ 6297.879, 85],$
[ 6297.927, 85],$
[ 6300.304, 540],$
[ 6306.869, 60],$
[ 6306.981, 80],$
[ 6321.390, 50],$
[ 6321.406, 50],$
[ 6329.747, 112],$
[ 6329.933, 260],$
[ 6348.516, 78],$
[ 6348.547, 78],$
[ 6356.167, 176],$
[ 6356.441, 152],$
[ 6363.78 , 40],$
[ 6379.268, 94],$
[ 6379.361, 94],$
[ 6386.236, 268],$
[ 6386.611, 248],$
[ 6413.720, 30],$
[ 6413.885, 30],$
[ 6420.056, 60],$
[ 6420.544, 80],$
[ 6451.960, 20],$
[ 6452.209, 40],$
[ 6457.734, 40],$
[ 6458.344, 50],$
[ 6463.505, 110],$
[ 6463.538, 110],$
[ 6463.793, 50],$
[ 6463.810, 50],$
[ 6464.870, 25],$
[ 6464.922, 25],$
[ 6465.828, 115],$
[ 6465.867, 115],$
[ 6465.936, 115],$
[ 6465.971, 115],$
[ 6470.138, 90],$
[ 6470.152, 90],$
[ 6470.960, 250],$
[ 6470.988, 250],$
[ 6477.902, 90],$
[ 6477.919, 90],$
[ 6497.471, 35],$
[ 6497.582, 35],$
[ 6498.711, 290],$
[ 6498.746, 290],$
[ 6504.931, 85],$
[ 6505.060, 85],$
[ 6513.845, 70],$
[ 6514.137, 80],$
[ 6522.396, 180],$
[ 6522.455, 180],$
[ 6533.011, 770],$
[ 6533.077, 770],$
[ 6544.006, 280],$
[ 6544.038, 280],$
[ 6553.553, 650],$
[ 6553.681, 650],$
[ 6562.82 , 200],$
[ 6568.772, 280],$
[ 6568.786, 280],$
[ 6577.183, 760],$
[ 6577.386, 720],$
[ 6583.41 , 30],$
[ 6596.608, 160],$
[ 6596.679, 160],$
[ 6603.990, 300],$
[ 6604.279, 280],$
[ 6627.555, 30],$
[ 6627.679, 30],$
[ 6634.038, 150],$
[ 6634.421, 170],$
[ 6661.664, 20],$
[ 6661.878, 40],$
[ 6667.384, 45],$
[ 6667.869, 40],$
[ 6699.008, 20],$
[ 6699.304, 16],$
[ 6704.087, 20],$
[ 6704.683, 19],$
[ 6744.216, 10],$
[ 6744.933, 15],$
[ 6787.849, 0],$
[ 6788.697, 0],$
[ 6827.446, 180],$
[ 6827.472, 180],$
[ 6828.466, 85],$
[ 6828.473, 85],$
[ 6829.474, 185],$
[ 6829.507, 185],$
[ 6829.536, 185],$
[ 6829.593, 185],$
[ 6829.900, 90],$
[ 6829.944, 90],$
[ 6832.621, 20],$
[ 6832.648, 20],$
[ 6832.803, 20],$
[ 6832.860, 20],$
[ 6833.999, 130],$
[ 6834.018, 130],$
[ 6834.420, 380],$
[ 6834.447, 380],$
[ 6839.635, 10],$
[ 6839.681, 10],$
[ 6840.011, 15],$
[ 6840.082, 15],$
[ 6841.937, 90],$
[ 6841.953, 90],$
[ 6850.005, 10],$
[ 6850.028, 10],$
[ 6850.722, 10],$
[ 6850.851, 10],$
[ 6862.622, 70],$
[ 6862.738, 70],$
[ 6863.937, 790],$
[ 6863.973, 790],$
[ 6868.294, 10],$
[ 6868.490, 10],$
[ 6870.929, 90],$
[ 6871.060, 90],$
[ 6880.936, 80],$
[ 6881.234, 80],$
[ 6889.255, 150],$
[ 6889.321, 150],$
[ 6894.088, 30],$
[ 6894.628, 30],$
[ 6900.799, 190],$
[ 6900.867, 190],$
[ 6912.603, 200],$
[ 6912.642, 200],$
[ 6923.152, 310],$
[ 6923.287, 310],$
[ 6939.518, 230],$
[ 6939.525, 230],$
[ 6948.936, 540],$
[ 6949.153, 540],$
[ 6969.896, 140],$
[ 6969.963, 140],$
[ 6978.258, 340],$
[ 6978.569, 320],$
[ 7003.788, 50],$
[ 7003.928, 50],$
[ 7011.202, 160],$
[ 7011.618, 150],$
[ 7041.251, 50],$
[ 7041.473, 50],$
[ 7047.846, 90],$
[ 7048.376, 85],$
[ 7082.370, 38],$
[ 7082.683, 30],$
[ 7088.266, 66],$
[ 7088.922, 58],$
[ 7127.248, 38],$
[ 7127.661, 35],$
[ 7132.553, 60],$
[ 7133.346, 42],$
[ 7176.005, 43],$
[ 7176.528, 40],$
[ 7180.808, 66],$
[ 7181.750, 35],$
[ 7228.773, 20],$
[ 7229.417, 20],$
[ 7233.149, 20],$
[ 7233.252, 20],$
[ 7238.771, 220],$
[ 7238.787, 220],$
[ 7240.166, 340],$
[ 7240.194, 340],$
[ 7240.843, 70],$
[ 7240.854, 70],$
[ 7241.378, 90],$
[ 7241.433, 90],$
[ 7241.900, 50],$
[ 7241.969, 50],$
[ 7244.894, 190],$
[ 7244.920, 190],$
[ 7245.083, 190],$
[ 7245.110, 190],$
[ 7246.488, 35],$
[ 7246.541, 35],$
[ 7246.548, 35],$
[ 7246.615, 35],$
[ 7253.122, 150],$
[ 7253.132, 150],$
[ 7255.261, 20],$
[ 7255.312, 20],$
[ 7255.835, 25],$
[ 7255.945, 25],$
[ 7275.048, 90],$
[ 7275.168, 90],$
[ 7276.387, 790],$
[ 7276.423, 790],$
[ 7281.460, 20],$
[ 7281.664, 20],$
[ 7284.372, 270],$
[ 7284.506, 270],$
[ 7285.698, 20],$
[ 7286.474, 20],$
[ 7289.710, 20],$
[ 7290.986, 20],$
[ 7295.786, 140],$
[ 7296.092, 140],$
[ 7303.679, 250],$
[ 7303.753, 250],$
[ 7310.776, 40],$
[ 7311.331, 40],$
[ 7316.246, 780],$
[ 7316.318, 780],$
[ 7329.122, 220],$
[ 7329.173, 220],$
[ 7340.812, 530],$
[ 7340.957, 530],$
[ 7346.944, 20],$
[ 7347.861, 20],$
[ 7350.640, 20],$
[ 7352.104, 20],$
[ 7358.657, 290],$
[ 7358.662, 290]]

sum=0*lam
rec=where(d(0,*) lt max(lam) and d(0,*) gt min(lam),c)

if c gt 0 then begin


for i=0,c-1 do begin
sum=sum+gaussian(lam,[d(1,rec(i)),d(0,rec(i)),w])

endfor
endif
sum=sum/max(sum)
return,sum
END


; widget-interface for seaching of the best filters for IFP observations
PRO IFP_FIL_EVENT,event
COMMON INPUT,vsys,temp,line_id,t

WIDGET_CONTROL,Event.Id,GET_UVALUE=Ev
CASE Ev OF
'vsys': vsys=event.value
'temp': temp=event.value
'T': t=event.value
'wave': line_id=event.index
'QUIT': WIDGET_CONTROL,/DESTROY,event.top
else: print,event
endcase
if Ev ne 'QUIT' then PLOT_FILTERS
end

; list of filter parameters
PRO GET_FILTERPAR,dat

dat=['name T CWL FWHM',$
'IFP502 66 5010 15',$
'IFP508 66 5075 15',$
'IFP513 60 5123 16',$
'IFP514 60 5138 16',$
'IFP516 60 5153 15',$
; 'IFP517 46 5168 18',$
'IFP519 60 5183 17',$
'IFP657 52 6570 19',$
'IFP659 58 6581 19',$
'IFP661 54 6604 21',$
'IFP663 55 6627 20',$
'IFP665 50 6641 24',$
'IFP667 46 6661 20',$
; 'IFP670 56 6695 19',$
; 'IFP671 57 6711 19',$
; 'IFP673 41 6727 19',$
; 'IFP674 47 6741 19',$
'IFP676 55 6755 16',$
'IFP677 50 6771 17',$
'IFP679 54 6782 19',$
'#76B 71 6560 15',$
'#77B 76 6571 14',$
'#78B 69 6580 13',$
'#79B 71 6589 13',$
'#80B 73 6598 14',$
'#81B 70 6608 15',$
'AC6700 60 6693 15',$
'AC6715 60 6708 15',$
'AC6730 60 6723 15',$
'AC6745 60 6738 15',$
'AC6760 60 6753 15',$
'AC6775 60 6768 15',$
'AC6790 60 6783 15',$
'AC6836 65 6829 20',$
'AC6852 64 6845 21',$
'AC5038 75 5031 32',$; -7 A from AC CWL
'AC5065 77 5058 33',$
'AC5110 78 5103 33',$
'AC5176 76 5169 33',$
'AC5211 75 5204 35',$
'AC5241 76 5234 35'$
]
END


PRO PLOT_FILTERS
COMMON WAVES,l_list,l_name,L_t,calib_l,calib_n
COMMON INPUT,vsys,temp,line_id,t
common WIDFILS,widdraw

widget_control,widdraw,get_value=Id
wset,id

l0=l_list(line_id)
; plotting parameters
;posplot=[0.1,0.21,0.95,0.9]
posplot=[0.1,0.35,0.95,0.9]


y1=0.11
y2=0.08
y3=0.03
l1=0.12
charsize=1.
background=2^24-1


get_filterpar,dat

dat=strcompress(dat(1:*))
num=n_elements(dat)
name=strarr(num)
par=fltarr(3,num)
for i=0,num-1 do begin
s=strsplit(dat(i),' ',/extr)
name(i)=s(0)
par(*,i)=s(1:3)
endfor

s=sort(par(1,*))
par=par(*,s)
name=name(s)
; calculation of transparency in each filter
lg=(1+Vsys/3e5)*L0
cwl=par(1,*)+0.15*(temp-23)
sig=par(2,*)/2.35482

Tobs=100*exp(-0.5*(cwl-lg)^2/sig^2)
rec=where(tobs gt T,nc)

; plot results
;window,0,xs=500,ys=500
x1=lg-25
x2=lg+25
if nc gt 0 then begin
x1=min(cwl(rec)-sig(rec)*2) x2=max(cwl(rec)+sig(rec)*2)>x2
endif

x=findgen(501)*(x2-x1)/500+x1

ang=STRING("305B);Angstrom
tit='Rest frame !7k!3='+string(l0,format='(F6.1)')+ang+' Velocity='+$
strtrim(string(fix(vsys)),2)+'km/s -> !7k!3!Dobs!N='+string(lg,format='(F7.1)')+' '+ang
plot,[lg,lg],[0,100],xr=[x1,x2],yr=[0,130],xst=1,yst=1,linestyle=1,col=0,xtickn=make_array(30,val=' '),$
ytit='Transmission, %',xtickle=1,yticklen=0,tit=tit,pos=posplot,/norm,backgr=background,$
charsize=charsize

oplot,[lg,lg],[0,100],col=220,thick=2,linestyle=1
oplot,[x1,x2],[t,t],linestyle=0,col=180

; plot galaxy spectra

gal=0
w=0.5
for i=0,n_elements(l_list)-1 do gal=gal+gaussian(x,[l_t(i),l_list(i)*(1+vsys/3e5),w])

oplot,x,gal,color=2

;best filters
if nc gt 0 then begin
best=reverse(sort(Tobs(rec)))
tmp_n=name(rec(best))
tmp_t=Tobs(rec(best))
;l1=0.7/nc
endif

col=[5e8,115000,255] ; colors for curves
xyouts,0.05,y1,'Best filters: ',/norm,charsize=charsize,col=0

for i=0,nc-1 do begin
j=rec(i)
k=i mod n_elements(col)
if Tobs(j) eq max(Tobs) then thick=4 else thick=2

recc=where(name(j) eq ['AC6836','AC6852'],nn)
if nn then begin ; rectabgular curve
wr=[12,15,24,28,32,35,50,70]
tr=[97,86,31,16,7.8,3.9,1,0]
xr0=[cwl(j)-reverse(wr)/2,cwl(j)+wr/2]
yr0= [reverse(tr),tr]
;fil_prf=spline(xr0,yr0,x)
fil_prf=interpol(yr0,xr0,x)
endif else fil_prf=gaussian(x,[100,cwl(j),sig(j)]) ; gaussian curve
oplot,x,fil_prf,col=col(k),thick=thick
xyouts,cwl(j)*[1,1],105,name(j),col=col(k),/data,orien=90


; print best filters

r=where(tmp_n(0) eq name)
if i eq 0 then color=col(r(0) mod n_elements(col)) else color=0
if i eq 0 then thick=1.5 else thick=1
xyouts,0.25+l1*i,y1,tmp_n(i),/norm,charsize=charsize,col=color,charthick=thick
xyouts,0.25+l1*i,y2,string(tmp_t(i),format='(I3)'),/norm,charsize=charsize,col=color,charthick=thick
endfor

if nc gt 0 then begin
xyouts,0.05,y2,' T (%): ',/norm,charsize=charsize,col=0

; calibartion line
l=min(abs(lg-calib_l),m)
if m eq 1 or m eq 2 then s='s ' else s=' '
xyouts,0.05,y3,'Recomended calibration line: '+$
string(calib_l(m),format='(F7.2)')+' (filter'+s+calib_n(m)+')',/norm,charsize=charsize,col=0
endif else begin
xyouts,0.22,y1,'NO FILTERS FOR THIS CONDIRIONS!',/norm,charsize=charsize+0.3,col=180,charthick=2
endelse


; plot sky spectra
posplot2=[posplot(0),0.21,posplot(2),posplot(1)]

plot,x,sky_spectra(x,0.2),pos=posplot2,/norm,xst=1,yst=1,xtit='Wavelength, '+ang,$
yticks=1,ytickn=[' ',' ',' '],/noerase,col=0,yr=[-0.05,1.1]



END




PRO IFP_FIL
COMMON WAVES,l_list,l_name,L_t,calib_l,calib_n
COMMON INPUT,vsys,temp,line_id,t
common WIDFILS,widdraw
device,dec=1 & loadct,0,/sil

; galactic data
L_list=[4861.3,4958.9,5006.9,6548.1,6562.8,6583.4,6716.4,6730.8]
L_name=['H-beta','[OIII] 4959','[OIII] 5007','[NII] 6548','H-alpha','[NII] 6583','[SII] 6716','[SII] 6731']
L_t= 100*[0.5,0.3,0.9,0.2,0.9,0.6,0.8,0.8]

; calibartion lines
calib_l=[5015.68 ,5080.08 ,5145.31, 5187.75, 6598.95 ,6678.15 ,6717.04 ,6752.83 ]; 6871.29]
calib_n=['IFP502','IFP508','IFP516','IFP519', '#80, #81, IFP661', 'IFP667, AC6700', 'AC6730','AC6760, IFP676'];,'AC6852']

; window size
Xwin=600
Ywin=500
; default data
line_id=4 ; line identifications
T=20
Vsys=00 ; velocities
Temp=23 ; temperature



BASE1 = WIDGET_BASE(COLUMN=2, SPACE=5,XPAD=3,YPAD=3,TITLE='Chosen filters for IFP-SCORPIO observations')

BASE2 = WIDGET_BASE(BASE1,column=1, MAP=1,frame=1,space=Ywin-150)
BASE3 = WIDGET_BASE(BASE2,row=4, MAP=1,frame=1)

l1=100
l2=6
l=widget_label(base3,val='Velocity (km/s):',xsize=l1)
c=cw_field(base3,title='',val=vsys, /ALL_EVENTS,xsize=6,uvalue='vsys',/integer)
;c=widget_text(base3,val=string(vsys), xsize=l2,uvalue='vsys',/editable,/all)

l=widget_label(base3,val='Temperature (C):',xsize=l1)
c=cw_field(base3,title='',val=temp, /ALL_EVENTS,xsize=6,uvalue='temp',/integer)
;c=widget_text(base3,val=string(Temp), xsize=l2,uvalue='temp',/editable,/all)

l=widget_label(base3,val='Threshold (%):',xsize=l1)
;c=widget_text(base3,val=string(T), xsize=l2,uvalue='T',/editable,/all)
c=cw_field(base3,title='',val=t, /ALL_EVENTS,xsize=6,uvalue='T',/integer)

l=widget_label(base3,val='Line/wavelength',xsize=l1)
comb=WIDGET_COMBOBOX(base3,editable=0,value=l_name,uvalue='wave')


widdraw=WIDGET_DRAW(base1,xsize=Xwin,ysize=ywin,uvalue='win'); /BUTTON_EVENTS,/MOTION_EVENTS)
DONE= WIDGET_BUTTON( BASE2,UVALUE='QUIT',VALUE=' QUIT ')

widget_control,comb,set_combobox_select=line_id
WIDGET_CONTROL, BASE1, /REALIZE
XMANAGER, 'IFP_FIL', BASE1,no_block=1
END