Beam Optics Sample n Detectors A canonical experimental recipe - - PowerPoint PPT Presentation

beam optics sample
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

A Crash Course in Neutron Scattering

n

Detectors Sample Beam Optics

A “canonical” experimental recipe (scanning): while not done: exp_parameters_set(λ;T,P,B) accumulate_statistics(t,N)

slide-2
SLIDE 2

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Thermoelectric materials

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

slide-3
SLIDE 3

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Spallation Neutron Source

slide-4
SLIDE 4

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

SNS Instruments

slide-5
SLIDE 5

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

SNS Data Acquisition SNS Data Acquisition System System

Real Time Timing Control & Events Slow Controls

slide-6
SLIDE 6

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Communication Communication Overview Overview

Hardware Satellite Computers Control Computer

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

slide-7
SLIDE 7

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

What do the scientists want?

slide-8
SLIDE 8

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

What do the scientists want?

slide-9
SLIDE 9

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

PyDas PyDas Architecture Architecture

Memory Maps dasmapcq, memmap Win32 API (PyWin32) Core Packages: pydas.core ipython, numpy, scipy, matplotlib

PyDas Main Application

Device Abstraction pydas.devices Experiment Abstraction: pydas.scan, pydas.lib GUI Base: wxPython GUI Widgets IPyDas shell PyDas GUI REST Client: pydas.web

slide-10
SLIDE 10

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

PyDas PyDas GUI Example: Sca GUI Example: Scanning nning

slide-11
SLIDE 11

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

PyDas GUI Example: Status Page

SciPy Conference 7/14/2011

slide-12
SLIDE 12

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

PyDas PyDas Shell (IPyDas) Shell (IPyDas)

slide-13
SLIDE 13

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Examples: Examples: Scanning Scanning in in IPyDas IPyDas

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)

slide-14
SLIDE 14

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Efficient Beam Time Usage

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)

Beam time is expensive! 1) How to choose the parameters in the most

  • ptimal way?

2) How long to measure in each setting?

SciPy Conference 7/14/2011

slide-15
SLIDE 15

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

A Hypothetical Experiment

SciPy Conference 7/14/2011

slide-16
SLIDE 16

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

VULCAN – Engineering Diffraction

SciPy Conference 7/14/2011

slide-17
SLIDE 17

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

crack tip

Strain Mapping

unexpected area of interest

Sample Schema Experiment Script

slide-18
SLIDE 18

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Experiment Optimization (where to measure) Instrument Control (PyDas) Real-time Event Data

Real-time Data Reduction

Uncertainty Evaluation (when to stop)

slide-19
SLIDE 19

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

PyDAS REST Interface

 NEW Experiment (PUT)

 http://host/NEWEXP?EXPID=weld&XMIN=0.0&XMAX=10.0&MAXPTS=20

 Current Point (GET)

 http://host/CURR_PT

 Quality of Data - are we there yet? (GET)

 http://host/QOD

slide-20
SLIDE 20

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

PyDas (REST Client)

Instrument

REST Server Fitting

When to stop?

Optimizer

Where to measure? HTTP

StatusViewer

NEUTRON DATA

Example Implementation

slide-21
SLIDE 21

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

RESTful Web Interface

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

  • d)

das.stop()

slide-22
SLIDE 22

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

the latest histogram the latest fitting results historical fitting results Peak Position ith Fitting Result fitting error x x Intensity Intensity

slide-23
SLIDE 23

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

Summary & Summary & Outlook Outlook

 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

slide-24
SLIDE 24

O A K RIDG E N ATIONA L L ABORATORY

  • U. S. DEPART M ENT O F E NERG Y

The End.

SciPy Conference 7/14/2011