Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

New applications however will use the architecture and tools described below.

Anchor
arch_apis
arch_apis

Application Data Flows

Data access and control will be via the following Application Programming Interfaces (APIs):

...

Package

Implementation

Fast Feedback

Dealt with elsewhere

Configuration Control

Data Archiver

Exists in SLC for SLC devices ("History"). Data archiver for EPICS in LCLS is under discussion. Paul Chu reports that EPICS archiver itself considered too slow; SNS experimenters use PVLogger when they can, but PVlogger is not an alternative archiver. AIDA can presently acquire both SLC and EPICS Archiver data. Propose: use EPICS Kasemir Channel Archive; improve Archive Browser performance; implement additions to browser so both sources can be accessed via AIDA. See Questions

Error Logging

See Error Handling, Logging and Viewing below

Watchdog

Anchor
ehmatlabeh

ERROR HANDLING, LOGGING AND VIEWING

A programmer spends half their time handling errors, so making that as easy as possible is a productivity priority. For LCLS we will use the following technology stack:

matlab

MATLAB

Matlab will provide a significant programming base for LCLS physics applications. We forsee that production level software may well be implemented in Matlab. Therefore we need data and control APIs to help users code applications in matlab, and support for error handling and message logging from Matlab m-file code.

Interfaces

The XAL, EPICS and AIDA java APIs can be used from inside matlab. That is, all the APIs listed in the Application Data Flows.

Infrastructure

Windows, and unix variants of Matlab will inevitably be used. However, Matlab is still ironing out the links in its Java support, so for production we have to control which versions of Matlab are officially "supported" for controls. Suggest starting with Matlab r14 SP2 - which is known to avoid problems with Orbacus assertions.

Anchor
eh
eh

ERROR HANDLING, LOGGING AND VIEWING

A programmer spends half their time handling errors, so making that as easy as possible is a productivity priority. For LCLS we will use the following technology stack:

