52
BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Stanford Synchrotron Radiation Laboratory Data Acquisition, User Interfaces and Scientific Computing Requirements Workshop on 1921 April 2010 at NSLS2 BNL

BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

  • Upload
    leque

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

BluIce at SSRL

Special features of GUI and framework

Jinhu SongStanford Synchrotron Radiation LaboratoryStanford Synchrotron Radiation Laboratory

Data Acquisition, User Interfaces and Scientific ComputingRequirements Workshop on 19‐21 April 2010 at NSLS2 BNL

Page 2: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 3: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

The SSRL Protein Crystallography Resource

BL 11‐1 (Stanford‐Scripps)Wiggler side‐station

BL 14‐1 (JCSG‐Genentech)Bend magnentWiggler side station

Multi‐wavelength

BL12‐2 (Caltech)UndulatorMAD, Microcrystal

Bend magnentMAD

BL 1‐5 B d

MAD, Microcrystal

BL 9‐1Wiggler side‐stationMulti‐wavelength

BL 9‐2WigglerMAD

BL 7‐1 Wiggler side‐stationMulti‐wavelength

Bend magnetMAD

Multi wavelength

http://smb.slac.stanford.edu/

Page 4: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

BluIce, the GUI

Page 5: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

BluIce HistoryBluIce History

• 2000 By Tim McPhillips2000 By Tim McPhillips

• GoalSi lifi d t l i l ll b li– Simplified control, universal across all beamlines

– Less user editing

– Automation for high throughput

– Remote control

– Secure

Page 6: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

BluIce HistoryBluIce History

• 1 0: Centralized Message Routing Architecture1.0: Centralized Message Routing Architecture

• 2.0: Scripted Motors

3 0 S i d O i• 3.0: Scripted Operations

• 4.0: Object‐Oriented with incrTcl/TK.

• 5.0: SSL

Page 7: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

BluIce, the GUIPoint of view of user

T b St l M i i f GUI l t t• Tab Style: Maximizes use of GUI real estate

• Less is Better: hide details from user.

• Comprehensive: diverse user base

• GUI, no scripting for normal user.GUI, no scripting for normal user.

• Convenient (easy to say)

Page 8: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Convenient

• Major System Status on status bar

• Balloon Hints for disabled inputs

• Resolution calculator

• Auto‐Correction and Preview: spot mistakes

• Dropdown list for motor positions• Dropdown list for motor positions.

• Click and move sample

• Customize column display for spreadsheet

Page 9: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

• Major Status:Major Status:

Page 10: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 11: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 12: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Sample Storage Cassette/Puck

Page 13: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 14: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 15: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Auto‐Correction and Preview

Page 16: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 17: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 18: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 19: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 20: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 21: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 22: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 23: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 24: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 25: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 26: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 27: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 28: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 29: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 30: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 31: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

BluIce, the GUIPoint of view of programmer

•Object Oriented (incrTcl/TK): reusable widgets from small single button to the whole BluIce.•Component Framework:  publish attributes for subscriptionsubscription•GateExtension: Automatic message for balloon hints.•Configure support•Configure support,•Log support.

Page 32: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

DCS frameworklocation awarenessclients:

Central controller:

Distributedhardware servers:

GALIL Ethernet Motor Controller

VMS CAMAC Motor Controller

Motor DHS

Motor DHS

Blu-Ice

In hutch

DCS Protocol

DCSS Axis Server

RobotRobot DHS

Camera DHSBlu-Ice

local

remote

Detector (e.g. MarCCD)

EPICSEPICS DHS

Detector DHS

Blu-Ice

CA protocol

Authentication Server

Impersonation Server

Image Server

Crystal DataServer

Web services

http protocol

Crystal AnalysisServer

Page 33: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Special features of framworkp

•Central Control•Ultra‐light text wire protocol•Security:

•Authentication Server•Impersonation Server

•WebIce Services:•Crystal Information Server•Crystal Analysis Server

Page 34: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

The Dcs Message Format:Header: 26 bytes NULL ended text with 2 numbers in ASCII format.

Message sequence for a motor move command:Active BluIce DCSS: gtos start motor move beam stop z 12.0Active BluIce DCSS: gtos_start_motor_move beam_stop_z 12.0DCSS  galil1: stog_start_motor_move beam_stop_z 12.0Galil1  DCSS: htos_motor_move_started beam_stop_z 12.0Galil1  DCSS: htos_update_motor_position beam_stop_z 30.0G lil1 DCSS h d i i b 20 0Galil1  DCSS: htos_update_motor_position beam_stop_z 20.0Galil1  DCSS: htos_update_motor_position beam_stop_z 12.0Galil1  DCSS: htos_motor_move_completed beam_stop_z 12.0 normal

