Python analysis code for optically detected magnetic resonance (ODMR), electron spin characterization and fluorescence measurements on single nitrogen-vacancy (NV) centers in diamond, written during my PhD at Helmholtz-Zentrum Berlin (2020–2025).
The code takes raw output from a home-built confocal microscope integrated into a nitrogen glovebox and controlled by qudi and produces the fitted values and figures. The setup is described in:
K. Volkova, A. M. Kumar, K. Bolotin, B. Naydenov, A glovebox-integrated confocal microscope for quantum sensing in inert atmosphere, Review of Scientific Instruments 96, 013703 (2025). doi:10.1063/5.0244999
Full results and methods can be found in the dissertation:
K. Volkova, Diamond-based quantum simulator – surface and material challenges, Freie Universität Berlin (2025). refubium.fu-berlin.de/handle/fub188/48745
| Measurement | Analysis |
|---|---|
| SRIM | Gaussian fitting of simulated nitrogen implantation depth profiles |
| ODMR (cw and pulsed) | Single and double Lorentzian dip fitting; resonance positions, contrast, and zero-field splitting |
| ODMR contrast tracking | Fitting across a series of measurements to track contrast and background fluorescence versus laser exposure time |
| Rabi | Cosine fitting; π-pulse duration and contrast |
| Hahn echo | Exponential decay fitting for T₂; FFT to identify hyperfine interactions with coupled nuclear spins |
| XY8-N | Signal normalization to Rabi contrast, deconvolution to power spectral density, Larmor-frequency identification for different isotopes, and NV depth estimation from the magnetic-noise integral |
| Spectra | Background subtraction, secondary energy axis, 2D and 3D stacked plots |
| Saturation, lifetime, antibunching | Linear and single/double-exponential fitting of counter data |
| Confocal images | Percentile-based contrast scaling, scale bars, background subtraction, image comparison |
| Counter | Plotting of counter data |
Analysis.ipynb— the analysis workflow, organized by measurement type. Each section follows the same structure: data import → variables → normalization → fitting → plotting.qudi_analysis_functions.py— constants (gyromagnetic ratios), file readers for the qudi.dat, counter.mp, and spectrometer.csvformats, fit models, and the analysis functions shared across the notebook.Confocal setup manual.pdf— operating manual for the microscope the data comes from.
Use a "Table of Contents" jupyter notebook extension for navigation. Run:
conda install -c conda-forge jupyter_contrib_nbextensions
in the command line. After that, you can activate the individual extensions after launching Jupyter notebook in the Nbextensions Tab. If you do not see all the notebook extensions after that use this command:
jupyter contrib nbextension install --sys-prefix
More detailed instruction how to install extensions can be found here: https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html.