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 openbis-parser-tofsims 1.0.4

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

Source distribution (sdist)

Source distribution for openbis-parser-tofsims 1.0.4
File Size Uploaded Provenance
openbis_parser_tofsims-1.0.4.tar.gz 104.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openbis-parser-tofsims 1.0.4
File Interpreter ABI Platform
openbis_parser_tofsims-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 123.5 kB

Release files / openbis_parser_tofsims-1.0.4.tar.gz

Download URL openbis_parser_tofsims-1.0.4.tar.gz
Size 104.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6edcef0bedc71fd0bbbe8d911f021a8485ce86bed2f80d63e980b187154c2d31
BLAKE2b-256 checksum
How to use checksums
a06f06899dd8a37f13fa54fc95499aae43299bb04d67d6da4d374f456ec5ff08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 23, 2026.

Transparency log

Release files / openbis_parser_tofsims-1.0.4-py3-none-any.whl

Download URL openbis_parser_tofsims-1.0.4-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c8f85355f76a7425f36d765b2f0a4888c72295b769e40921a866e64ec1dec66
BLAKE2b-256 checksum
How to use checksums
cb6de0e32d4088719da2d0161b4946855031816854302a44343f2a6a17454c16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 23, 2026.

Transparency log

Security for openbis-parser-tofsims 1.0.4

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 openbis_parser_tofsims-1.0.4.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 23, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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