O A K RIDG E N ATIONA L L ABORATORY
- U. S. DEPART M ENT O F E NERG Y
Beam Optics Sample n Detectors A canonical experimental recipe - - PowerPoint PPT Presentation
A Crash Course in Neutron Scattering Beam Optics Sample n Detectors A canonical experimental recipe (scanning): while not done: exp_parameters_set( ;T,P,B) accumulate_statistics(t,N) O A K R IDG E N ATIONA L L ABORATORY U . S . D
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
Cool side
Cooled surface
power space probes refrigeration capture “waste heat”
O.Delaire, J. Ma, K. Marty, A. May, M. McGuire, M.-H. Du, D. Singh, A. Podlesnyak, G. Ehlers, M. Lumsden, and B. Sales, Nature Materials, 2011, doi:10.1038/nmat3035
O A K RIDG E N ATIONA L L ABORATORY
Spallation Neutron Source
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
Python for Data Acquisition System = PyDas
DcomClient
Data Preprocessor Detector Electronics
Motors Control Application
Motors Satellite Application Motors … … …
Sample Environment Control Application
Sample Environment Satellite Application Sample Environment Hardware
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
Memory Maps dasmapcq, memmap Win32 API (PyWin32) Core Packages: pydas.core ipython, numpy, scipy, matplotlib
Device Abstraction pydas.devices Experiment Abstraction: pydas.scan, pydas.lib GUI Base: wxPython GUI Widgets IPyDas shell PyDas GUI REST Client: pydas.web
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
SciPy Conference 7/14/2011
O A K RIDG E N ATIONA L L ABORATORY
O A K RIDG E N ATIONA L L ABORATORY
s = scan(‘Motor1', arange(10.0,90.0,0.5), runtime=30.0, plot='counts') s.fit('gauss+poly2') for SampleTemp.value in [273.0,293.0,303.0,323.0]: scan('Energy', [25.,35.,50], pcharge=3e12, title='Nobel Prize Data at T=%s K‘ % SampleTemp.value)
O A K RIDG E N ATIONA L L ABORATORY
while while not done: not done: exp_parameters_set exp_parameters_set(λ;T,P,B) ;T,P,B) accumulate_statistics accumulate_statistics(t,N t,N)
SciPy Conference 7/14/2011
O A K RIDG E N ATIONA L L ABORATORY
SciPy Conference 7/14/2011
O A K RIDG E N ATIONA L L ABORATORY
SciPy Conference 7/14/2011
O A K RIDG E N ATIONA L L ABORATORY
crack tip
Strain Mapping
unexpected area of interest
Sample Schema Experiment Script
O A K RIDG E N ATIONA L L ABORATORY
Experiment Optimization (where to measure) Instrument Control (PyDas) Real-time Event Data
Real-time Data Reduction
Uncertainty Evaluation (when to stop)
O A K RIDG E N ATIONA L L ABORATORY
http://host/NEWEXP?EXPID=weld&XMIN=0.0&XMAX=10.0&MAXPTS=20
http://host/CURR_PT
http://host/QOD
O A K RIDG E N ATIONA L L ABORATORY
PyDas (REST Client)
Instrument
REST Server Fitting
When to stop?
Optimizer
Where to measure? HTTP
StatusViewer
NEUTRON DATA
O A K RIDG E N ATIONA L L ABORATORY
das = get_das() cli = DasWebClient('http://localhost:8080') qod = DasWebClient(‘http://localhost:8080/QOD’) cli.put(r'/NEWEXP?EXPID=weld&XMIN=0.0&XMAX=10.0&MAXPTS=20‘) while True: new_x w_x = = cli. cli.get get(r (r'/CUR '/CURR_PT' R_PT') if new_x is None: break das.start() das.wai s.waiton ton(qod
das.stop()
O A K RIDG E N ATIONA L L ABORATORY
the latest histogram the latest fitting results historical fitting results Peak Position ith Fitting Result fitting error x x Intensity Intensity
O A K RIDG E N ATIONA L L ABORATORY
PyDas “glues” various DAS components together We’ve added and prototyped REST interface We will look into new IPython/ZMQ more closely
Thanks to all engineering staff from SNS Data Acquisition Group and especially to Lloyd Clonts, Gayle Greene, Steve Hicks, Andre Parizzi, Richard Riedel, Mariano Ruiz-Rodriguez and Madhan Sundaram
O A K RIDG E N ATIONA L L ABORATORY
SciPy Conference 7/14/2011