+ SwissFEL Matlab Toolbox ADAQA used for Emittance Measurements Bolko Beutner, Rasmus Ischebeck PSI / DESY / KIT Mini-Workshop on Longitudinal Diagnostics for FELs
+ SwissFEL Introduction ADAQA “Do it yourself! - Scan Tools” SITF Emittance Measurement Application Overview Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL Optics based emittance measurements: –Beam moments are determined at a reference point using either: one screen while varying the quadrupole settings at multiple positions along a constant lattice –Slice resolved measurements in combination with a transverse deflecting rf-structure Introduction to Emittance Measurements Beutner PSI / DESY / KIT Mini-Workshop screen quadrupole reference point
+ SwissFEL Beam size at point i as a function of initial beam moments: From the beam moments emittance (and twiss parameters) are determined: In an ideal measurement three data points are sufficient: In a real measurement more then three data points are taken and the beam moments are determined by a least square fit: Emittance Measurements Beutner PSI / DESY / KIT Mini-Workshop determined by diagnostics provided by beam dynamics
+ SwissFEL These measurements need to be automatised for standard operation and commissioning, task are e.g.: –moving screens in and out –varying quadrupole settings –restore initial lattice configuration A successful measurement procedure (high level application) needs to be reliable, robust, and usable “Always have the operator at the end of the night shift in mind!” Accelerator operation in general relies on data acquisition and parameter scans In the various applications the requirements are actually quite similar Tasks should be unified and standardised to prevent that every application developer “reinvents the wheel” ADAQA - An Accelerator Data Acquisition & Analysis Framework Scan Framework Beutner PSI / DESY / KIT Mini-Workshop5
+ SwissFEL Have a universal scan and data acquisition software Well-tested scan core Universal GUI to set up scan easily Specialized GUIs for easy access for regularly performed scans Error checking and treatment Common HDF5-based file format for easy access from any data analysis code Automatic generation of logbook entries Link to auxiliary information on accelerator configuration Synchronized data acquisition ADAQA Goals Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL Hierarchical format to store Instruments Based on HDF5 Readable from Matlab, Root, Mathematica Meta information stored together with raw data ADAQA Data File Format Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL ADAQA consists of several separate building blocks Applications, written by different programmers, make use of the same data acquisition code Instruments gather connected devices Logbook Common data storage format Online model* Device information server* Synchronized data acquisition ongoing work, not yet ready for prime time ADAQA Layers Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL Abstraction Layers Beutner PSI / DESY / KIT Mini-Workshop EPICS Machine Interface EPICS call Error handling Image data conversion
+ SwissFEL Abstraction Layers Beutner PSI / DESY / KIT Mini-Workshop Instruments and Knobs Assemble several connected values On-line data processing and actions Machine Interface EPICS call Error handling Image data conversion XML files
+ SwissFEL Scans Write data file Make entry in electronic logbook Abstraction Layers Beutner PSI / DESY / KIT Mini-Workshop Instruments and Knobs Assemble several connected values On-line data processing and actions Machine Interface EPICS call Error handling Image data conversion HDF5 files eLog
+ SwissFEL Graphical User Interfaces Programmed by different people Include Data Analysis Scans Write data file Make entry in electronic logbook Abstraction Layers Beutner PSI / DESY / KIT Mini-Workshop Instruments and Knobs Assemble several connected values On-line data processing and actions Machine Interface EPICS call Error handling Image data conversion
+ SwissFEL General purpose camera display and analysis tool In every day use for different kinds of cameras and screen monitors ScreenMonitorTool Beutner PSI / DESY / KIT Mini-Workshop Dione and Saturn
+ SwissFEL General Purpose Scan Tool Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL Scans can be stored in Template files The last scan is always stored as template –“Repeat Last Scan…”-Button Data files are scan templates as well –All scans can be exactly repeated Templates can handed over to the scan tool at startup –example: extracted charge vs. gun phase scan Scan Templates Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL Automatised logbook entries Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL General and specialised scan tools are possible with ADAQA –a wide variety of tools is available Common data format Templates –data files are templates – for all tools Actions –e.g. automatic screen insertion or background subtraction Analysis functions Automatic logbook entries Scan Tools Summary Beutner PSI / DESY / KIT Mini-Workshop
+ SwissFEL “Atomic” Scan Tool Beutner PSI / DESY / KIT Mini-Workshop knob{1} = LoadKnobDefinition('beispielknopf');% setup Knob and Instrument knob{1}.SetpointValues = [1, 2.4, 3, 3.78, 92];% scan setpoints instrument{1} = LoadInstrumentDefinition('messgerät'); Setup.Function = 'scan';% define scan setup Setup.Repeat = 10;% “shots” per scan step Info.Author = 'Beutner';% human readable info Info.Title = 'PSI / DESY / KIT Mini-Workshop'; Info.Purpose = 'this is a small scan tool demo...'; [DAQFileName, Setup, knob, instrument, Info] =... daq(Setup,knob,instrument,Info);% execute scan % …insert your analysis code here…
+ SwissFEL Specialised Scan Tools Beutner PSI / DESY / KIT Mini-Workshop Slit phase space measurements SFITF Phase I: mm mrad ( h36 240pC 4mm) Beutner
+ SwissFEL Specialised Scan Tools Beutner PSI / DESY / KIT Mini-Workshop details on the recent results in Eduards talk
+ SwissFEL PhaseAdvanceScanYquads103050screen10 Phase advance scan for the SwissFEL Injector Test Facility Eduard Prat deg Example: Phase Advance Scan Beutner PSI / DESY / KIT Mini-Workshop21 single knob definitions conversion definition multi knob definition Knobs can be complex objects elementary “real” physical devices, e.g. quardupoles combined knobs (“multiknobs”), e.g. phase advance
+ SwissFEL FINXB_MQUA10 First quadrupole of triplet Rasmus Ischebeck FINXB-MQUA10:I-SET WaitForReadback FINXB-MQUA10:I-READ FINXB_MQUA30 Third quadrupole of triplet … FINXB_MQUA50 Quadrupole … single knob definitions Beutner PSI / DESY / KIT Mini-Workshop22 knobs are defined together with meta information, e.g: Setpoint address Readback address Readback tolerance …
+ SwissFEL [ ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ] [ ; ; e-06; ; ; ;0 0; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ] [ ; ; ; ; ; ;0 0; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ] conversion definition Beutner PSI / DESY / KIT Mini-Workshop23 The abstract multiknob (phase advance) is connected to the physical knobs (quadrupoles) by a conversion table. Conversions can be given as numerical tables or formulas.
+ SwissFEL An Accelerator Data Acquisition & Analysis Framework was developed for SwissFEL (and other facilities) ADAQA is routinely used at the SFITF Scope of applications is not restricted to simple scans, e.g. phase advance scans or slice emittance measurements are a standard application Thank You for Your Attention! Summary Beutner PSI / DESY / KIT Mini-Workshop24