Running an Open Source Synchrotron Physics Synchrotron BRGHT - - PowerPoint PPT Presentation

running an open source synchrotron
SMART_READER_LITE
LIVE PREVIEW

Running an Open Source Synchrotron Physics Synchrotron BRGHT - - PowerPoint PPT Presentation

Running an Open Source Synchrotron Clinton Roy Me Running an Open Source Synchrotron Physics Synchrotron BRGHT Clinton Roy 1 Software Outcomes Australian Nuclear Science and Technology Organisation EuroPython 2019 1


slide-1
SLIDE 1

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Running an Open Source Synchrotron

Clinton Roy1

Australian Nuclear Science and Technology Organisation

EuroPython 2019

1clinton.roy@gmail.com

slide-2
SLIDE 2

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outline

1 Me 2 Physics 3 Synchrotron 4 BR—GHT 5 Software 6 Outcomes

slide-3
SLIDE 3

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

WARNING

The following slides contain some diagnostic medical images. These are in false colour and are not realistic.

slide-4
SLIDE 4

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
slide-5
SLIDE 5

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
  • An Open Source Software Engineer
slide-6
SLIDE 6

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
  • An Open Source Software Engineer
  • Mostly supporting research of various sorts
slide-7
SLIDE 7

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
  • An Open Source Software Engineer
  • Mostly supporting research of various sorts
  • A teacher/trainer
slide-8
SLIDE 8

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
  • An Open Source Software Engineer
  • Mostly supporting research of various sorts
  • A teacher/trainer
  • Helps to run Open Source conferences
slide-9
SLIDE 9

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
  • An Open Source Software Engineer
  • Mostly supporting research of various sorts
  • A teacher/trainer
  • Helps to run Open Source conferences
  • linux.conf.au, Gold Coast, Australia Jan 13-17
slide-10
SLIDE 10

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I?

  • An Australian
  • An Open Source Software Engineer
  • Mostly supporting research of various sorts
  • A teacher/trainer
  • Helps to run Open Source conferences
  • linux.conf.au, Gold Coast, Australia Jan 13-17
  • Call for presentations open, anything Open Source
slide-11
SLIDE 11

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I NOT?

  • A physicist
  • A scientist
  • A hardware engineer
  • A researcher
  • An academic
  • An electrician
slide-12
SLIDE 12

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Who am I NOT?

  • A physicist
  • A scientist
  • A hardware engineer
  • A researcher
  • An academic
  • An electrician
  • But that’s OK, as there are plenty of those at the synchrotron
slide-13
SLIDE 13

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

The Whole Spectrum

Figure: Wikipedia

slide-14
SLIDE 14

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

The X-ray Spectrum

Figure: Wikipedia

slide-15
SLIDE 15

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

What is a Synchrotron?

Figure: Aus Synchrotron

  • A big research tool to look at really small things
  • A microscope that uses X-rays instead of visible light
  • A really fancy X-ray machine
slide-16
SLIDE 16

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

What is a Synchrotron?

Figure: Aus Synchrotron

  • A big research tool to look at really small things
  • A microscope that uses X-rays instead of visible light
  • A really fancy X-ray machine
  • (don’t repeat any of that, work won’t have me back)
slide-17
SLIDE 17

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How does it work?

  • Accelerate electrons to 99.99% speed of light
slide-18
SLIDE 18

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How does it work?

  • Accelerate electrons to 99.99% speed of light
  • Force the electrons to travel in a circle
slide-19
SLIDE 19

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How does it work?

  • Accelerate electrons to 99.99% speed of light
  • Force the electrons to travel in a circle
  • When the electrons are forced to turn,

they release vast amounts of X-ray energy

slide-20
SLIDE 20

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How does it work?

  • Accelerate electrons to 99.99% speed of light
  • Force the electrons to travel in a circle
  • When the electrons are forced to turn,

they release vast amounts of X-ray energy

  • Filter this X-ray energy to make it parallel, a known energy
slide-21
SLIDE 21

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How does it work?

  • Accelerate electrons to 99.99% speed of light
  • Force the electrons to travel in a circle
  • When the electrons are forced to turn,

they release vast amounts of X-ray energy

  • Filter this X-ray energy to make it parallel, a known energy
  • Aim it at a sample, affect the sample (specifics later)
slide-22
SLIDE 22

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How does it work?

  • Accelerate electrons to 99.99% speed of light
  • Force the electrons to travel in a circle
  • When the electrons are forced to turn,

they release vast amounts of X-ray energy

  • Filter this X-ray energy to make it parallel, a known energy
  • Aim it at a sample, affect the sample (specifics later)
  • Detect an aspect of the sample.
