AreaDetector: A module for EPICS area detector support New developments Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.

Slides:



Advertisements
Similar presentations
Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
Advertisements

EPICS V4/areaDetector Integration
AreaDetector: What’s New? Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
AreaDetector for ADCs How to deal with 1D data Tom Cobb.
areaDetector Developments
AreaDetector Data Processing Pipeline In EPICS V4 Dave Hickin Diamond Light Source EPICS Collaboration Meeting Diamond Light Source 01/05/2013.
McIDAS-V McIDAS-V The 5 th Generation of McIDAS by Tom Whittaker Space Science and Engineering Center University of Wisconsin-Madison USA with contributions.
JCA 2.0 Eric. Boucher – APS EPICS Collaboration Meeting - June 18-20, 2003.
EPICS at APS Beamlines Tim Mooney Advanced Photon Source Argonne National Laboratory.
Connecting AreaDetector to GDA John Hammonds Software Services Group Advanced Photon Source The submitted manuscript has been created by UChicago Argonne,
ImageJ Tutorial.
AreaDetector and GStreamer Similarities and Differences Tom Cobb.
Digital Video An Introduction to the Digital Signal File Formats Acquisition IEEE 1394.
1 The SpaceWire Internet Tunnel and the Advantages It Provides For Spacecraft Integration Stuart Mills, Steve Parkes Space Technology Centre University.
Development of EPICS Embedded Image Processing System Takashi Obina, Jun-ichi Odagiri, Ryota Takai KEK, Accelerator Laboratory.
A Streaming Video Server for areaDetector Tom Cobb Presented by Nick Rees.
AreaDetector: Recent Additions and Future Plans Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
[1] Reference: QCam API reference manual document version Charge Coupled Device (CCD)
Feb. 19, 2008 CU-NEES 2008 FHT Workshop Network Infrastructure; Real time viewer; Telepresence; Data Management Kent Polkinghorne Information Technology.
History Server & API Christopher Larrieu Jefferson Laboratory.
1 High level view of HDF5 Data structures and library HDF Summit Boeing Seattle September 19, 2006.
4,000 Spectra or 4,000,000 ROIs per Second: EPICS Support for High-Speed Digital X-ray Spectroscopy with the XIA xMap Mark Rivers GeoSoilEnviroCARS, Advanced.
Cthru Technical Brief Gary Morris Center of Higher Learning Stennis Space Center.
J. Hill. Overview  Introduction  LANSCE Requirements  EPICS Event Queue  Event Queue Upgrade  Milestones.
AreaDetector: A module for EPICS area detector support Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
AreaDetector: A module for EPICS area detector support Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
EPICS Developments at the Australian Synchrotron DSP EPICS driver for the General Standards 16AIO analog card EPICS driver for the Galil range of motor.
Conversion to EPICS R3.14 Mark Rivers. New capabilities Progress in converting synApps/GSECARS Outstanding issues Work to be done Outline.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
A Comparative Study of the Linux and Windows Device Driver Architectures with a focus on IEEE1394 (high speed serial bus) drivers Melekam Tsegaye
By Abhishek Singh Rajhesh Babu, Bangalore Revanna And Joel Solomon, Bula.
Materials Science and Protein Crystallography Using the MX Beamline Control Toolkit William M. Lavender
AreaDetector: A new module for EPICS area detector support Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
1/15 G. Manduchi EPICS Collaboration Meeting, Aix-en-Provence, Spring 2010 INTEGRATION OF EPICS AND MDSplus G. Manduchi, A. Luchetta, C. Taliercio, R.
How to Operate Prosilica GC1380H CCD? Power up & connect Prosilica to PC via Ethernet cable (Cat 5e or better); Use the secondary Ethernet card labeled.
An introduction to areaDetector Tom Cobb. What is areaDetector?  C++ framework for detectors in EPICS  Drivers produces NDArrays of data  Plugins consume.
Technical Presentation
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
Petra III Status Teresa Núñez Hasylab-DESY Tango Meeting DESY,
AreaDetector workshop Summary and notes…. Overview iocBuilder File Writer Changes areaDetector driver pattern shared vector Asyn client without an IOC.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
High Speed Detectors at Diamond Nick Rees. A few words about HDF5 PSI and Dectris held a workshop in May 2012 which identified issues with HDF5: –HDF5.
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
Ulead Video Studio is an easy to use video editing software that allows even the novice of movie makers to produce a professional project complete with.
Motor drivers for asyn motor device support Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
Motion Detection and Processing Performance Analysis Thomas Eggers, Mark Rosenberg Department of Electrical and Systems Engineering Abstract Histograms.
B. Dalesio, N. Arnold, M. Kraimer, E. Norum, A. Johnson EPICS Collaboration Meeting December 8-10, 2004 Roadmap for IOC.
EPICS and LabVIEW Tony Vento, National Instruments
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Motion Control at the Advanced Photon Source Argonne National Laboratory Mark Rivers University of Chicago 7 GeV synchrotron x-ray light source, the largest.
January 2010 – GEO-ISC KickOff meeting Christian Gräf, AEI 10 m Prototype Team State-of-the-art digital control: Introducing LIGO CDS.
Software tools for digital LLRF system integration at CERN 04/11/2015 LLRF15, Software tools2 Andy Butterworth Tom Levens, Andrey Pashnin, Anthony Rey.
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Version 4 – Normative V4 Team – presented by Bob Dalesio EPICS Meeting October 7, 2011.
AreaDetector: What’s New? Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
ORNL is managed by UT-Battelle for the US Department of Energy ADnED Handling V4 Neutron Event Data Matt Pearson SNS ORNL 18 th -22 nd May 2015.
Tango Integration of Modern 2D Detectors
areaDetector: Recent Developments and Future Ideas
Mark Rivers University of Chicago
EPICS MCA and Canberra Support
EPICS areaDetector Architecture
asyn Driver Tutorial Measurement Computing 1608GX-2A0
Advanced Photon Source
areaDetector: A module for EPICS area detector support
Advanced Photon Source
What’s New and What’s Next
areaDetector: What’s New? Mark Rivers, Univ. of Chicago
quadEM: New Beam Position Monitor & Electrometer Hardware and Software
GeoSoilEnviroCARS The University of Chicago
Presentation transcript:

