source: MML/trunk/machine/SOLEIL/StorageRing/orbit/bpmcortwiss2excel.m @ 4

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

Initial import--MML version from SOLEIL@2013

File size: 1.6 KB
Line 
1function twiss_excel
2%execute spear3 init
3%load Optics structure from GetTwiss2
4%load bpm and cor structures
5%dump bpm and cor structures to EXCEL
6
7clear bpm cor
8spear3init;                                                    %set up middleware and run sp3v81f deck
9global THERING
10Optics = GetTwiss2(THERING,0,1:length(THERING));               %load structure with optical parameters
11Optics;                                                         %show what Optics contains
12ATindx=ATIndex(THERING);                                       %AATindx has indices for each family
13
14ibpm=ATindx.BPM;                                               %select BPMs
15bpm.name    =Optics.name(ibpm,:);
16bpm.name    =getfamilydata('BPMx','CommonNames');
17bpm.status  =getfamilydata('BPMx','Status');
18bpm.s       =Optics.s(ibpm);
19bpm.phix    =Optics.phix(ibpm);
20bpm.betax   =Optics.betax(ibpm);
21bpm.alfax   =Optics.alfax(ibpm);
22bpm.etax    =Optics.etax(ibpm);
23bpm.phiy    =Optics.phiy(ibpm);
24bpm.betay   =Optics.betay(ibpm);
25bpm.alfay   =Optics.alfay(ibpm);
26struct2excel(bpm)
27
28icor=ATindx.COR;                                               %select CORs
29cor.name    =Optics.name(icor,:);
30cor.x_name  =getfamilydata('HCM','CommonNames');
31cor.x_status=getfamilydata('HCM','Status');
32cor.y_name  =getfamilydata('VCM','CommonNames');
33cor.y_status=getfamilydata('VCM','Status');
34cor.s       =Optics.s(icor);
35cor.phix    =Optics.phix(icor);
36cor.betax   =Optics.betax(icor);
37cor.alfax   =Optics.alfax(icor);
38cor.etax    =Optics.etax(icor);
39cor.phiy    =Optics.phiy(icor);
40cor.betay   =Optics.betay(icor);
41cor.alfay   =Optics.alfay(icor);
42struct2excel(cor)
Note: See TracBrowser for help on using the repository browser.