DMCpy: A powder and single crystal neutron diffraction software for DMC

The paper introduces DMCPy, a modular Python-based software package designed to streamline data reduction, visualization, and analysis for both powder and single-crystal neutron diffraction experiments conducted on the upgraded DMC diffractometer at SINQ.

Original authors: Jakob Lass, Samuel Harrison Moody, Øystein Slagtern Fjellvåg

Published 2026-03-02
📖 4 min read☕ Coffee break read

This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a mystery inside a tiny, invisible world made of atoms. To do this, you use a special flashlight made of neutrons (tiny particles with no electric charge) that can pass through solid objects and bounce off the atoms inside.

The DMC is a high-tech "neutron camera" located at a massive research lab in Switzerland. Recently, they upgraded this camera with a giant, super-sensitive 2D detector (think of it as a massive digital billboard instead of a single lens). This new camera is amazing because it can take pictures of two very different things:

  1. Powders: Like taking a photo of a bucket of sand to see the average shape of every grain.
  2. Single Crystals: Like taking a photo of a single, perfect diamond to see its internal structure in 3D.

However, this new camera is so powerful that it produces too much data. It's like trying to drink from a firehose; the raw data is a chaotic, overwhelming flood of numbers that standard tools can't handle.

Enter DMCpy.

What is DMCpy?

Think of DMCpy as a specialized kitchen for neutron data. Just as a chef needs specific knives and pans to turn raw ingredients into a delicious meal, scientists need specific software to turn raw neutron data into a clear picture of the atomic world.

Here is how DMCpy works, using some everyday analogies:

1. The "Noise Cancelling" Headphones (Normalization)

The giant detector is actually made of 9 smaller panels glued together. Sometimes, one panel is slightly more sensitive than its neighbor, or a few wires are broken. If you just looked at the raw photo, it would look like a patchwork quilt with bright and dark spots that aren't real.

  • The Analogy: DMCpy takes a "test photo" of a perfect, boring metal (Vanadium) first. It calculates exactly how "loud" or "quiet" each part of the detector is. Then, it acts like noise-cancelling headphones, adjusting the volume of every pixel so the final image is perfectly even and free of detector glitches.

2. The "Map Translator" (Coordinate Conversion)

When the camera takes a picture, the data is in "Camera Coordinates" (pixels on a screen). But scientists want to see the data in "Crystal Coordinates" (where the atoms actually are in 3D space).

  • The Analogy: Imagine you are looking at a map of a city, but the map is rotated, upside down, and stretched. DMCpy is the GPS translator that instantly rotates, shrinks, and aligns the map so that "North" on the screen matches "North" in the crystal. It turns a confusing jumble of pixels into a clear, 3D grid of atoms.

3. The "3D Slicer" (Visualization)

The data is a massive 3D block of information. Scientists often need to slice through it to see what's happening inside.

  • The Analogy: Imagine a giant loaf of bread (the data). DMCpy lets you slice the loaf in any direction you want.
    • Viewer3D: This is like a virtual reality window where you can fly through the loaf, looking at different layers of atoms.
    • 2D/1D Cuts: This is like taking a specific slice of bread to look at the texture, or cutting a thin strip to measure the density of a single line.

4. The "Smart Filter" (Masking)

Sometimes, the camera sees things that aren't part of the experiment, like a stray reflection from the sample holder or a broken wire.

  • The Analogy: DMCpy acts like a Photoshop eraser tool. It lets the scientist draw a circle around the "bad spots" and tell the software, "Ignore this part." This ensures that the final analysis only looks at the real atoms, not the camera's mistakes.

Why does this matter?

Before DMCpy, analyzing data from this new camera was like trying to build a house with a hammer and a spoon. It was slow, difficult, and prone to errors.

With DMCpy, scientists can:

  • Speed up the process: It handles millions of data points automatically.
  • See the invisible: It reveals magnetic structures and atomic arrangements that were previously hidden in the noise.
  • Be flexible: It works for both the "bucket of sand" (powders) and the "perfect diamond" (single crystals).

The Bottom Line

DMCpy is the essential software that turns the raw, chaotic output of a super-advanced neutron camera into clear, understandable scientific discoveries. It allows researchers to unlock the secrets of materials, from new batteries to superconductors, by making the invisible world of atoms visible and manageable.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →