source: MML/trunk/machine/SOLEIL/LT1/emittance/faisceau_sansimage.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 889 bytes
Line 
1function fun=faisceau(nbpixelsx,nbpixelsy,sigmax,sigmay,centrex,centrey,pourc)
2
3
4Y=(meshgrid(1:nbpixelsx+1,1:nbpixelsy+1))';
5%Y=(1:nbpixelsy+1)';
6X=meshgrid(1:nbpixelsy+1,1:nbpixelsx+1);
7%X=(1:nbpixelsx+1)';
8p=pourc*0.01;
9sigx=1*((1-p)*sigmax+2*p*sigmax*rand(1));
10sigy=1*((1-p)*sigmay+2*p*sigmay*rand(1));
11cx=1*((1-p)*centrex+2*p*centrex*rand(1));
12cy=1*((1-p)*centrey+2*p*centrey*rand(1));
13
14a=bigauss_bruit(X,Y,sigx,sigy,cx,cy,pourc/4);
15% on enleve le bruit de bigauss car redondant
16%a=bigauss(X,Y,sigx,sigy,cx,cy);
17
18%s=1*((1-pourc)*se+2*pourc*se.*rand(1,length(se)));
19
20b = p*rand(nbpixelsx+1,nbpixelsy+1);
21
22                % % pixels morts
23                % n=size(a);
24                % d=gallery('rando',n,1);
25                %
26                % for i=1:10
27                %     c(i,:,:)=gallery('rando',n,1);
28                %     d=d.*squeeze(c(i,:,:));
29                % end
30%fun=a+b+d;
31
32fun=a+b;
33%fun=a;
34% figure(4)
35%
36 %image(a+b+d,'CDataMapping','scaled')
37%image(fun,'CDataMapping','scaled')
Note: See TracBrowser for help on using the repository browser.