Skip to main content

ToF-SIMS openBIS Parser

Parser for ION-TOF ToF-SIMS SurfaceLab files that creates Sample and SIMS objects for openBIS using the bam-masterdata parser interface.

The parser is designed to be used with the openbis-upload-helper and follows the parser structure of the openbis-parser-example.

Overview

The parser reads ION-TOF SurfaceLab container files, extracts sample/business metadata and technical measurement metadata, and creates the corresponding openBIS objects.

For each detected file group, the parser creates:

  • one Sample
  • one SIMS experimental step
  • datasets for the uploaded source files
  • relationships from the SIMS measurement to the sample and the existing ToF-SIMS device

The parser expects ION-TOF SurfaceLab container files.

Supported files

The following file extensions are considered:

Extension Purpose
.itm SurfaceLab metadata / instrument file
.itmx SurfaceLab metadata / instrument file
.ita SurfaceLab metadata / instrument file
.itax SurfaceLab metadata / instrument file
.txt File belonging to a measurement group

Metadata files are preferred in this order:

  1. .itm
  2. .itmx
  3. .ita
  4. .itax

Files with other extensions are ignored.

File grouping

Files are grouped by their filename stem.

For example:

sample01.itm
sample01.itmx
sample01.txt
sample01.itax

are treated as one measurement group:

sample01

Technical metadata

The parser maps the following SurfaceLab properties:

SurfaceLab property SIMS property
Analysis.Timestamp Date/Time
Instrument.PrimaryGun.Species Primary ion
Instrument.SputterGun.Species Sputter ion
Instrument.Analyzer.Polarity Polarity
Registration.Raster.FieldOfView Image size [µm]
Instrument.SputterGun.Energy Sputter V [kV]
Analysis.SputterTime Sputter time [s]
Profile.CraterSize.X Krater size X [µm]
Profile.CraterSize.Y Krater size Y [µm]

Analysis.Timestamp is converted from the SurfaceLab timestamp format to:

YYYY-MM-DD HH:MM:SS

For each valid measurement group, the parser creates a Sample and a SIMS experimental step.

Sample

The sample name is taken from the SurfaceLab metadata and converted into an openBIS code by:

  • converting to uppercase
  • replacing unsupported characters with _
  • collapsing repeated underscores
  • removing leading/trailing _.-
  • limiting the code to 200 characters

The sample is added to the collection passed to the parser.

SIMS experimental step

The SIMS object uses the group name as its name and receives a deterministic code:

<SAMPLE_CODE>_<GROUP_NAME>

The following properties are assigned when available:

  • operator
  • customer
  • start date
  • primary ion
  • sputter ion
  • polarity

All files in the group except files ending in _no-upload are added as datasets.

Relationships

The parser creates:

Sample
  └── SIMS measurement
        └── datasets

The SIMS measurement is also linked to the pre-existing ToF-SIMS device.

The device is not created or modified by the parser. The parser references the existing device by its configured permanent ID.

Required metadata

A group is skipped if no readable metadata file can be found.

The following business fields are required:

  • Sample
  • Customer

The Analysis.Timestamp is also required because it is used as the SIMS start_date.

If one of these required values is missing, the group is skipped and an error is written to the parser log.

Legacy fallback values

The parser currently contains fallback values for older SurfaceLab files where certain metadata was not recorded:

LEGACY_OPERATOR_FALLBACK = "..."
LEGACY_CUSTOMER_FALLBACK = "..."
LEGACY_SAMPLE_FALLBACK = "..."

These values should be reviewed before processing a legacy batch. They are intended for batches where the missing metadata is known to be identical for all files in that batch.

For normal/new data, these fallbacks should be empty.

Installation

Install the parser together with its dependencies in a Python environment.

The parser requires, among other dependencies:

  • bam-masterdata
  • pySPM

The parser implements the bam-masterdata AbstractParser interface and should be registered through the bam.parsers Python entry-point group.

A typical entry-point configuration looks like:

[project.entry-points."bam.parsers"]
tofsims = "<package-name>:<entry-point-variable>"

See the openbis-parser-example repository for the expected parser package structure and entry-point configuration.

Using the parser with openbis-upload-helper

Once installed and registered as a bam.parsers entry point, the parser can be discovered by openbis-upload-helper.

In the upload helper:

  1. Select the target openBIS project.
  2. Select the collection into which the measurements should be uploaded.
  3. Add the ToF-SIMS files.
  4. Assign the ToF-SIMS parser to the files or folder.
  5. Start the parsing/upload process.
  6. Check the parser log for skipped or failed measurement groups.

Local testing

The repository provides a local runner/notebook for testing the parser independently of the desktop upload workflow.

A minimal invocation follows the parser interface:

parser = MasterdataParserTofsims()
from bam_masterdata.logger import logger
from bam_masterdata.metadata.entities import CollectionType

collection = CollectionType()
parser.parse(
    files,
    collection,
    logger,
)

The local runner needs to provide:

  • a list of input file paths
  • a collection object
  • a logger

For the repository's local parser runner, use the run notebook/script added for this parser. This is useful for testing a batch of SurfaceLab files before using the parser through openbis-upload-helper.

Metadata

Release files for tof-sims-parser 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tof-sims-parser 0.0.1
File Size Uploaded Provenance
tof_sims_parser-0.0.1.tar.gz 104.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tof-sims-parser 0.0.1
File Interpreter ABI Platform
tof_sims_parser-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 124.1 kB

Release files / tof_sims_parser-0.0.1.tar.gz

Download URL tof_sims_parser-0.0.1.tar.gz
Size 104.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6d465902e85d91507f2a3d70035e5015e3247533107ad0776f501db1895c2512
BLAKE2b-256 checksum
How to use checksums
8826e5ff1d3b6fe84758861d0f2270a3518516991c3810f5ba1cf7c142a113a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / tof_sims_parser-0.0.1-py3-none-any.whl

Download URL tof_sims_parser-0.0.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eb3458dcc24753d365ca5ff98687b8c03389ae0eb2ca1c92d19c35a2362c3c1
BLAKE2b-256 checksum
How to use checksums
58aa3c510ca98fae2d8a13500504704e05591422d7e3795258fe67369d0f6294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for tof-sims-parser 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tof_sims_parser-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page