The PyMca Application and Toolkit V.A. Solé - European Synchrotron Radiation Facility 2009 Python for Scientific Computing Conference

Similar documents
Final Project Report (NHL Cumulative Game by Game Visualization) Patrick Wong April 24, Motivation & Audience for Visualization

MATRIX-MG Series. Innovation with Integrity. Automated High-Performance Gas Analyzers FT-IR

Introduction to topological data analysis

FACE DETECTION. Lab on Project Based Learning May Xin Huang, Mark Ison, Daniel Martínez Visual Perception

Diver Training Options

Information Technology for Monitoring of Municipal Gas Consumption, Based on Additive Model and Correlated for Weather Factors

Ocean Wave Forecasting

Predicting Horse Racing Results with Machine Learning

Central scientific research automobile and automotive engine institute

Antech Lab Requisition System. Antech Setup From the Main Vetware Menu Tools Antech Processes Antech Setup To display the following screen

P3000 Deadweight Tester Setup, Part 1: Limited Partial Correction Method

Xactix XeF2 OPERATION MANUAL

FLUORESCENCE DETERMINATION OF OXYGEN

SS32L Dissolved O 2 Probe

UNIVERSITY OF EDINBURGH GENERIC RISK ASSESSMENT - RADIATION RP/RA8 - WORK WITH X-RAY FLUORESCENCE ANALYSERS

UNIVERSITY OF WATERLOO

Tutorial for the. Total Vertical Uncertainty Analysis Tool in NaviModel3

ACCURATE PRESSURE MEASUREMENT FOR STEAM TURBINE PERFORMANCE TESTING

Implementation on Analyzing the Bubble Flows in Microchannels using Image Processing

LINEAR TRANSFORMATION APPLIED TO THE CALIBRATION OF ANALYTES IN VARIOUS MATRICES USING A TOTAL HYDROCARBON (THC) ANALYZER

FIG: 27.1 Tool String

In addition to reading this assignment, also read Appendices A and B.

#19 MONITORING AND PREDICTING PEDESTRIAN BEHAVIOR USING TRAFFIC CAMERAS

Laboratory 2(a): Interfacing WiiMote. Authors: Jeff C. Jensen (National Instruments) Trung N. Tran (National Instruments)

DATA SCIENCE SUMMER UNI VIENNA

Depth Conversion with ISMap

Neural Networks II. Chen Gao. Virginia Tech Spring 2019 ECE-5424G / CS-5824

BEST KNOWN METHODS. Transpector XPR3 Gas Analysis System. 1 of 6 DESCRIPTION XPR3 APPLICATIONS PHYSICAL INSTALLATION

Activity P07: Acceleration of a Cart (Acceleration Sensor, Motion Sensor)

SIDRA INTERSECTION 6.1 UPDATE HISTORY

Mac Software Manual for FITstep Pro Version 2

Shot-by-shot directional source deghosting and directional designature using near-gun measurements

Purpose and Scope: Responsibilities: Warnings and precautions: Background Beers law

Advanced PMA Capabilities for MCM

Agile project management with scrum

Cricket umpire assistance and ball tracking system using a single smartphone camera

BVIS Beach Volleyball Information System

WMS 8.4 Tutorial Hydraulics and Floodplain Modeling HY-8 Modeling Wizard Learn how to model a culvert using HY-8 and WMS

Quadruple mass spectrometers (transducer type)

HASTAC High stability Altimeter SysTem for Air data Computers

The rate versus time can then be the subject of whatever calculation the user chooses, for example:

Figure 2: Principle of GPVS and ILIDS.

FOURIER TRANSFORM INFRARED SPECTROSCOPY

Non-Motorized Transport (NMT) Development. Gerald Ollivier Transport Cluster Leader Transport Global Practice The World Bank

Recording established using the VO2 and RER graph template file (h19.gtl)

Falmouth and St.Austell pspa bird bycatch analysis report year