Err package (see http://www.slac.stanford.edu/Err package (see http://www.slac.stanford.edu/grp/cd/soft/err/) makes the process of rigorously handling errors easy. It allows a programmer to define an error code in a structured, recorded global way; and to use that code to issue errors and associated diagnostics from or linux, solaris, windows platforms in either java or C/C++, and issue them directly to CMLOG (or some other message logger). It includes support for exception chaining ("caused-by") and exception translation, so the end user can see what systematic thing caused their functional problem (E.g. of a error logged by Err in cmlog might be "UnableToTrackBeamlineException: LCLS ; caused by FileNotFoundException: LCLS.XML when attempting to steer LCLS".

...

  1. SLC CAMAC Magnet control and SLC BPM data acquisition by XAL Applications. The SLC CA server does not presently support "set" operations, so there is not presently a way for XAL applications, which use EPICS Ca through JCA, to change the value of CAMAC magents. Possible solutions are to add set to SLC CA, or to change XAL applications to use AIDA, or to accept that XAL applications can not control SLC CAMAC magnets - that would be bad for orbit correction for instance, since most magnets in the linac will be SLC control system. Similarly, the SLC-aware-IOC and EPICS BPM acquisition API will allow both an XAL based application, or the SCP, to acquire IOC hosted BPMs, but are there "classical" SLC BPMs that must be acquirable by XAL applications.
    Anchor
    WindowsFilesystem
    WindowsFilesystem
  2. Windows filesystem.
    If we do require native execution on Windows that decision should be made clearly and early, and resources assigned to implement the common executable and configuration file distribution so that Unix and Windows running applications are in sync and see the same configuration files. Java Web Start and Eclipse update site technology may be places to find solutions.
    Anchor
    XAL_nocoupling
    XAL_nocoupling
  3. XAL Plane Coupled modeling.
    The existing XAL probes for calculating R-matrices, run on either the X-plane or Y-plane and returns only a 2x2 matrix for each element. That is, it's uncoupled. This is reflected in the fact that only the Twiss parameters can be stored into an XAL file - it only contains uncoupled optics. It may be that XAL is in fact tracking a plane coupled system, but only returning the X or Y plane block-matrices - need to verify. So, if plane coupled orbit correction is important for us, we need to verify what XAL is doing, add at least 4x4 probe API, also probably also 6x6 tracking.
  4. XAL Modelled acceleration and solenoid. XAL does not model acceleration completely, nor solenoid field (see Questions|#q_xalacc]
  5. Archiver. Which one?
  6. XAL file generation directly from Oracle. Is there a mechanism to flag items in the oracle db for inclusion in the lattice? Danger is people will edit the Oracle db to say move an item to a new z location or include a dummy bpm, and the lattice will change.
  7. Scripting. It may be that the requirement for user-level scripting of complex operator procedures is a requirement that should not be minimizedbe minimized.
  8. Matlab. It's expensive and we may be highly reliant on it especially at first.

Anchor
additions
additions

...

  1. Anchor
    q_dbgeoonly
    q_dbgeoonly
    How complex is the conversion of Oracle DB to XAL lattice? Does the db contain enough to emit a lattice? Mark Woodley warns that there are probably many things necessary in the XAL lattice which need not be in the DB (marker points), and many things in the DB which should not be in the lattice. This latter class includes things like dummy BPMs, so not simply the case that everything of a given class should be in the lattice. People change the z of things in the DB. May be a good idea to have a "Skeleton" XAL file (maybe processed by xsl/php).
  2. Anchor
    kmodtobdes
    kmodtobdes
    Verify there is no "KMOD to BDES" requirement?
    1. That is, is there a Lattice Diagnostics requirement for online applications, and a need to keep magnet "fudge factors"?
    2. Which XAL applications allow one to update the EPICs magnet k-values after a successful model run?
  3. Does XAL really not model acceleration? If not how is it useful for SNS?
  4. Verify that XAL does not model a plane coupled system.
  5. Does XAL offer matrix manipulation, linear algebra and fitting adequate for the LCLS? Ans: yes, uses JAMA.How long does XAL take to parse an XAL beamline? It has to build a DOM tree, which can't be negligible. Since that is a requirement of every XAL application at initialization its an important performance bottleneck., uses JAMA.
  6. How long does XAL take to parse an XAL beamline? It has to build a DOM tree, which can't be negligible. Since that is a requirement of every XAL application at initialization its an important performance bottleneck.
  7. Anchor
    q_xalacc
    q_xalacc
    Is XAL's modeling of acceleration adequate? We (greg and Diane) have decided to answer this by writing an XAL beamline description, tracking it, and comparing to MAD output.
  8. Is XAL's existing treatment of solenoids adequate? I think (greg) there are 2 solenoids in the beamline, both in the injector so they're needed early in commissioning, but both set to zero in MAD deck so far!
  9. Anchor
    q_numbeamlines
    q_numbeamlines
    How many beamline descriptions should there be?
  10. What is the canonical list of XAL physics apps?
  11. Does LCLS need SVD based orbit minimization? Is there an orbit minimization in XAL?
  12. Are we going to offer user-level scripting for automating complex procedures such as "turning on the Injector" (per Galayda)? see R&D scripting.
  13. Anchor
    q_slchist
    q_slchist
    Will SLC history data be streamed to the EPICS archiver and then turned off? This depends on whether there is an adequate viewer.

...

  1. Acquisition through JCA should also be verified, since the SLC BPM acqusition is oriented toward acquisitions of whole beamines and is highly parameterized.
    ANS: Diane (posted by Greg): the EPICS BPM API will largely mirror the SLC BPM API in that it will be oriented toward acquisitions of beamlines and allows specification of timing parameters. Greg: That's ok then as long as the setup required in an application is invariant whether it's talking to an SLC BPM through the SLCCAS (and if there is any requirement in LCLS apps to talk to SLC BPMs(question)) or a new IOC hosted BPM.

...