at ihep beijing 2002 8 21 noboru yamamoto kek japan n.
Skip this Video
Loading SlideShow in 5 Seconds..
SAD and Python with EPICS PowerPoint Presentation
Download Presentation
SAD and Python with EPICS

Loading in 2 Seconds...

play fullscreen
1 / 35

SAD and Python with EPICS - PowerPoint PPT Presentation

  • Uploaded on

at IHEP,Beijing, 2002.8.21 Noboru Yamamoto KEK, JAPAN. SAD and Python with EPICS. Simple, well understood behavior. High Level Applications in KEKB. Applications and Operator displays in KEKB Application Launcher. SAD is widely used for high level applications.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'SAD and Python with EPICS' - marisa

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
high level applications in kekb
High Level Applications in KEKB
  • Applications and Operator displays in KEKB Application Launcher
  • SAD is widely used for high level applications.
  • medm/dm2k is used for simple displays.
  • Python is also used for application development.
sad applications
SAD applications
  • Operator Interface
    • Optics measurement
    • Optics calculation and Optics
    • Collision Monitors ...
  • Slow Feedback (with OPI)*
    • iBump:a system keeps beams in collision
    • Closed orbit correction

*)It is preferable to separate FB loop and its user interface into different processes.

kekb launcher
KEKB Launcher
  • Program written in SAD/KEKB Frame
  • Starting point of KEKB operation
  • User can register a new command on the fly*.
  • simple load balancing between servers.
  • User can select a host to execute a command.

*) Application reads a configuration file , kbl.conf, at start up and on request by operator.

sad and python compared

General Purpose Object Oriented dynamic language

Developed by Open source project

Simple and Clean syntax

Support CA and Tk widget

RDBMS interface

Variety of extension modules

SAD and Python compared
  • SAD
    • Accelerator modeling
    • Developed at KEK
    • Mathematica like scripting
    • support CA and Tk widget
    • Modules for KEKB operation
sad installation
SAD installation
  • SAD Source Download Page
    • You need ID and password to download the source code. Contact for your ID and password.
    • You also need Tcl/Tk source code and a patch specific to SAD/Tkinter.
    • Electric conference room for SAD (in Japanese).
sad script
SAD script
  • SAD Scripts follows Mathematica(R) syntax.No statements, just functions.
  • Every Elements has a form:
    • Head[arg1, arg2,...]
    • eg. If[cond, st1, st2 ]
  • Some Element has a special notation
    • Plus[ 1, 2] <-> 1+2
    • List[a,b,c] <-> {a, b, c}
  • Name of element/function is same as that of Mathematica.
kekb frame
KEKB Frame
  • Framework, i.e. a collection of programs/scripts, to support development of GUI Application
    • Standard Menu
    • Help menu including “Process Info”
    • status bar including print button
  • Build upon Tkinter Widget Set
extending sad
Extending SAD
  • SAD modules can be used to extend SAD script functionality, i.e. add a new function to SAD script.
  • SAD modules is a library written in SAD script.
  • Fortran and C is used to develop SAD program itself.
  • Fortran or C can be used add a new functionality to SAD script.
python installation
Python installation
  • Python Web site:
    • Source code and binary(Windows, Mac, rpm)
    • gnuzip;tar; configure; make from tar.gz file.
    • Use of Pmw(Python mega widget) together with Tkinter is recommended
    • Use of Gtk+(PyGtk) is another possibility.
    • Get CA interface from ANL EPICS web site or KEKB web site (or Both)
python syntax
Python syntax
  • Python uses indentation to specify a block structure of a program e.g.:if cond : statements_1else: statements_2other_statements
  • Usage of special characters are common to most of programing language.
extending python
Extending Python
  • Python modules add new functions and/or classes to Python language.
  • There already exists a rich set of Python modules.
  • C or C++ can be also used to develop new modules ( C-modules).
  • Tools such as SWIG can be used to develop a C- module.
embedding python
Embedding Python
  • Python can be used as an extension language of the existing program.
  • It adds flexibility and extendability to the program.
  • For example, PostgreSQL, a free RDBMS, can use Python to define a stored procedure or define a new object.