Software

WaveMe’s Evolution: Tools and Techniques for Peak Performance

WaveMe Toolbox: Enhancing Optical Metrology and Empowering Users

The WaveMe toolbox exemplifies several core principles that I hold in high regard: advancing optical metrology, getting the most from standard equipment, and offering users more control over their tools. A recent development further underlines our commitment to these principles. WaveMe is flexible as it allows users to integrate their software software knowledge into its pipeline. However, low-level programming in a language like C has its challenges and unfortunately, the Pylon library, needed to use the camera, prevents one of the most useful shortcuts to writing stable programs from being used. Therefore, for Linux users, WaveMe has the option to run the camera as an isolated server application, which returns the possibility of running the advanced tools to analyze programs that exist under Linux.

Diving Deeper: The Advantages of Isolating the Camera Interface

There are myriad advantages to separating the camera interface into its own application. Let’s unpack these:

  • Compatibility with ASAN Tools: The original camera library posed limitations, specifically, it hindered the use of address sanitizers. Given that WaveMe is not just a tool, but also a platform allowing users to augment its capabilities by integrating their custom tools, the necessity for ASAN tool accessibility is paramount.
  • The camera interface, especially with the GigE interface, is very time-critical. Trying to run WaveMe under a tool like Valgrind is simply impossible. When the camera interface runs in an isolated server application, it significantly reduces the load and pressure on time-critical sections. This allows for more effective performance analysis using tools like Valgrind. For example, users can now analyze time-critical sections or evaluate cache usage without the interference that would normally occur if the interface were not isolated.
  • Platform Availability: As of now, the camera server is Linux-exclusive. However, the door is open for potential expansion. Should there be a demonstrated demand from the Windows user community, porting to the Windows platform is on the horizon.
  • Architectural Considerations: The camera server boasts a sophisticated architecture. Its complexities surpassed the capabilities offered by the synchronization primitives in the GLIB-2.0 library—a foundational component of the WaveMe toolbox. This particular technical constraint was a driving factor for its current Linux-only availability.

A Brief Dive into Address Sanitizers

For those who may not be intimately familiar with address sanitizers, let’s shed some light on their functionality. Essentially, address sanitizers serve as vigilant sentinels, detecting instances where code—be it yours or mine—reads or writes outside of allocated boundaries. Complementing this is a memory leak analyzer, which diligently records a summary upon program termination. Such tools are not just useful; they’re indispensable for crafting high-quality code.

Optimizing WaveMe: Valgrind, STM32-F407, and Streamlined Imaging

Our exploration of tools and their impact on WaveMe doesn’t end with address sanitizers. In the realm of Linux, another instrumental tool emerges: Valgrind. For developers eyeing the pinnacle of code efficiency, Valgrind is indispensable. It has played a pivotal role, especially when the Shack-Hartmann code for WaveMe was being tailored for the STM-32F407 platform—a system powered by a 168MHz ARM Cortex 4 CPU and 96 kB of RAM dispersed across various sections.

Our rigorous optimization strategies yielded remarkable results on this platform. To put it in perspective, analyzing 630 spots and executing modal analysis up to Z16 was completed in just 3.3ms. The modal analysis’s backbone was a Singular Value Decomposition algorithm from the 1970s, chosen specifically for its compact nature that snugly fit the platform’s constraints.

Yet, WaveMe’s journey of enhancement and user-centricity doesn’t stop there. Recognizing the limitations of many lab computers, which often aren’t the most high-performance machines within an organization, we took further steps. The camera server’s introduction is a response to the challenges of streaming voluminous images—a task that many systems grapple with. By segregating this operation to an independent process, we’re ensuring smoother performance and reduced strain on primary computational resources. This strategic move is a monumental stride in WaveMe’s evolution. Rest assured, whether one delves deep into WaveMe or merely interacts with the toolbox, the palpable benefits of our recent innovations are ready to enhance the user experience.

jarek

Recent Posts

Distortion Mapping – An SVD HowTo

In this tech-talk, I would like to discuss how (and probably how not to) develop an optical distortion correction. It…

11 hours ago

The Challenge of Simplifying Precision

Introduction This tech-talk is about why simple isn't always easy and what the Shack-Hartmann (SH) module in WaveMe must do…

3 weeks ago

Why Senslogic

Why choose Senslogic? A very reasonable question indeed. There is no shortage of established companies offering customized services that can…

1 month ago

HowTo: Spatial Light Modulators

About This Tech-Talk Spatial light modulators (SLMs) are active optical components that can alter a light beam’s amplitude, phase, or…

1 month ago

Ti DLP – The Workhorse of Maskless Lithography

DLP9000XUV Spatial Light Modulator

2 months ago

When Optics Met WaveMe

Much like "When Harry Met Sally", discovering the depths of their relationship over time, integrating WaveMe into your lab toolbox…

2 months ago