Read a Nanonis spectroscopy .dat file into a xarray Dataset
Project description
Xarray plugin to read Nanonis spectroscopy .dat files
nanonis_xarray is a xarray plugin to read spectroscopy measurements saved in text
format (.dat) by a Nanonis Mimea
SPM control system from SPECS Surface Nano Analysis GmbH.
The data is read into a xarray.Dataset, where each measured channel (tunnelling current, AFM oscillation amplitude, …) is a xarray.DataArray with up to three dimensions:
- The independent variable of the measurement, such as bias voltage or tip z position;
- The sweep number, if the measurement has been repeated multiple times;
- The sweep direction (forward or backward), if the independent variable has been swept in both directions.
>>> import xarray as xr
>>> data = xr.open_dataset("tests/data/z.dat")
>>> data.coords
Coordinates:
* z_rel (z_rel) float64 2kB [m] -2.1e-10 -2.065e-10 ... 4.865e-10 4.9e-10
* sweep (sweep) int64 24B 1 2 3
* direction (direction) object 16B 'bw' 'fw'
pint-xarray is used to associate a physical unit to each channel, unless xr.open_dataset() is called with quantify_vars=False:
>>> data["current"].pint.units
<Unit('ampere')>
The header of the measurement is stored in the attrs nested dictionary:
>>> data.attrs["Z Spectroscopy"]["Number of sweeps"]
3
>>> data.attrs["Z Spectroscopy"]["backward sweep"]
True
Physical quantities are stored as pint.Quantity, timestamps as datetime.datetime, and paths as pathlib.Path:
>>> data.attrs["NanonisMain"]["RT Frequency"]
<Quantity(10000.0, 'hertz')>
>>> data.attrs["Date"]
datetime.datetime(2015, 3, 27, 11, 49, 5)
🚧 Work in progress 🚧
This library is under development: expect breaking changes. Nanonis binary formats (.sxm, .3ds) are currently not supported, and can be read by similar projects:
nanonispy2xarray-nanonis- ... and many more.
How to cite
Cite gsffile in your published work using the metadata
in CITATION.cff
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nanonis_xarray-0.1.5.tar.gz.
File metadata
- Download URL: nanonis_xarray-0.1.5.tar.gz
- Upload date:
- Size: 102.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e722de40bde3109c71892c2070c89e6d58829cb4f5c514ff58857f9acf8b61af
|
|
| MD5 |
61128e7c622510b88583debeb7cb46f7
|
|
| BLAKE2b-256 |
2c91b86d5f99ad6eff17d5eacaec81f0ff60f7589e02be94b47abaf1196bdcb0
|
Provenance
The following attestation bundles were made for nanonis_xarray-0.1.5.tar.gz:
Publisher:
ci.yaml on angelo-peronio/nanonis-xarray
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nanonis_xarray-0.1.5.tar.gz -
Subject digest:
e722de40bde3109c71892c2070c89e6d58829cb4f5c514ff58857f9acf8b61af - Sigstore transparency entry: 496006137
- Sigstore integration time:
-
Permalink:
angelo-peronio/nanonis-xarray@0852f3d1f7c0d2be98ca53dd29d9a6700caea34d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/angelo-peronio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@0852f3d1f7c0d2be98ca53dd29d9a6700caea34d -
Trigger Event:
push
-
Statement type:
File details
Details for the file nanonis_xarray-0.1.5-py3-none-any.whl.
File metadata
- Download URL: nanonis_xarray-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afd8b79bcab7cabc0142b6d6746f6b5f5bde801b6aa960180c36aa3bca26a33c
|
|
| MD5 |
5e92f7d7437ad58b9a059140383dfb3c
|
|
| BLAKE2b-256 |
4c6144c3e363c7d5906915157069db41f2a16f2215978c0e4fa3c81be8938828
|
Provenance
The following attestation bundles were made for nanonis_xarray-0.1.5-py3-none-any.whl:
Publisher:
ci.yaml on angelo-peronio/nanonis-xarray
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nanonis_xarray-0.1.5-py3-none-any.whl -
Subject digest:
afd8b79bcab7cabc0142b6d6746f6b5f5bde801b6aa960180c36aa3bca26a33c - Sigstore transparency entry: 496006167
- Sigstore integration time:
-
Permalink:
angelo-peronio/nanonis-xarray@0852f3d1f7c0d2be98ca53dd29d9a6700caea34d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/angelo-peronio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@0852f3d1f7c0d2be98ca53dd29d9a6700caea34d -
Trigger Event:
push
-
Statement type: