[4] | 1 | function outStruct = idMeasElecBeamUnd(idName, inclPerturbMeas, fileNameCore, AddTime, dispData) |
---|
| 2 | %idMeasElecBeamUnd |
---|
| 3 | % |
---|
| 4 | % INPUTS |
---|
| 5 | % 1. idName - Insertion device name |
---|
| 6 | % 2. inclPertubMeas - if 1 includes measurement of chromaticities and dispersion functions |
---|
| 7 | % if 0 nothing |
---|
| 8 | % 3. fileNameCore - filename core for saving data |
---|
| 9 | % 4. dispData - Flag. 1 for displaying data, 0 otherwise |
---|
| 10 | % |
---|
| 11 | % OUPUTS |
---|
| 12 | % 1. outStruct |
---|
| 13 | % |
---|
| 14 | % EXAMPLE |
---|
| 15 | % For measuring the corrector efficiency versus orbit |
---|
| 16 | % first set the current to CVE to 6 A |
---|
| 17 | % then compute the efficiency of CVE as follows: |
---|
| 18 | % idMeasElecBeamUnd('U20_PROXIMA1test', 0, 'U20_PROXIMA1_CVE_6', 1) |
---|
| 19 | |
---|
| 20 | % outStruct.X = 0; |
---|
| 21 | outStruct=struct; |
---|
| 22 | |
---|
| 23 | % measrures data (orbit, etc.) |
---|
| 24 | outStruct = idMeasElecBeam(outStruct, inclPerturbMeas, dispData); |
---|
| 25 | |
---|
| 26 | % Reads tango state, encoders, correctors of undulator |
---|
| 27 | if strcmp(idName, '') == 0 |
---|
| 28 | outStruct = idReadUndState(outStruct, idName, dispData); |
---|
| 29 | end |
---|
| 30 | |
---|
| 31 | % Saves the data to a file |
---|
| 32 | if strcmp(fileNameCore, '') == 0 |
---|
| 33 | outStruct.file = idSaveStruct(outStruct, fileNameCore, idName, AddTime, dispData); |
---|
| 34 | end |
---|