OSGi services, FOSS CV libraries Eclipse Rich Beans for the analysis of nanoscale data Fajin Yuan & Baha El Kassaby
Outline Who are we? Science ? –Synchrotron –I06 Nanoscience Beamline –An overview of Photo Emission Electron Microscopy Circular Dichroism –Applications Eclipse Application for Nano-scale science? –Peema perspective –Eclipse projects used (DawnSci, RichBeans) –How we use OSGI for a scientific GUI experiment –BoofCV 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
Outline Who are we? Science ? –Synchrotron –I06 Nanoscience Beamline –An overview of Photo Emission Electron Microscopy Circular Dichroism –Applications Eclipse Application for Nano-scale science? –Peema perspective –Eclipse projects used (DawnSci, RichBeans) –How we use OSGI for a scientific GUI experiment –BoofCV Computer Vision libraries –Stitching use case
Synchrotron syn·chro·tron/ ˈ siNGkrə ˌ 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 I06: 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) 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 10 e- X- rays Curtesy of I06 Francesco Maccherozzi
Contemporary imaging of the ferromagnetic domains of the Fe film and of the ferroelectric domains of the substrate h fov 40 m 11 XMCD Fe-L 2,3 XLD Ti-L 3 LH Ferromagnetic and Ferroelectric imaging Curtesy of I06 Francesco Maccherozzi
X- rays Magnetization vectorial maps Curtesy of I06 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
Outline Who are we? Science ? –Synchrotron –I06 Nanoscience Beamline –An overview of Photo Emission Electron Microscopy Circular Dichroism –Applications Eclipse Application for Nano-scale science? –Peema perspective –Eclipse projects used (DawnSci, RichBeans) –How we use OSGI for a scientific GUI experiment –Other open-source and Computer Vision libraries –BoofCV –Stitching use case
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 ARraY) Service that loads any data Extension point available in the binary NeXus / HDF5, CBF, Ascii, scores of others Part of DAWNSci Eclipse Project ILoaderService service = … // OSGi File file = new File(…); IDataset d = service.getDataset(file, …)
2. Plotting with Tools IPlottingSystem, IPlottingService 1D, 2D, 3D plotting Many visual tools Regions of Interest Python connectivity
Lots of Services Conversion Operation Persistence Colour mapping Expression … Around 40 others
Eclipse RichBeans 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 RichBeans public class ExampleBean { private List items; //… public class ExampleItem { private String itemName; private ItemChoice choice = ItemChoice.XY; private Double x, y; private double r, theta; private List options; //… public class OptionItem { private String optionName; private boolean showAxes, showTitle, showLegend, showData; private static int count = 0; //… UIBean Graph
Eclipse RichBeans
Java Computer Vision library: BoofCV BoofCV: “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: IImageStitchingProcess // stitch with boofcv IImageStitchingProcess service = ServiceLoader.getStitchingService(); List stitchedImage = service.stitch(dataToStitch,…, … );
Peema: stitching process
Demo
DAWNSci, Francesco Maccherozzi & I06 team, Interfaces/I06.html Interfaces/I06.html M. Gerring et al., Open source contributions and using osgi bundles at Diamond Light Source, Proceedings of ICALEPCS2015 Eclipse RichBeans, Eclipse JANUARY, january/ january/ Peter Abeles, BoofCV, us: References & acknowledgments
Evaluate the Sessions Sign in and vote at eclipsecon.org