areaDetector: A module for EPICS area detector support New developments Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago

Motivation & goals for areaDetector module Overview of architecture Drivers for detectors & cameras Plugins for real-time processing Viewers and other clients What’s new in R1-6 areaDetector Talk Outline

areaDetector - Implementation Drivers for many detectors popular at synchrotron beamlines –Handle detectors ranging from >500 frames/second to <1 frame/second Basic parameters for all detectors –E.g. exposure time, start acquisition, etc. –Allows generic clients to be used for many applications Easy to implement new detector –Single device-driver C++ file to write. EPICS independent. Easy to implement detector-specific features –Driver understands additional parameters beyond those in the basic set EPICS-independent at lower layers –Soleil is investigating using lower layers under Tango Middle-level plug-ins to add capability like regions-of-interest calculation, file saving, etc. –Device independent, work with all drivers –Below the EPICS layer for highest performance

NDArray –N-Dimensional array. Everything is done in N-dimensions (up to 10), rather than 2. This is needed even for 2-D detectors to support color. –This is what plug-ins callbacks receive from device drivers. NDAttribute –Each NDArray has a list of associated attributes (metadata) that travel with the array through the processing pileline. Attributes can come from driver parameters or any EPICS PV; e.g. can store motor positions, temperature, ring current, etc. with each frame. NDArrayPool –Allocates NDArray objects from a freelist –Plugins access in readonly mode, increment reference count –Eliminates need to copy data when sending it to callbacks. areaDetector – Data structures

ADBase.template Standard asyn device support (device-independent) Vendor API Driver Channel Access Clients (medm, IDL, ImageJ, SPEC, etc.) EPICS areaDetector Architecture xxxDriver.template Hardware C++ Base classes (NDArray, asynPortDriver, asynNDArrayDriver, ADDriver, NDPluginDriver) Layer 5 Standard EPICS records Layer 4 EPICS device support Layer 3 Plug-ins Layer 1 Hardware API Layer 2 Device drivers Layer 6 EPICS CA clients StdArrays File ( netCDF, TIFF, JPEG, HDF) NDPluginXXX. template Channel access Record/device support asynInt32, Float64, Octet asynGenericPointer (NDArray) asynXXXArray C library calls NDPluginBase.template ROIColorConvert

Detector drivers ADDriver –Base C++ class from which detector drivers derive. Handles details of EPICS interfaces, and other common functions. Simulation driver –Produces calculated images up to very high rates. Implements nearly all basic parameters, including color. Useful as a model for real detector drivers, and to test plugins and clients. Prosilica driver –Gigabit Ethernet cameras, mono and color –High resolution, high speed, e.g. 1360x1024 at 30 frames/second = 40MB/second. Firewire (IEEE-1396 DCAM) –Vendor-independent Firewire camera drivers for Linux and Windows Roper driver –Princeton Instruments and Photometrics cameras controlled via WinView

Detector drivers (continued) PVCAM driver –Princeton Instruments and Photometrics cameras controlled via PVCAM library Pilatus driver –Pilatus pixel-array detectors. marCCD driver –Rayonix (MAR-USA) CCD x-ray detectors ADSC driver –ADSC CCD detectors mar345 driver –marResearch mar345 online image plate Perkin-Elmer driver –Perkin-Elmer amorphous silicon detectors

