{"id":31653977,"url":"https://github.com/angelo-peronio/nanonis-xarray","last_synced_at":"2026-01-20T17:02:53.697Z","repository":{"id":308244255,"uuid":"1032126987","full_name":"angelo-peronio/nanonis-xarray","owner":"angelo-peronio","description":"Xarray plugin to read Nanonis spectroscopy .dat files","archived":false,"fork":false,"pushed_at":"2025-12-18T20:51:49.000Z","size":417,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-21T20:38:55.969Z","etag":null,"topics":["afm","dat","mimea","nanonis","physics","python","specs","sps","stm","stm-iets","sts","surface-science","xarray"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angelo-peronio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-04T21:11:09.000Z","updated_at":"2025-12-18T20:51:53.000Z","dependencies_parsed_at":"2025-12-19T02:01:00.614Z","dependency_job_id":null,"html_url":"https://github.com/angelo-peronio/nanonis-xarray","commit_stats":null,"previous_names":["angelo-peronio/nanonis-xarray"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/angelo-peronio/nanonis-xarray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelo-peronio%2Fnanonis-xarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelo-peronio%2Fnanonis-xarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelo-peronio%2Fnanonis-xarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelo-peronio%2Fnanonis-xarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelo-peronio","download_url":"https://codeload.github.com/angelo-peronio/nanonis-xarray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelo-peronio%2Fnanonis-xarray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["afm","dat","mimea","nanonis","physics","python","specs","sps","stm","stm-iets","sts","surface-science","xarray"],"created_at":"2025-10-07T11:12:04.406Z","updated_at":"2026-01-20T17:02:53.692Z","avatar_url":"https://github.com/angelo-peronio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xarray plugin to read Nanonis spectroscopy .dat files\n\n[![pypi](https://img.shields.io/pypi/v/nanonis-xarray)](https://pypi.org/project/nanonis-xarray/)\n[![conda-forge](https://img.shields.io/conda/vn/conda-forge/nanonis-xarray)](https://anaconda.org/conda-forge/nanonis-xarray)\n[![pypi downloads](https://img.shields.io/pypi/dm/nanonis-xarray)](https://pypistats.org/packages/nanonis-xarray)\n[![license](https://img.shields.io/github/license/angelo-peronio/nanonis-xarray)](https://github.com/angelo-peronio/nanonis-xarray/blob/master/LICENSE)\n[![python](https://img.shields.io/pypi/pyversions/nanonis-xarray)](https://pypi.org/project/nanonis-xarray/)\n[![ci](https://github.com/angelo-peronio/nanonis-xarray/actions/workflows/ci.yaml/badge.svg)](https://github.com/angelo-peronio/nanonis-xarray/actions/workflows/ci.yaml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/angelo-peronio/nanonis-xarray/master.svg)](https://results.pre-commit.ci/latest/github/angelo-peronio/nanonis-xarray/master)\n[![codecov](https://codecov.io/github/angelo-peronio/nanonis-xarray/graph/badge.svg)](https://codecov.io/github/angelo-peronio/nanonis-xarray)\n[![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811\u0026color=%235CA038)](https://scientific-python.org/specs/spec-0000/)\n[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json)](https://github.com/astral-sh/ruff)\n[![DOI](https://zenodo.org/badge/1032126987.svg)](https://doi.org/10.5281/zenodo.17095214)\n\n`nanonis-xarray` is a [`xarray`](https://xarray.dev/) plugin to read spectroscopy measurements saved in text\nformat (`.dat`) by a [Nanonis Mimea](https://www.specs-group.com/nanonis/products/mimea/)\nSPM control system from [SPECS Surface Nano Analysis GmbH](https://www.specs-group.com/).\n\nThe data is read into a [`xarray.Dataset`](https://docs.xarray.dev/en/stable/getting-started-guide/why-xarray.html#core-data-structures), where each measured channel (tunnelling current, AFM oscillation amplitude, …) is a [`xarray.DataArray`](https://docs.xarray.dev/en/stable/user-guide/data-structures.html#dataarray) with up to three dimensions:\n\n* The independent variable of the measurement, such as sample bias voltage or tip z position;\n* The sweep number, if the measurement has been repeated multiple times;\n* The sweep direction (forward or backward), if the independent variable has been swept in both directions.\n\n```python\n\u003e\u003e\u003e import xarray as xr\n\n\u003e\u003e\u003e data = xr.open_dataset(\"tests/data/z.dat\")\n\u003e\u003e\u003e data.coords\nCoordinates:\n  * z_rel      (z_rel) float64 2kB [m] -2.1e-10 -2.065e-10 ... 4.865e-10 4.9e-10\n  * sweep      (sweep) uint32 12B 1 2 3\n  * direction  (direction) category 18B fw bw\n\n```\n\n[`pint-xarray`](https://xarray.dev/blog/introducing-pint-xarray) is used to associate a physical unit to each channel, unless `xr.open_dataset()` is called with `quantify_vars=False`:\n\n```python\n\u003e\u003e\u003e data[\"current\"].pint.units\n\u003cUnit('ampere')\u003e\n\n```\n\nThe header of the measurement is stored in the `attrs` nested dictionary:\n\n```python\n\u003e\u003e\u003e data.attrs[\"Z Spectroscopy\"][\"Number of sweeps\"]\n3\n\u003e\u003e\u003e data.attrs[\"Z Spectroscopy\"][\"backward sweep\"]\nTrue\n\n```\n\nPhysical quantities are stored as [`pint.Quantity`](https://pint.readthedocs.io/en/stable/getting/tutorial.html#defining-a-quantity), timestamps as [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime-objects), and paths as [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html#basic-use):\n\n```python\n\u003e\u003e\u003e data.attrs[\"NanonisMain\"][\"RT Frequency\"]\n\u003cQuantity(10000.0, 'hertz')\u003e\n\u003e\u003e\u003e data.attrs[\"Date\"]\ndatetime.datetime(2015, 3, 27, 11, 49, 5)\n\n```\n\n## 🚧 Work in progress 🚧\n\nThis library is under development: expect breaking changes. Nanonis binary formats (`.sxm`, `.3ds`) are currently not supported, and can be read by similar projects:\n\n* [`nanonispy2`](https://github.com/ceds92/nanonispy2)\n* [`xarray-nanonis`](https://github.com/John3859/xarray-nanonis)\n* ... and [many more](https://pypi.org/search/?q=nanonis).\n\n## How to cite\n\nCite `nanonis-xarray` in your published work using the metadata in [`CITATION.cff`](CITATION.cff).\nSpecific DOIs and BibTeX entries for each released version can be found on [Zenodo](https://doi.org/10.5281/zenodo.17095214).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelo-peronio%2Fnanonis-xarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelo-peronio%2Fnanonis-xarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelo-peronio%2Fnanonis-xarray/lists"}