slide-23
SLIDE 23

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Filtering the X-rays

Figure: Aus Synchrotron

slide-24
SLIDE 24

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

My Directorial Debut

A walk around the synchroton. . .

slide-25
SLIDE 25

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

How do X-rays interact with the sample?

Pick your power level, tickle the atoms in just the right way. . .

  • Absorption
  • Phase Contrast
  • Diffraction
  • Spectroscopy
  • Fluorescence
  • Tomography
  • Micro particle/void sizing
  • . . .
slide-26
SLIDE 26

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Absorption

Figure: Wikipedia

slide-27
SLIDE 27

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Phase Contrast - How?

Figure: Wikipedia

slide-28
SLIDE 28

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Phase Contrast - Example

Figure: Wikipedia

slide-29
SLIDE 29

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Diffraction - How ?

Figure: PhysicsOpenLab

slide-30
SLIDE 30

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Diffraction - Example

Figure: Wikipedia

slide-31
SLIDE 31

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Tomography - How ?

Figure: Wikipedia

slide-32
SLIDE 32

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Tomography - Example

Figure: Wikipedia

slide-33
SLIDE 33

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Why’s it so..big?

  • X-rays scatter in air, so a lot of the beams are run in vacuum. This makes

everything..difficult.

  • Accelerators use a lot of power, they need to be cooled with water to stop

them melting.

  • A lot of the filtering processes have to dump unwanted x-rays into blocks of

material, these blocks need cooling or they’ll melt.

  • The bigger the storage ring, the more x-ray beams can be produced, and the

more experiments can be conducted at the same time.

  • The medical beamline is far away so it can spread out and scan the entire

patient in one sweep.

  • Safety means things are cladded in thick concrete and lead.
slide-34
SLIDE 34

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

What’s it used for?

  • Medical imaging, diagnostics, cancer treatment
  • Microscopic samples, single cells
  • Cultural history
  • Stress and strain on materials
  • Battery technology
  • Chemical and biology structures
slide-35
SLIDE 35

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
slide-36
SLIDE 36

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
slide-37
SLIDE 37

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
  • Researchers book onsite accommodation
slide-38
SLIDE 38

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
  • Researchers book onsite accommodation
  • On arrival, researchers are allotted specific hours (day & night)
slide-39
SLIDE 39

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
  • Researchers book onsite accommodation
  • On arrival, researchers are allotted specific hours (day & night)
  • Researchers prepare and load their samples
slide-40
SLIDE 40

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
  • Researchers book onsite accommodation
  • On arrival, researchers are allotted specific hours (day & night)
  • Researchers prepare and load their samples
  • Researchers run their experiment
slide-41
SLIDE 41

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
  • Researchers book onsite accommodation
  • On arrival, researchers are allotted specific hours (day & night)
  • Researchers prepare and load their samples
  • Researchers run their experiment
  • Everything goes perfectly the first time, and no rerun is ever required
slide-42
SLIDE 42

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Typical Experiment Run

  • Months in advance, researchers submit experiment proposal
  • If accepted, planning commences with beamline staff
  • Researchers book onsite accommodation
  • On arrival, researchers are allotted specific hours (day & night)
  • Researchers prepare and load their samples
  • Researchers run their experiment
  • Everything goes perfectly the first time, and no rerun is ever required
  • Experimental data is available for download or local analysis via ASCI Desktop
slide-43
SLIDE 43

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Samples?

Pretty much anything that can fit:

  • Gas
  • Solid
  • Liquid

Samples can be put under different:

  • Pressures
  • Temperatures
  • Voltages
  • Radio waves
slide-44
SLIDE 44

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Sample Holders - Liquid

slide-45
SLIDE 45

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Sample Holders - Solid

slide-46
SLIDE 46

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

BR—GHT Project

  • Substantial funding from the Australian Government and Research Partners
  • Eight new beamlines with new features
  • Trying to build the hw & sw from similar components
  • get more consistency, improve all beamlines at once by sharing software
  • BR—GHT+ is trying to share the common systems improvements with the

current beamlines

  • We can learn off existing beamlines
slide-47
SLIDE 47

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

What users are we targeting?

  • First timers all the way to chief scientists
  • Sleep deprived
  • Remote and local
  • Standard procedure vs special sample environment
slide-48
SLIDE 48

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Data

  • With some of the current and new beamlines, too much data to transfer
  • Data must be left on site, we must provide analysis tools
  • These tools must be available remotely
slide-49
SLIDE 49

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Technology Stack

