Skip to main content

Simulate magnetic resonance force microscopy experiments.

Project description

GitHub version Unit tests

mrfmsim is a Python framework for simulating magnetic resonance force microscopy (MRFM) experiments. The package is based on the mmodel framework, which provides modular modeling capabilities for the experiments.

This mrfmsim package contains tools to simulate signals in a Magnetic Resonance Force Microscope (MRFM) [1] [2] [3] experiment. The code in the package simulates signal from electron spins, particularly the nitroxide spin radical “TEMPO” to selected nuclear spins (1H, 19F, and 71Ga).

The package host variety of MRFM experiments with the tip-on-cantilever setup. It can simulate signals from both Curie-law spin magnetization and spin fluctuations (in the small polarization limit); and can simulate force experiments and force-gradient experiments (in the small-cantilever-amplitude limit and without the small amplitude approximation — in the large amplitude limit). It can simulate signal with the cantilever and field-aligned in both the hangdown [4] and SPAM [5] [6] experimental geometries.

Quickstart

Installation

mrfmsim installation

To install the package, run:

pip install mrfmsim

For development from a cloned repository, run:

pip install .

Graphviz installation

Graphviz is required only for graph visualization: Graphviz Installation For Windows installation, please choose “add Graphviz to the system PATH for all users/current users” during the setup.

For macOS systems, sometimes brew install results in an unexpected installation path, it is recommended to install with conda:

conda install -c conda-forge pygraphviz

Examples and documentation

The full documentation is available at mrfmsim documentation. Step-by-step examples are available in the overview documentation, including a downloadable overview notebook. Detailed experiment examples are documented in the experiment pages.

Tests

To run the tests locally:

python -m pytest

To test in different environments:

tox

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to follow our development guidelines and submit pull requests.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mrfmsim-0.4.2.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mrfmsim-0.4.2-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file mrfmsim-0.4.2.tar.gz.

File metadata

  • Download URL: mrfmsim-0.4.2.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.9.15 Darwin/25.3.0

File hashes

Hashes for mrfmsim-0.4.2.tar.gz
Algorithm Hash digest
SHA256 f15d4139aa56431c79bac94254be6dc102cb98de4428738ae6090aa04fc72465
MD5 a781995363d62fe1a622e525fc6fb626
BLAKE2b-256 494f677ff872131e072f64e85ecef6383eab5a8166cdd05a75a8bc3ba6d578e5

See more details on using hashes here.

File details

Details for the file mrfmsim-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: mrfmsim-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.9.15 Darwin/25.3.0

File hashes

Hashes for mrfmsim-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcd6d3c3bf4e3ac403587f609487c53ac3911b07130d29d4a3ec64ad8608cd55
MD5 23fddd6fc75a4d6e4be247c96a38c21e
BLAKE2b-256 2fe43141e59d1793a42cad963abda5b5b0e8bd670b7e02c24b6dafd80b5cef5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page