Requirements, as discusssed in Requirements Meeting,  April 15, 2008

1 Devices Selection

* Choose an accelerator area in order to get a list of wires from which to choose to scan
* Based on area chosen, list the detectors pre-configured for that area.
   o  Use current lists (in Matlab WS GUI) per area as a baseline and make the configuration of lists easy to modify
* Save the following information, specific per wire, via a "Save Setup" button:
   o PMT chosen (one) (for beam profile analysis)
   o Charge detector (BPM, TORO) chosen (one) (for charge normalization)
   o BPMS selected (at least two) (for beam trajectory)
   o Wire plane (x, y, u) chosen
   o Default fitting algorithm to be displayed in plot.
        - When selecting a wire, the last good scan for this wire will appear in the plots. The algorithm chosen for display in the Profile Plot will use this default fitting algorithm
* "Load Setup" button will override the current settings above

2  Setup

* The following setpoints are EPICS PVs that must be monitored to reflect the current settings in the IOC made by other WS app instances (like edm):
  o Selected wire's "Inner" and "Outer" scan limits per plane  x, y, u 
  o Selected wire's "Offset" value per plane x, y, u (offset from beam center for ea plane for beam coordinate system)
  o Selected wire's "Scan Pulses" value
  o Selected wire's selected plane
* The above monitored setpoints can also be modified by the wire scan GUI. The new value is output to the IOC immediately upon entry.
* Monitor all wires'  "Scan in progress" value per area in order to display an indicator that a scan is being done in this area by another wire scan app instance. This indicator should be close to the "Start Scan" button.
* An "Auto Center" option  is Phase 2
  o Shift wire limits (maintains same width) to center on actual beam position based on last good scan's bpm readings. The current auto center is independent of wire scan. It does an orbit fit to find the position of the wire. The BPMS, being absolute, introduce error; however, the option to compute a new wire offset takes care of that. Additional BPM offsets can throw the fit, however, it doesn't have to be that accurate, it only has to get the wire into the proper scan range.
* An "Auto Width" option is Phase 2
  o Looks at the last good scan's beam size and sets a new scan range of +/- 10 sigma around center; it also performs an auto center to find the center.
* Option to compute new wire Offset position / plane ("Offset") (PV) 
  o Offset from beam center per plane used for beam coordinate system
  o Using last good scan, compare wire scan position at centroid with fit from bpm data
* One plane should be scanned at a time

3 Data Storage

* Store last good scan per wire per plane for future display and calculations
  o Good scan criteria, phase 1, is a flag set by the IOC as an indication that the scan succeeded mechanically. No data qualification is computed.
  o Good scan criteria, phase 2, can be qualified further by pre-processing the data.

* "->Log Book" / Print (screen capture of plots and fit parameters, labeled and timestamped)
  o Raw and profile data is also saved with same label and timestamp
* Save Settings / Load Settings
* Export data to Matlab (.mat file) - fit data and raw data
* Save Scan / Load Scan (labeled and timestamped)

4  Control

* Scan Mode
  o Wire - normal fly-through
  o Corr - Possibly phase 2 (steers beam across wire to mitigate wire vibration)
  o Step - Not needed (step and dwell to mitigate wire vibration)
* Selection of planes is mutually exclusive
* Start Scan - scans one plane at a time
   o Failure mode upon calculating an invalid speed from the following scan parameter combination: beamrate, scan pulses, scan range
* An indicator displays that a scan is being done by another wire scan app instance of a wire in the same area. This indicator is close to the "Start Scan" button.
* Monitor and display wire's scan progress status / errors
* Abort Scan
* Three different positions are requested:
  o Define Park position = positions at beginning of scan
  o Define Retract position = almost all the way out
  o Define Out position = all the way out
* Retract option - when chosen, wire moves to the retract position after scan completes. This overrides the IOC behavior which places wire at the "park" position. Retract position is hard-coded as 20,000 microns; should be a PV, as should all three positions defined above.
* Out option - manual retract (now); make it manual Out position
* Link to EDM panel(s) for troubleshooting / maintenance
* Control Arbitration - coordinate administratively (verbally  in the Control Room) for use of wires shared between multiple wire scan app instances.

5  Data Collection

* Use Beam Synchronous Acquisition (BSA) for collecting detector and motor control data
* Read from BSA the data buffers for all detector and motor control devices "configured" in the current area
* Use IOC's success = 1 flag to determine a good scan.

6  Pre- Processing

* With BSA buffers, mask out the data in all buffers that coincides with the part of the scan in which the motor is actively scanning from inner to outer.
* Jitter correction Option - mitigates shot to shot variation
  o Using on-line model, fit extant bpm trajectory, calculate offset at the wire. Shift each raw data wire position by the offset.
  o Use current matlab algorithm. When shifting each wire, "the avg of the delta x correction should be used.  " You don't want to change the average at all. Use mean position at each pulse.
* Charge normalization Option -
  PMT signal is comprised of the following 4 components:
  1. ADC Offset
  2. Charge independent background (dark current)
  3. Charge dependent background (beam loss, inserted OTRs)
  4. Beam related signal
  Normalize 3)the background and 4)the beam related signal with respect to TMIT.
  o Provide option to subtract background - this should inhibit the beam
  o Using tmit data, scale each raw PMT data point independent of PMT background.
  o Use current matlab algorithm. When shifting each PMT, "the avg of the delta x correction should be used. " You don't want to change the average at all. Use mean position at each pulse.
* Return a (PMT) Saturated flag
* Return a no beam flag (use BPM data)

7 Post-Processing - Fitting

* Allow an arbitrary number of fitting algorithms.
* Provide fit data per plane, per wire, for all fitting algorithms (but careful because some algorithms don't give the parameters of others, so it isn't straight forward to templatize (eg not all have chiSq).
* Provide rms, mean, area for each wire, all planes
* Return a beam centered flag?(centroid positions wrt scan range)
* Store fit data, along with raw data with "Store Scan" button, labeled and timestamped.
* Load fit data and raw data upon "Load Scan" and after choosing appropriate labeled and timestamped item.
* Always update the last good scan fit and raw data for this wire, this plane (if good).

8  Plotting

* Plot last good scan in respective plane until new scan is completed
* All plots need to be labeled and timestamped
* Plot current  scan in respective plane after completed by IOC and data is read from IOC
* Allow labeling by motor position or x,y,u coordinates (Phase 2).
* Pick scan inner and outer values by clicking on data plot, after selecting respective "Pick" button
* Raw data (2-D) Plot -
  o color coded by device
  o "show selected" devices only option
* Profile data (2-D) Plot - Wire position (um, x axis) versus PMT signal (QDCRAW, y axis)
  o connect adjacent points with dashed lines
  o selected fit is superimposed, different color
  o plot redraws when changing fit selection
  o numeric fit data displayed: [x,y,u]area (Mcts), [x,y,u]mean (mm), [x,y,u]rms (um)
* Dispersion Plot for WS04 - using dispersion at wire from model, compute energy axis in Profile Plot
* Display design rms, design emittance

9  External Interfaces

* CMLOG logging
* On-line model
* Shares fitting algorithms / plotting with other apps
* Wire Scan public API - Allow other applications - Emittance, Correlation Plots, etc, to:
  o Control wire scans 
  o Retrieve raw data and fit data
  o Retrieve Data Plots - profile, raw

  • No labels