Retention Time Locking: Concepts and Applications. Application

We release Mascot Server 2.6 at the end of last year. There have been a number of changes and improvements in the search engine and reports.

The FLUX-METER: implementation of a portable integrated instrumentation for the measurement of CO 2 and CH 4 diffuse flux from landfill soil cover.

Module 3 Developing Timing Plans for Efficient Intersection Operations During Moderate Traffic Volume Conditions

ISO INTERNATIONAL STANDARD

Shimming with VnmrJ 3.1 Software for Peak NMR Performance

Acoustic Focusing in Shallow Water and Bubble Radiation Effects

SM8200. SO2/NO In Situ Multi-Gas Analyzer

CONTROL VALVE TESTING

HMS/SHMS Drift Chambers Calibration. Carlos Yero June 26, 2017

A HYBRID METHOD FOR CALIBRATION OF UNKNOWN PARTIALLY/FULLY CLOSED VALVES IN WATER DISTRIBUTION SYSTEMS ABSTRACT

KISSsoft 03/2016 Tutorial 9

Tokyo: Simulating Hyperpath-Based Vehicle Navigations and its Impact on Travel Time Reliability

sorting solutions osx separator series

Engineering Note. Algorithms. Overview. Detailed Algorithm Description. NeoFox Calibration and Measurement. Products Affected: NeoFox

Case Study. PayPal s Sparkline Case Study. About Sparkline

7 th International Conference on Wind Turbine Noise Rotterdam 2 nd to 5 th May 2017

VALVE CRITICALITY MODELING

MEETPLANNER DESIGN DOCUMENT IDENTIFICATION OVERVIEW. Project Name: MeetPlanner. Project Manager: Peter Grabowski

Dräger X-dock Frequently Asked Questions

Diver-Office. Getting Started Guide. 2007, Schlumberger Water Services

Players Movements and Team Shooting Performance: a Data Mining approach for Basketball.

Provider ICD 10 Compliant Release A S K E S I S W E B I N A R F E B R U A R Y 1 9,

Adaptation of Formation According to Opponent Analysis

The HumiPyc - Model 1 - Gas Pycnometer; Density, Moisture, Permeation Analyzer; RH sensor Calibrator

Smart-Walk: An Intelligent Physiological Monitoring System for Smart Families

Application of Dijkstra s Algorithm in the Evacuation System Utilizing Exit Signs

Spatio-temporal analysis of team sports Joachim Gudmundsson

IDENTIFICATION OF WIND SEA AND SWELL EVENTS AND SWELL EVENTS PARAMETERIZATION OFF WEST AFRICA. K. Agbéko KPOGO-NUWOKLO

Effects of Bulb Degradation on Fly Attraction to Insect Light Traps

NEED FOR SUPPLEMENTAL BATHYMETRIC SURVEY DATA COLLECTION

SoundCast Design Intro

PBR MODEL GOVERNANCE CHECKLIST: Some Considerations for Practicing Actuaries

The HumiPyc ( Model 2) - Gas Pycnometer; Density, Moisture, Permeation Analyzer; Filter Integrity Tester; RH sensor Calibrator

SEISMIC CHARACTERIZATION OF THE NOVEMBER 8, 10, AND 11, 1999 DEAD SEA UNDERWATER CHEMICAL CALIBRATION EXPLOSIONS USING CEPSTRAL MODELING AND INVERSION

Statewide Cycloplan: Bicycle Planning Tool & Participatory GIS

Gas System Status Report

Specifications for the CMI 2409 Magnetocardiograph

Diagnosis of Fuel Evaporative System

USE OF THE EXCEEDANCE CURVE APPROACH IN OCCUPIED BUILDING RISK ASSESSMENT

Using MATLAB with CANoe

Lab 4: Pressure Gradients over a Wing

AIR-X COMPACT AIR-X ON-LINE LUBRICANT AERATION MEASUREMENT. Technical Brochure ON RUNNING ENGINES

