Data Acquisition Integration and Experiment Automation with Python • Introduction & Motivation • PyDAS Overview • Summary Piotr Żołnierczuk Neutron Scattering Science Division Oak Ridge National Laboratory SciPy 2009 Conference, Pasadena, CA
Data Acquisition Integration and
Experiment Automation with Python
• Introduction & Motivation• PyDAS Overview • Summary
Piotr Żołnierczuk
Neutron Scattering Science DivisionOak Ridge National Laboratory
SciPy 2009 Conference, Pasadena, CA
OAK RIDGE NATIONAL LABORATORYU. S. DEPARTMENT OF ENERGY
Why is neutron scattering useful?
•Neutrality
•Sensitivity to light atoms
•Magnetism
•Energy
References:ORNL NScD: http://neutrons.ornl.gov/Neutron Primer: http://lib-www.lanl.gov/la-pubs/00326651.pdfDANSE Book: http://www.cacr.caltech.edu/projects/danse/ARCS_Book_16x.pdf
OAK RIDGE NATIONAL LABORATORYU. S. DEPARTMENT OF ENERGY
Crash Course in Neutron Scattering
n
Detectors
SampleBeam Optics Beam Dump
OAK RIDGE NATIONAL LABORATORYU. S. DEPARTMENT OF ENERGY
SNS DAS Architecture
Real Time
Timing
Control & Events
Slow Controls
OAK RIDGE NATIONAL LABORATORYU. S. DEPARTMENT OF ENERGY
PyDas History
• Project started as a simple scripting “hook” to the DAS
− soon Instrument Scientists wanted more
• At the moment each instruments is a separate project
− So far only a few instruments, but maintenance is becoming an
issue
− We are consolidating them into common source tree
OAK RIDGE NATIONAL LABORATORYU. S. DEPARTMENT OF ENERGY
Examples: Scannig in IPyDas
scan_motor('motor1',arange(10.0,90.0,0.5),
scan.RUNTIME,30.0,go_back=True)
scan_plot()
for temp in [273.0,293.0,313.0,333.0]:
tempctrl.value = temp
scan_chopper('Energy',[25.,35.,50],scan.PCHARGE,1e10,
title='The Nobel Prize Data at T=%s K' % temp)
OAK RIDGE NATIONAL LABORATORYU. S. DEPARTMENT OF ENERGY
Summary• PyDAS
− “glues” various DAS devices together
− allows for experiment automation
• Challenges & Future
− need to support 24 different instruments
− high level customization
− currently refactoring and consolidating project
− provide basic data viewing
− new project [?]: C#/.NET + (Iron)Python
Thanks to: Rick Riedel and Xiaodong Tao