source: MML/trunk/machine/SOLEIL/StorageRing/insertions/idUpdateInterpFeedForwardCorTables2D.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: 1.7 KB
Line 
1function [new_mCHE_with_arg, new_mCVE_with_arg, new_mCHS_with_arg, new_mCVS_with_arg] = idUpdateInterpFeedForwardCorTables2D(idName, tabNameCHE, tabNameCVE, tabNameCHS, tabNameCVS, vArgVert, vArgHor, interpMeth)
2%tabNameCHE = 'parallelModeCHE'
3%tabNameCVE = 'parallelModeCVE'
4%vArgVert = [15.5,16,18,...] - gap values
5%vArgHor = [-40,-35,-30,...] - phase values
6%interpMeth:
7% = 'nearest' %Nearest neighbor interpolation
8% = 'linear' %Linear interpolation (default)
9% = 'spline' %Cubic spline interpolation
10% = 'cubic' %Cubic interpolation, as long as data is uniformly-spaced. Otherwise, this method is the same as 'spline'
11
12[DServName] = idGetUndDServer(idName);
13
14%Reading previous cor. tables
15rep = tango_read_attribute2(DServName, tabNameCHE);
16stOldTablesFF.mCHE_with_arg = rep.value;
17rep = tango_read_attribute2(DServName, tabNameCVE);
18stOldTablesFF.mCVE_with_arg = rep.value;
19rep = tango_read_attribute2(DServName, tabNameCHS);
20stOldTablesFF.mCHS_with_arg = rep.value;
21rep = tango_read_attribute2(DServName, tabNameCVS);
22stOldTablesFF.mCVS_with_arg = rep.value;
23
24[new_mCHE_with_arg, new_mCVE_with_arg, new_mCHS_with_arg, new_mCVS_with_arg] = idInterpolFeedForwardCorTables2D(stOldTablesFF.mCHE_with_arg, stOldTablesFF.mCVE_with_arg, stOldTablesFF.mCHS_with_arg, stOldTablesFF.mCVS_with_arg, vArgVert, vArgHor, interpMeth);
25
26%Saving previous ff tables
27fileNameCoreOldFF = 'old_ff_tab';
28idSaveStruct(stOldTablesFF, fileNameCoreOldFF, idName, 1, 0);
29
30    %return;
31   
32%Writing new ff tables
33tango_write_attribute2(DServName, tabNameCHE, new_mCHE_with_arg);
34tango_write_attribute2(DServName, tabNameCVE, new_mCVE_with_arg);
35tango_write_attribute2(DServName, tabNameCHS, new_mCHS_with_arg);
36tango_write_attribute2(DServName, tabNameCVS, new_mCVS_with_arg);
Note: See TracBrowser for help on using the repository browser.