Software Developed at Brookhaven Lab Could Advance Synchrotron Science Worldwide
October 2, 2017
Thomas Caswell (left) and Dan Allan (right), two of Bluesky's creators.
Scientists at the U.S. Department of Energy’s (DOE) Brookhaven National Laboratory have developed new software to streamline data acquisition (DAQ) at the National Synchrotron Light Source II (NSLS-II), a DOE Office of Science User Facility. Called “Bluesky,” the software significantly eases the process of collecting and comparing data at NSLS-II, and could be used to facilitate scientific collaboration between light sources worldwide.
NSLS-II is one of the most advanced synchrotrons in the nation, and as the facility continues to expand, researchers need dynamic DAQ software to effectively capture and process the large volume and variety of data their experiments produce. Typically at synchrotrons, each beamline (experimental station) uses DAQ software that was developed specifically for that beamline. These beamline-specific types of software are often incompatible with each other, making it difficult for scientists to compare data from different beamlines, as well as other light sources. That’s why Brookhaven’s Data Acquisition, Management and Analysis (DAMA) group developed Bluesky.
“We wanted to make software that is designed the way scientists think when they are doing an experiment,” said Dan Allan, a member of DAMA. “Bluesky is a language for expressing the steps in a science experiment.”
From left to right: (Back row) Thomas Caswell, Richard Farnsworth, Arman Arkilic; (Front Row) Yong-Nian Tang, Dan Allan, Stuart Campbell, Li Li
Allan, alongside DAMA member Thomas Caswell, conceptualized Bluesky as the top “layer” of an existing DAQ system. At the bottom layer is the beamline’s equipment, which works with vendor-supplied software to write electrons onto a disc. The next layer is the Experimental Physics and Industrial Control Software (EPICS).
“Up to a point, EPICS makes all devices look the same. You can speak a common language to EPICS in the same way you can speak a common language to different websites. It’s the equivalent of the ‘http’ in a web address, but for hardware control,” Allan said. “We’re trying to build a layer up from that.”
Bluesky stands on the shoulders of EPICS, and provides additional capabilities such as live visualization and data processing tools, and can export data into nearly any file format in real time. Bluesky was developed using “Python,” a common programming language that will make Bluesky simple for future scientists to modify, and to implement at new beamlines and light sources.
Scientists at NSLS-II are already using Bluesky at the majority of the facility’s beamlines. In particular, Bluesky has benefitted researchers by minimizing the amount of steps involved with DAQ and operating in-line with their experimental protocol.
Bluesky is the cruise control for a scientific experiment
— Richard Farnsworth, controls program manager at NSLS-II
“Bluesky is the cruise control for a scientific experiment,” said Richard Farnsworth, the controls program manager at NSLS-II. “Its modular design incorporates a hardware abstraction library called Ophyd and a package for databases called Data Broker, both of which can also be used independently.”
A version of Bluesky has been operating at NSLS-II since 2015, and ever since, the software has continued to develop smoothly and successfully as DAMA adds new features and upgrades.
“I think one of the key things that made us successful is that our team wasn’t assigned to one beamline,” Caswell said. “If you’re working on one beamline, it’s very easy to build something tuned to that beamline, and if you ever try to apply it to another, you suddenly discover all sorts of design decisions that were driven by the original beamline. Being facility-wide from the start of our project has been a great advantage.”
Another important aspect of Bluesky’s success is the fact that it was built for scientists, by scientists.
“A lot of the beamline scientists don’t see this as the typical customer-client relationship,” said Stuart Campbell, the group leader for DAMA. “They see Bluesky as a collaborative project.”
As DAMA continues to improve upon Bluesky, the team gives scientists at NSLS-II the opportunity to influence how the software is developed. DAMA tests Bluesky directly on NSLS-II beamlines, and discusses the software with scientists on the experimental floor as they work.
“I also think it’s very important that Dan and I both have physics PhDs, because that gives us a common language to communicate with the beamline staff,” Caswell said.
Caswell and Allan first met while they were pursuing their graduate degrees in physics. Through an open source project on the internet, they discovered they each had the missing half to the other’s thesis. Combined, their work formed a project that is still used by research groups around the world, and illustrated the value of building software collaboratively and in the open, as DAMA has done with Bluesky.
“We were solving the same problem from opposite ends, and I happened to find his project on the internet when we had just about met in the middle,” Allan said. “We both felt satisfaction in creating a tool that we imagined scientists might someday use.”
Bluesky will be an ongoing project for Campbell, Caswell, Allan, and the rest of the DAMA group, but the software is already being tested at other light sources, including two other DOE Office of Science User Facilities: the Advanced Photon Source at DOE’s Argonne National Laboratory and the Linac Coherent Light Source at DOE’s SLAC National Accelerator Laboratory. DAMA’s goal is to share Bluesky as an open source project with light sources around the world and, gradually, build new layers on top of Bluesky for even more enhanced data visualization and analysis.
Brookhaven National Laboratory is supported by the Office of Science of the U.S. Department of Energy. The Office of Science is the single largest supporter of basic research in the physical sciences in the United States, and is working to address some of the most pressing challenges of our time. For more information, please visit science.energy.gov.
Follow @BrookhavenLab on Twitter or find us on Facebook.
2017-12470 | INT/EXT | Newsroom