PHELIX shot database (PSDB) Udo Eisenbarth GSI Helmholtzzentrum für Schwerionenforschung GmbH CS Workshop, Jena Experiments Shots Instances
The situation so far… Documenting PHELIX operation was far away from being optimal: Manual shot documentation (Excel table) … error prone Non-standard measurement data stored in single files (“somewhere”) No search for certain shot data Difficult to compare shots / shot series Accessible from only one computer
Requirements for the shot database Technical Reliable data storage Storage of arbitrary data types (numeric, strings, images, spectra, …) Flexible enough to handle changes of the laser setup Possibility to add user data (as attachments) Handling As little maintenance effort as possible Easy access from everywhere Access policy
PSDB structure overview Database Webserver Application written in Ruby on Rails 3.1 Web browser View & Export data LabVIEW interface CS-Application Write data PSDB
Design considerations 1 Shot/Run-based data: Shot Id (Shot Number) Date Comment Experiment Shot type Camera 1 Powermeter 5 Camera 2 Shutter 4 Picture: Exposure Time: 20 µs Picture: Exposure Time: 15 µs Energy: 123 J Position: open No “continuous” data recorded (so far) : permanent measurements (e.g. vacuum)
Design considerations 2 What to measure / record ? e.g: Camera data ParameterData changesData type & size Imageeach shotimage (0.1-1 MByte) Exposure Time from time to time numeric (8 byte) Serial Number very rarelynumeric (8 byte) For each shot ALL data is written to the database minor drawback with respect to size (information redundancy) much easier handling (no versioning necessary) strongly reduced maintenance effort
Database structure overview
Shot structure Shot Shot # Timestamp Experiment # Shot type Shot comment Shot type Test shot Experiment shot Snapshot Experiment Internal P010 P018 … Best shot ever, blah,blah, … :00 Automatically assigned
Measurement data structure Device Data Data types Numeric String Image Spectrum … Devices PA_Input_NF_Cam MAS_Filt1_BB MAS_Spectrometer … Shot #Device #ParameterData typeData 47111ShutterNumeric PictureImage 47112Filt_inNumeric ShutterNumeric Spectrum …………… Shots …
PSDB LabVIEW interface example 1 Open and close a database connection
PSDB LabVIEW interface example 2 Register a (CS-) instance This is usually done in the CS constructor
PSDB LabView interface example 3 Write data
PSDB Statistics During a PHELIX shot data written by 167 registered CS instances. 24 class types and 13 subsystems registered instance values (average) written per shot. 3.6 MByte (average) written per shot. Scalability was tested in development setup > 200 CS instances > 5 million instance values (> 3 GByte) => No performance issues were observed (LabVIEW & Web interface) !
Status LabVIEW / PCS interface Ready to go Web interface 90% implemented (except access control) Still to be done: User authentication and authorization on the way… Further enhancements? Any feature requests from the CS community are welcome. With begin of 2012 PHELIX has completely switched to PSDB