Plugins Designed to perform real-time processing of data, running in the EPICS IOC (not over EPICS Channel Access) Receive NDArray data over callbacks from drivers or other plugins Plug-ins can execute in their own threads (non-blocking) or in callback thread (blocking) –If non-blocking then NDArray data is queued Can drop images if queue is full –If executing in callback thread, no queuing, but slows device driver Allows –Enabling/disabling –Throttling rate (no more than 0.5 seconds, etc) –Changing data source for NDArray callbacks to another driver or plugin Some plugins are also sources of NDArray callbacks, as well as consumers. –Allows creating a data processing pipeline running at very high speed, each in a difference thread, and hence in multiple cores on modern CPUs.

Plugins (continued) NDPlugInStdArrays –Receives arrays (images) from device drivers, converts to standard arrays, e.g. waveform records. –This plugin is what EPICS channel access viewers normally talk to. NDPluginROI –Performs region-of-interest calculations –Select a subregion. Optionally bin, reverse in either direction, convert data type. –R1-6 Previously the ROI plugin supported multiple ROIs, performed statistics calculations, and highlighted the ROIs. New version is much simpler; it supports only a single ROI, and does not calculate statistics or do highlighting. Those functions have been moved to new plugins. One new function has been added, the ability to divide the array by a scale factor, which is useful for avoiding overflow when binning. NDPluginColorConvert –Convert from one color model to another (Bayer, RGB pixel, row or planar interleave) –R1-6 Added conversions from mono to RGB1, RGB2, and RGB3, and from RGB1, RGB2, and RGB3 to mono. Previously this plugin only built on Linux and WIN32. Now it builds and does all conversions except Bayer on all architectures. Bayer conversion is restricted to Linux and WIN32. NDPluginMJPEG –MJPEG server that allows viewing images in a Web browser.

New NDPluginStats plugin –Calculates statistics on an array –Replaces the statistics calculations that were previously performed in the ROI plugin. –Adds new statistics, including the centroid position and width. –Computes X and Y profiles, including average profiles, profiles at the centroid position, and profiles at a user-defined cursor position. New NDPluginProcess plugin –Does arithmetic processing on arrays –Background subtraction. –Flat field normalization. –Offset and scale. –Low and high clipping. –Recursive filtering in the time domain. –Conversion to a different output data type. New NDPluginOverlay plugin –Adds graphic overlays to an image. –Replaces the "Highligh ROIs" function that was previously provided in the ROI plugin. –Much more general, and can be used to display not only ROIs, but multiple cursors, user-defined boxes, etc. Plugins (R1-6)

ROI plugin

Statistics plugin

Overlay plugin Centroid of laser pointer calculated by statistics plugin Cursor overlay X, Y position linked to centroid

Processing plugin

Processing plugin 30 microsec exposure time No filteringN=100 recursive average filter

Plugins: NDPluginFile Saves NDArrays to disk 3 modes: –Single array per disk file –Capture N arrays in memory, write to disk either multiple files or as a single large file (for file formats that support this.) –Stream arrays to a single large disk file File formats currently supported –TIFF –JPEG (with compression control) –netCDF (popular self-describing binary format, supported by Unidata at UCAR) –NeXus (standard file format for neutron and x-ray communities, based on HDF, which is another popular self-describing binary format, richer than netCDF). In addition to file saving plugins, many vendor libraries also support saving files (e.g. marCCD, mar345, Pilatus, etc.) and this is supported at the driver level. File saving plugin can be used instead of or in addition to vendor file saving –Can add additional metadata vendor does not support –Could write JPEGS for Web display every minute, etc.

NDPluginFile display Example: streaming 80 frames/second of 640x480 video to netCDF file, no dropped frames.

Viewers areaDetector allows generic viewers to be written that receive images as EPICS waveform records over Channel Access Current viewers include: –ImageJ plugin EPICS_AD_Display. ImageJ is a very popular image analysis program, written in Java, derived from NIH Image. –IDL EPICS_AD_Display. –IDL areaVision (Stephen Mudie from AS) –MJPEG server allows image display in any Web browser

ImageJ Viewer

Architecture works well, easily extended to new detector drivers, new plugins and new clients Base classes, asynPortDriver, asynNDArrayDriver, asynPluginDriver actually are generic, nothing “areaDetector” specific about them. They can be used to implement any N-dimension detector, e.g. the XIA xMAP (16 detectors x 2048 channels x 512 points in a scan line) Can get released source code and pre-built binaries (Linux, Windows, Cygwin) from our Web site: – Can also get code on APS BCDA SVN repository – Conclusions

Brian Tieman (APS) Roper PVCAM driver John Hammonds (APS) Perkin-Elmer driver and NeXus file saving plugin Tim Madden (APS) initial version of ImageJ viewer Stephen Mudie (Australian Synchrotron) areaViewer IDL- based viewer Ulrik Pedersen and Tom Cobb (Diamond) MJPEG plugin, Linux Firewire driver Lewis Muir (U Chicago) ADSC CCD driver NSF-EAR and DOE-Geosciences for support of GSECARS where most of this work was done Thanks for your attention!!! Acknowledgments