OSGi services FOSS CV libraries Eclipse Rich Beans
OSGi services, FOSS CV libraries Eclipse Rich Beans for the analysis of nanoscale data Fajin Yuan & Baha El Kassaby
• Who are we? • Science ? Outline – Synchrotron – I 06 Nanoscience Beamline – An overview of Photo Emission Electron Microscopy • Circular Dichroism – Applications • Eclipse Application for Nano-scale science? – – – Peema perspective Eclipse projects used (Dawn. Sci, Rich. Beans) How we use OSGI for a scientific GUI experiment Boof. CV Computer Vision libraries Stitching use case
Who? • Baha El Kassaby: Software Engineer at Diamond for the last 4 years – Member of the Scientific Software team working on DAWN, and visualization and data components used by GDA/DAWN – Active committer on open source projects (DAWNSci, XYGraph, Rich Beans) • Fajin Yuan: Senior Data Acquisition Scientist at Diamond for the last 13 years – Member of the Data Acquisition team working on GDA – System Integration (motor, detector, data visualisation, management, etc) and UX – Science experiment modelling using EMF
• Who are we? • Science ? Outline – Synchrotron – I 06 Nanoscience Beamline – An overview of Photo Emission Electron Microscopy • Circular Dichroism – Applications • Eclipse Application for Nano-scale science? – – – Peema perspective Eclipse projects used (Dawn. Sci, Rich. Beans) How we use OSGI for a scientific GUI experiment Boof. CV Computer Vision libraries Stitching use case
Synchrotron syn·chro·tron/ˈsi. NGkrəˌträn/ Noun: A cyclotron in which the magnetic field strength increase with the energy of the particles to keep their orbital radius constant. (to generate synchrotron radiation : infra-red, X-Rays used in a variety of scientific experiments)
Synchrotron • 10 billion x brighter than the sun • Electrons generated in an electron gun • 0. 99 the speed of light • Linac, the booster synchrotron and the storage ring
Synchrotron • Wide variety of scientific experiments – – – – Chemistry Earth Science Engineering Environmental Science Life Sciences Physics & Materials Cultural heritage …
Beamline I 06: PEEM • PEEM / Photo-Emission Electron Microscopy – A Photoemission Electron Microscope (PEEM) forms an image from electrons emitted by a sample surface when it is illuminated by soft X-rays – By calculating the normalised difference of two X-ray magnetic circular dichroism (XMCD) PEEM images with opposite light polarizations, it is possible to probe the magnetic domain structure of the sample.
Dichroic imaging LEEM Device
XPEEM (X-ray Photomission Electron Microscope) X-rays e • Full field imaging of electrons emitted by the sample • Using polarised X-rays we can achieve the Contemporary ferroelectric (FE) and ferromagnetic (FM) domains imaging • XMCD -> FM • XLD -> FE Curtesy of I 06 Francesco Maccherozzi 10
Ferromagnetic and Ferroelectric imaging h XLD Ti-L 3 LH XMCD Fe-L 2, 3 fov 40 m § Contemporary imaging of the ferromagnetic domains of the Fe film and of the ferroelectric domains of the substrate Curtesy of I 06 Francesco Maccherozzi 11
Magnetization vectorial maps Xrays Curtesy of I 06 Francesco Maccherozzi
Applications • Understanding of the formation, composition, structure and properties of nanomaterials and magnetic nanostructures – Electronics – Information technologies • Nature and distribution of light elements in geological samples from different depths in the earth, soils and sediments containing organic matter, microbial and plant materials, and the interaction of such materials with the surfaces of minerals – Earth & environmental science
• Who are we? • Science ? Outline – Synchrotron – I 06 Nanoscience Beamline – An overview of Photo Emission Electron Microscopy • Circular Dichroism – Applications • Eclipse Application for Nano-scale science? – – – Peema perspective Eclipse projects used (Dawn. Sci, Rich. Beans) How we use OSGI for a scientific GUI experiment Other open-source and Computer Vision libraries Boof. CV Stitching use case
PEEMA perspective in DAWN
PEEMA perspective in DAWN
Software in Bundles • • • OSGi manages dependencies Static types but Dynamic executable Declarative Services Code more modular Cheaper to own/support large projects Developing bundles / features not products
1. Data Format / Math • • • IDataset ~numpy / ~MATLAB for Java • Project JANUARY (JAva NUmerical ARra. Y) Service that loads any data • Extension point available in the binary • Ne. Xus / HDF 5, CBF, Ascii, scores of others Part of DAWNSci Eclipse Project ILoader. Service service = … // OSGi File file = new File(…); IDataset d = service. get. Dataset(file, …)
2. Plotting with Tools • • IPlotting. System, IPlotting. Service • 1 D, 2 D, 3 D plotting Many visual tools Regions of Interest Python connectivity
Lots of Services • • • Conversion Operation Persistence Colour mapping Expression … Around 40 others
Eclipse Rich. Beans • Provide a set of widgets for scientific and numeric data which allow values to be entered and validated • Provide data binding to java beans and automatic generation of UI made up of the widget set • Edit beans with huge arrays of values and complex bean trees • Easy and simple to use API, efficient widgets for science and fast for huge field lists • Developed at Diamond Light Source both for user interface and for data analysis and acquisition servers
Eclipse Rich. Beans UI Bean Graph public class Example. Bean { private List<Example. Item> items; //… public class Example. Item { private String item. Name; private Item. Choice choice = Item. Choice. XY; private Double x, y; private double r, theta; private List<Option. Item> options; //… public class Option. Item { private String option. Name; private boolean show. Axes, show. Title, show. Legend, show. Data; private static int count = 0; //…
Eclipse Rich. Beans
Java Computer Vision library: Boof. CV • Boof. CV: “an open source Java library for real-time computer vision and robotics applications. ” – Image filters (Theshold, Gaussian Blur, Median, Mean, etc) – Image registration – Stitching (1 -detect and describe point features, 2 -associate features together, 3 robust fitting to find transform, 4 -render combined image)
Stitching process through OSGI • With an OSGI service: IImage. Stitching. Process // stitch with boofcv IImage. Stitching. Process service = Service. Loader. get. Stitching. Service(); List<IDataset> stitched. Image = service. stitch(data. To. Stitch, …, … ); <? xml version="1. 0" encoding="UTF-8"? > <scr: component xmlns: scr="http: //www. osgi. org/xmlns/scr/v 1. 1. 0" immediate="true" name="Peema Stitcher Injector"> <implementation class="uk. ac. diamond. scisoft. peema. rcp. Service. Loader" /> <reference bind="set. Image. Sticher" cardinality="1. . 1" interface="org. eclipse. dawnsci. analysis. api. image. IImage. Stitching. Process" name="IImage. Stitching. Process" policy="static"/> </scr: component>
Peema: stitching process
Demo
References & acknowledgments • DAWNSci, http: //www. dawnsci. org • Francesco Maccherozzi & I 06 team, http: //www. diamond. ac. uk/Beamlines/Surfaces-and. Interfaces/I 06. html • M. Gerring et al. , Open source contributions and using osgi bundles at Diamond Light Source, Proceedings of ICALEPCS 2015 • Eclipse Rich. Beans, https: //projects. eclipse. org/projects/technology. richbeans • Eclipse JANUARY, http: //kichwacoders. com/2016/01/26/introducing-projectjanuary/ • Peter Abeles, Boof. CV, http: //boofcv. org/ • Email us: scientificsoftware@diamond. ac. uk
Evaluate the Sessions Sign in and vote at eclipsecon. org -1 0 +1
- Slides: 30