Skip to content

Repository files navigation

rusty-tip

Crates.io docs.rs License: MIT GitHub release DOI Ask DeepWiki

A Rust library for building automated scanning probe microscopy routines, shipping with automated STM/AFM tip preparation as its first end-to-end routine.

Warning

The 0.3.x/0.4.x line is an experimental rewrite. The control path was rebuilt around the SpmController trait and a new action/event system, and it has not run on a real microscope yet: every test in this release exercises MockController. The stability thresholds were calibrated against the v1 code path and may need retuning.

Expect the API and the config format to keep moving until the rewrite gets machine time. For the last version that has run on hardware, see 0.2.3.

If you need a stable interface to program against today, use nanonis-rs, the Nanonis TCP client this library is built on, or the official Python package nanonis_spm from SPECS.

The core of rusty-tip is a library for writing SPM automation: a hardware-abstraction trait (SpmController), a vocabulary of composable actions with capability checking, an event stream for observability, and a scriptable mock controller so routines can be developed and tested without instrument time. Routines written against it are controller-agnostic; today Nanonis (over TCP) is the only instrument backend, and the trait is the seam for adding others.

The first routine built on this foundation, and the proof of concept for the design, is automated tip preparation: pulse, reposition, measure the frequency shift, repeat until the tip is sharp and provably stable. It ships as a CLI (tip-prep) and a GUI (tip-prep-gui).

Installation

Pre-built binaries from GitHub Releases: rusty-tip-x86_64-unknown-linux-gnu.tar.xz (Linux) or rusty-tip-x86_64-pc-windows-msvc.zip (Windows).

From source:

cargo build --release                 # CLI tools
cargo build --release --features gui  # + tip-prep-gui

As a library: cargo add rusty-tip.

Quickstart: tip preparation

tip-prep --config path/to/config.toml

A minimal config:

[nanonis]
host_ip = "127.0.0.1"
control_ports = [6501, 6502, 6503, 6504]

[data_acquisition]
data_port = 6590
sample_rate = 2000

[tip_prep]
sharp_tip_bounds = [-1.5, 0.0]  # freq-shift window that counts as "sharp" (Hz)
max_cycles = 10000
max_duration_secs = 12000
initial_bias_v = -0.5
initial_z_setpoint_a = 100e-12

[pulse_method]
type = "fixed"
voltage = 4.0
polarity = "positive"

tip-prep-gui provides the same routine with live plots and an editable configuration, plus a simulation mode that runs against the mock controller without hardware.

Documentation

Requirements (Nanonis backend)

  • Nanonis SPM controller with TCP interface enabled
  • Configured TCP data logging (typically port 6590)
  • Control ports accessible (typically 6501-6504)

License

MIT

About

Write controller-agnostic SPM automation in Rust, starting with automated tip preparation on Nanonis.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages