Watch a demonstration of the NVision Python program
NVision is available as a Python package that you can download from our GitHub repository. The package includes:
NVision is a Python-based algorithm designed to identify Nitrogen-Vacancy (NV) centers in Fluorescence Scanning Microscopy (FSM) scans of diamond samples. The software processes JSON-formatted scan data through several key steps:
Data Import
Loads FSM scan data from JSON files containing scan counts and position information.
Noise Reduction
Applies Gaussian filtering to reduce noise while preserving signal features
Peak Detection
Identifies local maxima using statistical thresholding to locate NV centers
Visualization
Generates comprehensive plots showing original data, processed data, and detected centers
# Basic usage of NVision
import json
from nvision import detect_nv_centers, visualize_results
# Load FSM scan data
with open('fsm_scan.json', 'r') as f:
data = json.load(f)
# Detect NV centers
results = detect_nv_centers(
data,
threshold_factor=2.5,
min_distance=10
)
# Print detection results
print(f"Detected {len(results['coordinates'])} NV centers")
print(f"Threshold: {results['threshold']:.1f} counts/s")
# Visualize the results
fig = visualize_results(data, results)
fig.savefig('nv_centers_analysis.png')