1 | function [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 |
---|
15 | rep = tango_read_attribute2(DServName, tabNameCHE); |
---|
16 | stOldTablesFF.mCHE_with_arg = rep.value; |
---|
17 | rep = tango_read_attribute2(DServName, tabNameCVE); |
---|
18 | stOldTablesFF.mCVE_with_arg = rep.value; |
---|
19 | rep = tango_read_attribute2(DServName, tabNameCHS); |
---|
20 | stOldTablesFF.mCHS_with_arg = rep.value; |
---|
21 | rep = tango_read_attribute2(DServName, tabNameCVS); |
---|
22 | stOldTablesFF.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 |
---|
27 | fileNameCoreOldFF = 'old_ff_tab'; |
---|
28 | idSaveStruct(stOldTablesFF, fileNameCoreOldFF, idName, 1, 0); |
---|
29 | |
---|
30 | %return; |
---|
31 | |
---|
32 | %Writing new ff tables |
---|
33 | tango_write_attribute2(DServName, tabNameCHE, new_mCHE_with_arg); |
---|
34 | tango_write_attribute2(DServName, tabNameCVE, new_mCVE_with_arg); |
---|
35 | tango_write_attribute2(DServName, tabNameCHS, new_mCHS_with_arg); |
---|
36 | tango_write_attribute2(DServName, tabNameCVS, new_mCVS_with_arg); |
---|