Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

CHRNS: MACS NICE Control upgrade

Composite of NICE screens

Composite of NICE screens controlling MACS

MACS CHRNS

 

 

MACS is undergoing an instrument control upgrade to the current version of NICE.

The instruments at the NCNR require a reliable, powerful and flexible control system in order to take full advantage of the very limited neutron beamtime and allow for non-routine sample environments and experiments to be incorporated. NICE provides these features and is implemented using a client-server architecture:

  • The server performs the critical operations of coordinating instrument motions, device control and measurements in order to execute an experimental plan, and then gathering all the results into archival data files that are provided to the users.
  • The client program provides a graphical interface through which users operate the instrument and create the experiment plans to be executed by the server while providing graphs and feedback on the results of current operations and scans, as well as a visual representation of the current state of the instrument. Simple control can be achieved through the use the Trajectory Manager GUI; advanced control is possible through the application programming interface (API). Multiple clients can connect simultaneously throughout the building allowing someone to setup an experiment the instrument and monitor it from their office.

By default the standardized NeXuS file format is supported as an output for each instrument, while additional file writers (e.g. text columns) can be added and turned on and off by instrument scientists.

Milestones achieved during the unexpected outage

  • MACS modules created for NICE
    • Virtual Triple Axis - Device control system allows each MACS to operate like a standard triple axis, using one of its 20 detectors. This desired detector can be set to a fixed value by the user, or NICE can be configured to automatically select it, in a way that optimizes measurement range. Similarly NICE can automate the selection of scattering direction. Both of these features can be used simultaneously, to provide a wide range of measurement conditions.  
    • Customized Sample Alignment - The general sample alignment system has been modified to support the Virtual Triple Axis feature on MACS. This means users can align their samples using a chosen detector like a normal Triple Axis, or use any of the automated features described above.
    • Trajectory Manager - This tool leverages the NICE's underlying trajectory system, which is extremely flexible, to create the most common trajectories run at MACS. Users can run these trajectories as is, or modify them to produce more customized measurements and data organization.
    • Polarized Beam - NICE supports polarized beam operations on MACS. The Trajectory Manager can build trajectories which incorporate polarized beam changes at a customized "level" in the measurement, to optimize measurement speed (inner most loop) vs. maintaining polarizer efficiency (outer most loop) to everything in between.
    • Alignment - Instrument scientists have collaborated with the NICE team to create a custom alignment script for the instrument, using NICE's Python Scripting feature. This allows scientists to run their alignment script from the command line, or even queue it up with other tasks, like any other command. There script can move, count, etc. but can be terminated safely from the NICE client like any other operation.
    • Instrument Visualization - NICE displays a live, top-down, cartoon representation of the instrument, which updates in real time. This is designed to both help familiarize new users with how MACS works while providing an intuitive view of whole instrument.
      • Users can zoom, pan, rotate, etc. or they can "lock-on" to different camera views, such as a standard beam-sample-detector display.
      • Provides highly detailed views of the most important parts of the instrument:
        • DFM - Shows every motor's position realistically. Shows a top-down profile/shadow of each blade as its focused. 
        • Sample area - Superimposes the Q-Vector representing the current measurement. Once the sample is aligned, users can see their chosen scattering plane vectors, and their chosen HKL vector.
        • Detector - The detector being used in used in Virtual Triple Axis mode is highlighted. Each detector can be zoomed in on and users can see the spectroscopic detectors orbiting each analyzer. 
      • Mouse-over provides live status of precise position of motors, limits and important higher level quantities.
      • Changing key instrument constants (based on neutron alignment) shifts the physical position of devices in the display to represent the physical reality on the floor as detectors read it. 
  • Simulated MACS server is available for testing offline or at home. Simulation differs from real system in only that it communicates with simulated hardware, meaning ~98% of the tested code is identical to the real system.
  • Support for improved plotting system
    • Plotting multiple y-axis variables
    • Overlaying data sets. You can overlay any two plots you can access (see #2). Every plot/y-axis combo is graphed simultaneously.
    • Panning/Zooming, basically good modern navigation of the plot
    • A smart tick labeling system
    • Plot past data - Since plotting past data was thought of as strictly a reduction/analysis team issue NICE was not built with this capability in mind, and only allowed plotting the most recently collected scans. This new plotting system allows users to browse and plot all previously collected data with NICE seamlessly transferring data behind the scenes as someone browses. All plotting features are available for old data including overlaying it with new data.
    • Integration with other NICE features such as findpeak and precise unit/precision display of all values.
  • MACS DFM focusing logic now managed by NICE. When the previous instrument control system is retired, the DFM motor computer can largely operate as a simple array of motors.
  • Most major features tested on MACS instrument hardware. We plan to test the final polarized beam component, on MACS starting Feb. 6th.

Estimated Timeline

  • MACS initial deployment – 4/22
    • This version will contain all features needed to run most experiments (99%).
  • MACS full deployment goal – 6/23

 

 

Contacts

Data Acquisition Software

Created January 4, 2022, Updated January 31, 2023