Skip to main content

zarrmony-smartspim

LifeCanvas SmartSPIM reader plugin for zarrmony. Detects a SmartSPIM stitched-export directory (one that contains one or more Ex_<λ>_Ch<N>_stitched/ channel subdirs) and converts it to OME-NGFF 0.5:

zarrmony convert /path/to/<sample-id> ./out

Install

pip install zarrmony-smartspim

This pulls zarrmony from PyPI as a transitive dependency.

Verify the plugin registered

from zarrmony.readers.plugin import list_plugins

print([p.name for p in list_plugins()])
# -> [..., 'zarrmony-smartspim']

Supported SmartSPIM exports

  • Export format: LifeCanvas SmartSPIM stitched-export directory — one or more Ex_<λ>_Ch<N>_stitched/ subdirs at the top level, each containing 2-D TIFF Z-slices, plus a top-level metadata_<sample-id>.json sidecar (Latin-1 encoded).
  • Acquisition software: exercised against sidecars produced by LifeCanvas SmartSPIM acquisition software v5.x. Earlier and later versions are read on a best-effort basis via liberal key aliasing (see the "Instrument audit fields" table below) — the vendor has shipped several key spellings over the years and the parser accepts each.
  • Detection: the matcher fires on the presence of at least one Ex_<λ>_Ch<N>_stitched/ child. A missing metadata sidecar surfaces as SmartSpimMetadataError at read time with a message pointing at the expected filename.

Scope

  • Single-scene per SmartSPIM export (one Z-stack).
  • All Ex_<λ>_Ch<N>_stitched/ directories under the export root are stacked along C in directory-name order.
  • Physical pixel sizes populated from the sidecar metadata JSON (session_config.µm/pix for X/Y, session_config.z_step_um for Z).
  • Per-channel identity — name, dye, fluorophore, excitation and emission wavelengths — synthesised into a native ome_types.OME object exposed as reader.ome_metadata. Excitation is always known (from the directory name); the remaining fields come from an optional wavelength_config block in the sidecar (see below).
  • The ADR-0008 instrument audit block (microscope, serial, objective, acquisition date) is folded into the OME's <Instrument> + <Image> and lands under attrs.zarrmony.audit.per_scene[i].{acquisition,objective} via zarrmony's OME extractor. Missing sidecar fields are omitted from the audit rather than nulled, per the ADR-0008 omit-not-null rule.

Optional wavelength_config block

Keyed by excitation-wavelength string. Any subset of these keys is honored; the whole block is optional and readers fall back to Ex<λ> labels when it is absent:

"wavelength_config": {
  "488": {
    "name": "GFP",
    "dye": "GFP",
    "fluor": "GFP",
    "emission_low_nm": 500,
    "emission_high_nm": 550
  },
  "561": {"name": "mCherry", "fluor": "mCherry", "emission_nm": 610}
}

A single emission_nm scalar is expanded to emission_low_nm == emission_high_nm per the ADR-0008 / zarrmony#61 uniform-band convention.

Instrument audit fields

Populated from the sidecar with liberal key aliasing (LifeCanvas software has shipped several spellings — first-writer-wins across each list). Everything is optional; missing fields are omitted from attrs.zarrmony.audit.

Audit key Accepted sidecar keys (session_config OR top-level)
microscope microscope_model, microscope, system_model, system, model, instrument
microscope_serial microscope_serial, serial_number, serial, machine_id, machine, system_serial, instrument_serial
date (acquisition) acquisition_date, date, start_time, acquisition_start, session_start, timestamp
objective.nominal_magnification obj_magnification, objective_magnification, magnification, nominal_magnification
objective.numerical_aperture NA, na, numerical_aperture, obj_NA, objective_NA, objective_na
objective.model obj_name, objective_name, objective_model, objective
objective.immersion immersion, Immersion, objective_immersion, immersion_media, immersion_medium

microscope always resolves to at least "LifeCanvas SmartSPIM" — a SmartSPIM export was made on a LifeCanvas microscope by construction. Refractive-index shorthand ("1.52" / "1.52+") in the immersion field degrades to the OME "Other" enum value since OME has no cleared-tissue enum. Vendor-shape acquisition-date formats (YYYY_MM_DD_HHMMSS, YYYYMMDD_HHMMSS) are normalised to ISO 8601.

Metadata sidecar

The SmartSPIM acquisition software writes a JSON metadata file. It is Latin-1 encoded (Windows cp1252) because the SmartSPIM PC writes a raw µ byte (0xB5) into the µm/pix key. The parser reads with latin-1 for that reason; do not re-encode the file to UTF-8 before feeding it to the plugin — the key would be lost.

Place the metadata JSON at the top of the export directory. Any file matching metadata*.json is accepted (the vendor typically names it metadata_<sample-id>.json).

Why a separate package?

SmartSPIM ships its own on-disk shape (directory-of-channel-dirs, no bundled OME-XML, Latin-1 sidecar) that would not fit cleanly into zarrmony's built-in reader graph. See zarrmony ADR-0003 for the full rationale, and the reader-plugin authoring guide for how to build your own.

License

Apache-2.0. See LICENSE.

Download files

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

Source Distribution

zarrmony_smartspim-0.1.1.tar.gz (149.7 kB view details)

Uploaded Source

Built Distribution

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

zarrmony_smartspim-0.1.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file zarrmony_smartspim-0.1.1.tar.gz.

File metadata

  • Download URL: zarrmony_smartspim-0.1.1.tar.gz
  • Upload date:
  • Size: 149.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zarrmony_smartspim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3ba693e20c9888da52d5d39069ec7bcaa38b554daabd1e884d0da2dc75d6e340
MD5 8553fc40bc2b804fc56ea570888a7f43
BLAKE2b-256 03a8a24028ea28d17609b0bd4e302523a6178d03757fb3d75a5b7973477db3bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony_smartspim-0.1.1.tar.gz:

Publisher: release.yml on ferrinm/zarrmony-smartspim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarrmony_smartspim-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zarrmony_smartspim-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8043d0ec3d73bef96d9968d848c2548b0b9dae155eaf8ec4b79c6066388c8945
MD5 a793719fcf96b0dd912cf29795176415
BLAKE2b-256 4990b41c8d936dc85b1c4e54ba5d5f88a1916159e34cab525918d9915c1aae8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarrmony_smartspim-0.1.1-py3-none-any.whl:

Publisher: release.yml on ferrinm/zarrmony-smartspim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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