GA-300 Gas Analyzer. Technical Note. Overview. Front Panel. iworx Systems, Inc. GA-300

Pressure Vessel Calculation for Yavin Thruster

Modal Analysis of Propulsion Shafting of a 48,000 tons Bulk Carrier

The ICC Duckworth-Lewis-Stern calculator. DLS Edition 2016

SOP: Buck Scientific BLC-20P HPLC Operation

ADDENDUM IMPORTANT DOCUMENT INVITATION TO BID ADDENDUM. OPENING DATE & TIME: January 3, 2018 at 3:00PM

Modeling of Hydraulic Hose Paths

ICD-10-CM IN VERSION 10

29th Monitoring Research Review: Ground-Based Nuclear Explosion Monitoring Technologies

World Leading Traffic Analysis

Aalborg Universitet. Publication date: Document Version Accepted author manuscript, peer reviewed version

Transcription:

The PyMca Application and Toolkit V.A. Solé - European Synchrotron Radiation Facility 2009 Python for Scientific Computing Conference Slide: 1

The ESRF: Just an X-Ray Source Slide: 2

(Partial) Synchrotron Chart Slide: 3

X-Ray Fluorescence Basics Energy of emitted X rays is element dependent Slide: 4

Visualization via Multi-Channel Analyzers (MCA) Slide: 5

PyMca? PyMca is set of software tools on its way to become a reference in XRF For the end users and the specific developers Set of programs and widgets for XRF analysis Spectrum modeling Quantification ROI imaging Fit imaging via batch processing For the general developer Set of python modules Data visualization Peak search Function fitting Imaging of 1D data V.A. Solé, E. Papillon, M. Cotte, Ph. Walter, J. Susini, Spectrochimica Acta B 62 (2007) 63-68 Slide: 6

Generalities - First release in 2004 - Source code SVN repository available at sourceforge since 2006 - Official releases aim to provide ready-to-use binaries to end users - External dependencies on numpy, PyQt4 and PyQwt5 - If installed, Matplotlib is used to generate high quality output - Provides high level functional widgets that can be embedded in your own application Slide: 7

XRF Spectrum Analysis Typical procedure: 1. Calibration 2. Peak identification 3. Peak area extraction Region of interest (ROI) Deconvolution (FIT) 4. Quantification Documentation at http://pymca.sourceforge.net/documentation.html Slide: 8

1. Calibration Detailed documentation at http://pymca.sourceforge.net/documentation.html Slide: 9

2. Identification Theoretical database in ASCII format IUPAC notation whenever possible PyMca proposes, the user decides Slide: 10

3.1 Peak area via ROI Slide: 11

3.2 Peak area via fitting Slide: 12

3.2 Peak area via fitting Slide: 13

Fit configuration Dialog (I) Slide: 14

Fit Configuration Dialog (II) Slide: 15

Emission Lines Allowed transitions Implemented transitions Any transition defined KShellRates.dat LShellRates.dat MShellRates.dat Slide: 16

4. Quantification (I) Parallel beam approximation Slide: 17

4. Quantification (II) Nominal concentration 500 ppm Slide: 18

XRF Analysis Integration in other Applications Integration in mxcube (ESRF) Integration elsewhere Slide: 19

Is it easy to embed? For the previous examples, basically one just needs 4 lines of code: from PyMca import McaAdvancedFit fitwindow = McaAdvancedFit.McaAdvancedFit() fitwindow.setdata(x, y) fitwindow.show() It can be used from ipython just starting it as ipython q4thread Slide: 20

Advanced Fit Batch processing Select the input files Select the fit configuration Select the output directory Select the output options Start Slide: 21

Output Images in ASCII and ESRF format Easy to import in other programs Individual peak contributions in ASCII Use your own plotting program Fully automated HTML report Browse your results! Slide: 22

