|
SLAC CD Software Engineering
|
||||||||||
![]() |
|
|
||||||||
This page provides documentation for users and programmers of AIDA's LCLS Model Data Provider.
See Also: Basic Users Guide to Aida, Dp Model Source;, DpModelI_impl class java doc
This section describes what an AIDA user should know about accessing the LCLS Model Data through AIDA. For general information on using AIDA see Basic Users Guide to Aida, and the Aida javadoc, in particular the classes DaObject and DaReference (and DaReference's parent _DaReference) in aida.lib.da which form Aida's programming interface. One can also use Matlab.
Table 1: Summary of AIDA Data Provider for LCLS Model Data
SUMMARY |
|||||
Acquires Twiss and Rmatrix parameters of devices modelled in the LCLS Online modelling system. Presently, the LCLS online modelling system is done by XAL. |
|||||
| Status and limitations | Presently, only acquires the COMPUTED or DESIGN model, no MEASURED. The model values are obtained from the Model database. At the time of writing (Aug 6th 2008) ACCL, BEND, and KLYS devices are not handled because we do not yet have a naming convention for devices for which a single EPICS device name matches >1 element. COLLimators also do not work yet. These limitations are being addressed now. |
||||
| Plan | Fix the ACCL, BEND, KLYS and COLL device types | ||||
EXAMPLES |
|||||
| Schematic | Matlab example of getting R matrix of the MIDdle of QUAD. For more examples see xalModelDemo.m:
d = DaObject();
d.setParam('POS','MID');
R = reshape(double(d.geta('QUAD:IN20:361//R', 54)),6,6)'
| ||||
| Java | $CD_SOFT/ref/package/aida/test/java/DpModelTests.java | ||||
| Matlab | $CD_SOFT/ref/package/aida/test/matlab/xalModelDemo.m | ||||
INSTANCES and ATTRIBUTES |
||||||
| Instance Type | Description | |||||
| XAL Modelled Device | Syntax | <prim>:<area>:<unit>//{twiss|R}. XAL model of SLC CS devices is usually by name <area>:<prim>:<unit>. A list of name translations is presently maintained by Henrik here. | ||||
| Examples |
|
|||||
Attributes |
||||||
| Attribute | Description | |||||
| twiss | The Courant-Snyder parameters of given modelled "device" (d) | |||||
| Methods | Name* | Returns | ||||
| getDaValue(q) | DaValue containing an array of 15 floats: Kinetic Energy (GeV), psix, betax (m), alphax , etax (m), etax', psiy, betay (m), alphay, etay (m), etay', Z (m), Effective Length (m), Slice Effective Length (m), Ordinal position in beamline (as a float) | |||||
| geta(d,DaValue.Types.FLOATA) | array of 11 Float, see getDaValue | |||||
| geta(d,DaValue.Types.DOUBLEA) | array of 11 Double, see getDaValue | |||||
| Arguments | Name | Req/ |
Syntax | Semantics | RUNID | opt |
An integer corresponding to a Run Id. | The Model Run for which to get data. The default is the latest model run corresponding to the TYPE (see below). If given, RUNID must be a valid Run Id, as can be checked in the Oracle XAL Model report. |
| MODE | Deprecated | n/a | MODE is not recognized for XAL model requests. It may be resurrected in future to distinguish the model of a given device under different timing or energy profiles. | |||
| TYPE | opt | EXTANT or DESIGN | The type of desired model: The EXTANT (DATABASE is a synonym) is a model computed from machine PVs and then uploaded. DESIGN is model from constants in the model. The default is EXTANT. | |||
| POS | opt | BEG, MID, or END | The position within a sliced device for which the model value should be returned: BEG (BEGINNING is a synonym), MID (MIDDLE is a synonym), or END. The default is END (for compatibility with SLC modelling). | |||
| R | The 6x6 transfer matrix of a named device (d), returned as 1D array. If the B argument is specified, AIDA gets the transfer R-matrix from the A device d, to the B device specified by the B argument. For a specified B argument, the usual case is that the A device is upstream of the B device. However, the A device may be downstream of the B device, in which case the inverse matrix is returned. | |||||
| Methods | Name* | Returns | ||||
| geta(d,DaValue.Types.FLOATA) | array of 36 Float, 1st 6 are 1st row of R-matrix, 2nd 6 are 2nd row, and so on. | |||||
| geta(d,DaValue.Types.DOUBLEA) | array of 36 Double, 1st 6 are 1st row of R-matrix, 2nd 6 are 2nd row, and so on. | |||||
| getDaValue(d) | DaValue containing an array of 36 float. Extract array with methods of java.util.Vector such as get() (which DaValue extends). | |||||
| Arguments | Name | Req/ |
Syntax | Semantics | RUNID (as above) | opt |
An integer corresponding to a Run Id. | The Model Run for which to get data. The default is the latest model run corresponding to the TYPE (see below). If given, RUNID must be a valid Run Id, as can be checked in the Oracle XAL Model report. |
| MODE (as above) | Deprecated | n/a | MODE is not recognized for XAL model requests. It may be resurrected in future to distinguish the model of a given device under different timing or energy profiles. | |||
| TYPE (as above) | opt | EXTANT or DESIGN | The type of desired model: The EXTANT (DATABASE is a synonym) is a model computed from machine PVs and then uploaded. DESIGN is model from constants in the model. The default is EXTANT. | |||
| POS (as above) | opt | BEG, MID, or END | The position within a sliced device for which the model value should be returned: BEG (BEGINNING is a synonym), MID (MIDDLE is a synonym), or END. The default is END (for compatibility with SLC modelling). | |||
| B | opt | <prim>:<area>:<unit> | If specified, the specification of the second device for the transfer R-matrix. For sliced devices the position within each may be given using POS and POSB arguments also. The defaults are POS=END and POSB=BEG. | |||
| POSB | opt | BEG, MID, or END | When using argument B, POSB allows one to specify the position within B to which the Rmat A to B value should be returned, so it's only pertinent when B is a sliced device. Permitted values are as POS, BEG (BEGINNING is a synonym), MID (MIDDLE is a synonym), or END. The default is BEG (unlike default for POS). | |||
* See DaObject and DaReference (and DaReference's parent _DaReference) in aida.lib.da for full API and method signatures.
To be added.
Author: Greg White 09-Sep-2008