DCSS will broadcast all message from Galil1 to all BluIce clients.The Galil1 sends the update message at around 10Hz.

Page 35: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

DCSSDCSSSwitching:

Relay message from BluIce to the devices’s host DHSBroadcast message from DHS to all BluIce

“self”: a special build‐in DCSS client: registered as both DHS and BluIce

It is the script engine, supports devices: operation, motor, string, ion chamber….

It is also an GUI client so that it can receive all messages from all DHS to keep track of all devices and send command to DCSS to access other DHSaccess other DHS.

There is no special treatment for “self” in DCSS, except it does not need authentication.

Page 36: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Script engineScript engine

• A place to integrate devices from differentA place to integrate devices from different DHS into a super device (like energy)

• A place to write operations (scripts) to finish a• A place to write operations (scripts) to finish a task, especially if the task need to access more than one devices (like screening)than one devices (like screening)

Page 37: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

An operationAn operation

• proc NAME initialize {}proc NAME_initialize {}

• proc NAME_start {argument list}

l {}• proc NAME_cleanup {} 

Page 38: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

A motorA motor

• Proc NAME initialize {}Proc NAME_initialize {}

• Proc NAME_move { new_position}

{ i i }• Proc NAME_set { new_position }

• Proc NAME_update {}

• Proc NAME_calculate { child motor list if any }_ _ _ _ y }

Page 39: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Device MappingDevice Mapping

• energyenergy2self energy bl92self energy_bl920 1 1 1 10 0 1 1 10 0 1 1 1112666 012477 15000 6000 0 0 0 0 ev12666.012477 15000 6000 0 0 0 0 evmono_theta_corr

Page 40: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

SecuritySecurity• Authentication Server (Tomcat jsessionID, CAS 

f )as reference)– single sign‐onS t ti ti k t ith h t ti– Support one‐time ticket with short time span

– https

I ti S• Impersonation Server– Access file on behave of userR d t i i t– Run data processing scripts as user

• SSL

Page 41: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

SecuritySecurity• SSL on most communications:

– Authentication (very frequent)

– BluIce to DCSS (not frequent)

– BluIce to Crystal and Analysis Servers (frequent)

• One‐time‐ticket for others:One time ticket for others:– BluIce to Image server (frequent)

– Detector DHS to Impersonal Server (frequent)Detector DHS to Impersonal Server (frequent)

• Users only login to terminal machines.

Page 42: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

imgsrvimgsrv

• Staff can see any user’s image fileStaff can see any user s image file.

• Cached image list

b i h• Zoom, pan, brightness

Page 43: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

CollaborationCollaboration

Page 44: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 45: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 46: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,
Page 47: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

EPICS Gateway DHSEPICS Gateway DHSDCS EPICS

Real Motor Motor: scale factor speedReal Motor Motor: scale factor, speed, …

Pseudo Motor Motor

Shutter Shutter

String All others (ai, ao, Li, Lo, si, so,…)

Standard EPICS motor record (old and new)Australia Light Source motor templateLyncean Tech motor templateCanadian Light Source motor templateSSRL Undulator Gap motor templateSSRL Undulator Gap motor template

Page 48: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

EPICS gateway DHSEPICS gateway DHSspear_current1313epics_gateway SPEAR:BeamCurrAvg1S0 0 0 0 00 0 0 0 0

sample_x11epics_gateway SMTR99993I1012:mm0 1 1 1 10 1 1 1 100.0 500 ‐500 6768.189 1000 500 10 1 1 0 1 0 0 mm

Page 49: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

EPICS Gateway DHSEPICS Gateway DHS

• 7 Motors: energy beam size (2) attenuation7 Motors: energy, beam size (2), attenuation, beam stop, detector distance, phi

• Detector DHS or 3 operations and 1 string:• Detector DHS or 3 operations and 1 string:collect_image, oscillation_ready, transfer image lastImageCollectedtransfer_image, lastImageCollected

Page 50: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Users love Blu‐Ice because…

Page 51: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

Reasons for Blu‐Ice’sf lease‐of‐use & popularity

•The programmers belong to the beamline•The programmers belong to the beamlinesupport group.•The programmers’ boss and colleagues•The programmers  boss and colleagues are the main users•The boss uses and messes with the GUI•The boss uses and messes with the GUI•Support staff complain after a call from a confused userconfused user•Staff are tired/confused during startup

Page 52: BluIce at SSRL - Brookhaven National Laboratory at... · BluIce at SSRL Special features of GUI and framework Jinhu Song Stanford Synchrotron Radiation Laboratory Data Acquisition,

The SSRL Macromolecular Crystallography Group

Additional support for the SSRL Structural Biology program is provided by:

SSRL operations is funded by the Department of Energy, Office of Basic Energy Sciences