XRF Imaging One spectrum for each pixel + A sum spectrum for the whole image Slide: 23

Pb Ca S Sb We wanted to know what pigments were used in this section of the painting Copyright C2RMF Slide: 24

Based on the batch generated element distribution maps Slide: 25

and their correlations as shown by the program Sulfur and antimony correlated Lead and antimony not correlated we were able to determine the possible presence of stibnite grains (Sb 2 S 3 ) embedded in a lead containing matrix. M. Cotte, E. Welcomme, V.A. Solé, M. Salomé, M. Menu, Ph. Walter, J. Susini, Anal. Chem. 79 (2007) 6988-6994 Slide: 26

Generic Fitting Module Levenberg-Marquardt algorithm with constraints on fitting parameters It accepts user defined functions The simplest form of user function: Slide: 27

Automatic Peak Search Routines Slide: 28

1D Stack ROI Imaging In this example: Stack = 101x200x2000 numpy array 20200 spectra of 2000 channels Pixel[i, j] = numpy.sum(stack[i, j, :]) Pixel[i, j] = numpy.sum(stack[i, j, ch0:ch1]) Slide: 29

1D Stack ROI Imaging We can generate new images by moving the cursors or defining new ROIs in the table Slide: 30

Imaging and Principal Component Analysis Subtract the average spectrum from each spectrum of the dataset and arrange it as NpixelsxNchannels Calculate the covariance = Data.T * Data Get the eigenvectors of the covariance Add the average spectrum to each row and get the projections of that dataset on each eigenvector (Npixels scalars for each eigenvector) Reshape the projections in the original map shape to obtain the Eigenimages Covariance method, other ways in http:// en.wikipedia.org/wiki/principal_components_analysis Slide: 31

Eigenimages and Eigenvectors Slide: 32

Eigenimages and Eigenvectors Slide: 33

Eigenimages and Eigenvectors Slide: 34

Eigenimages and Eigenvectors Slide: 35

Eigenimages and Eigenvectors Slide: 36

Eigenimages and Eigenvectors Slide: 37

Getting the actual information We can select a set of pixels on any of the displayed images and display the cumulative spectrum associated to those pixels. Here we can see the average spectrum associated to the hotter pixels of the Eigenimage 02 (in red) compared to the average spectrum of the map (in black). Slide: 38

We could have easily missed the presence of one element if we would have just analyzed the sum spectrum via ROIs. Slide: 39

What have we done? We have used principal components analysis to know what sample regions were worth to take a closer look. Not bad when you have a lot of data This data treatment is totally generic and applicable to other methods of analysis Slide: 40

Current Developments HDF5 Support - Collaboration with D. Dale from Cornell High Energy Synchrotron Source (CHESS) - HDF5 expected to become the file format of most European synchrotrons sources - Additional dependency on h5py http://h5py.alfven.org - Partial support already available in current SVN sources Slide: 41

Current Developments 3D and 4D -The goal is to provide ways to visualize and interact with multiparametric data -Already available at the ESRF through an additional PyMca set of modules -Currently evaluating the pros and cons of using MayaVi Slide: 42

Slide: 43

Slide: 44

Conclusion PyMca is a program as well as an XRF analysis toolkit - Open source and distributed under the conditions of the GPLv2+ - Can be used as a fitting and visualization tool (for up to 4-dimensional data) - Provides high level widgets based on PyQt that can be used independently or integrated into your application - Allows you to specify a physically meaningful model which can quantitatively determine element concentrations from energy dispersive X-ray spectra - Is implemented at many synchrotron facilities and labs around the world - Active development is funded by the ESRF Slide: 45

Acknowledgements My ESRF colleagues (mainly software group and microscopy beamlines ID21 and ID22) Ph. Walter and M. Cotte (Centre de Recherche et de Restauration des Musées de France) Darren Dale (Cornell High Energy Synchrotron Source) The PyMca users, for their enthusiasm and their encouragements Slide: 46