User Interface Orchestration Hardware Abstraction Device Drivers Hardware

slide-50
SLIDE 50

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Technology Stack

User Interface Orchestration Hardware Abstraction Device Drivers Hardware - Motors, Detectors, Sample Handlers

slide-51
SLIDE 51

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Technology Stack

User Interface Orchestration Hardware Abstraction Device Drivers - EPICS Hardware - Motors, Detectors, Sample Handlers

slide-52
SLIDE 52

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Technology Stack

User Interface Orchestration Hardware Abstraction - PyEpics, Ophyd Device Drivers - EPICS Hardware - Motors, Detectors, Sample Handlers

slide-53
SLIDE 53

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Technology Stack

User Interface Orchestration - Bluesky Hardware Abstraction - PyEpics, Ophyd Device Drivers - EPICS Hardware - Motors, Detectors, Sample Handlers

slide-54
SLIDE 54

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Technology Stack

User Interface - Web, Jypiter Orchestration - Bluesky Hardware Abstraction - PyEpics, Ophyd Device Drivers - EPICS Hardware - Motors, Detectors, Sample Handlers

slide-55
SLIDE 55

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Device Drivers - EPICS

  • Open Source C library
  • ANSTO hosted a world wide conference of users recently
  • Exposes hardware devices on a network bus
  • Defines a wide variety of records
  • Analogue in/out
  • Binary in/out
  • Calculations
  • Motors
  • Sensors
  • Custom
slide-56
SLIDE 56

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Hardware Abstraction - PyEpics

  • Open Source C/Python library
  • provides a Python interface to EPICS network records
slide-57
SLIDE 57

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Hardware Abstraction - Ophyd

Ophyd:

  • Open Source Python library
  • uses PyEpics to talk to EPICS devices
  • encapsulates low level device quirks
  • provides a high level API for all devices:
  • trigger() for ‘do your thing’, whatever that is
  • read() for getting data from a device
  • describe() for getting metadata about read() results, e.g. units
  • stage() and unstage() for get ready and stand down
  • configure(), read_configuration() and describe_configuration()
  • Allows individual devices to be organised into hierarchies:
  • one 3D position motor instead of three X, Y, Z motors
  • gross and precision motors controlled as one positional motor
slide-58
SLIDE 58

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Orchestration - Bluesky

  • Open Source Python library
  • Orchestrates a collection of Ophyd devices via a Plan
  • Can handle any sort of data type
  • Automates experiments, while allowing human oversight
slide-59
SLIDE 59

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Bluesky - Plans

  • Plans are a sequence of steps on Ophyd devices
  • Plans can move motors, open shutters, trigger sensors etc.
  • All these things take time, hence Bluesky is asynchronous
  • Plans can be built up with other plans
  • Handles interruptions well
  • Each step adds data and metadata to the experiment document
slide-60
SLIDE 60

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Bluesky - Plan - Example 1

Figure: NSL-II

slide-61
SLIDE 61

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Bluesky - Plan - Example 2

Figure: NSL-II

slide-62
SLIDE 62

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Bluesky - Plan - Example 3

Figure: NSL-II

slide-63
SLIDE 63

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

More about Me. . .

  • I am a CLI lover
slide-64
SLIDE 64

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

More about Me. . .

  • I am a CLI lover
  • I am NOT good at GUIs
slide-65
SLIDE 65

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

User Interface - Web, Jypiter

  • Excited about the prospect of tools like Pyodide, QT WebAssembly backend
  • If you’re not developing for the web (HTML/JS) or WebAssembly, you better

have funky hardware.

slide-66
SLIDE 66

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

This Page Intentionally left blank

Please hang around for the post credit scene

slide-67
SLIDE 67

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outcomes - Microbeam Radiation Therapy

Figure: ESRF Figure: ESRF

slide-68
SLIDE 68

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outcomes - Phase-Contrast Computed Tomography Mammography

slide-69
SLIDE 69

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outcomes - Malaria First Contact

slide-70
SLIDE 70

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outcomes - Degas’s Portrait of a Women

Figure: The Conversation Figure: The Conversation

slide-71
SLIDE 71

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outcomes - Red Bellied Parrot PCD Vaccine

Figure: ABC Australia

slide-72
SLIDE 72

Running an Open Source Synchrotron Clinton Roy Me Physics Synchrotron BR—GHT Software Outcomes

Outcomes - Micro nutrients in Grain

Figure: The Conversation, iron (red), copper (green), zinc (blue) Figure: The Conversation, potassium (red), calcium (green), manganese (blue)