ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/proj/flatfield/pzt_flat_IDL/apod_circ.pro
Revision: 1.1
Committed: Fri Feb 18 00:21:17 2011 UTC (12 years, 7 months ago) by richard
Branch: MAIN
CVS Tags: Ver_6-0, Ver_6-1, Ver_6-2, Ver_6-3, Ver_6-4, Ver_9-1, Ver_5-14, Ver_5-13, Ver_LATEST, Ver_9-3, Ver_9-41, Ver_9-2, Ver_8-8, Ver_8-2, Ver_8-3, Ver_8-0, Ver_8-1, Ver_8-6, Ver_8-7, Ver_8-4, Ver_8-5, Ver_7-1, Ver_7-0, Ver_9-5, Ver_9-4, Ver_8-10, Ver_8-11, Ver_8-12, Ver_9-0, HEAD
Log Message:
IDL package for calculating pzt flatfields
2011.02.17

File Contents

# Content
1 function apod_circ, nn , rad, nb, offx=offx, offy=offy
2
3 pat=fltarr(nn, nn)
4
5
6 rarr=fltarr(nn, nn)
7 if not keyword_set(offx) then offx=0.0
8 if not keyword_set(offy) then offy=0.0
9
10 for i=0.0, nn-1 do for j=0.0, nn-1 do rarr[i,j]=sqrt((i-(nn/2+offx))^2+(j-(nn/2+offy))^2)
11
12
13 pat[where(rarr lt rad)]=1.0
14
15 ixm=where(rarr ge rad and rarr lt rad+nb)
16 if ixm[0] ne -1 then pat[ixm]=0.5*cos(!pi/nb*(rarr[where(rarr ge rad and rarr lt rad+nb)]-rad))+0.5
17
18 ixo=where(rarr ge rad+nb)
19 if ixo[0] ne -1 then pat[ixo]=0.0
20
21 return, pat
22
23 end