Skip to main content

warpxmlfile

Read and write Warp / M tilt-series XML files in Python, in the spirit of starfile and alnfile. The file is deserialised as written and serialised back byte for byte; nothing is interpreted (no units, signs, frames or grid evaluation). Geometry belongs to the consumers, e.g. torch-tilt-series.

Installation

pip install warpxmlfile

Reading

import warpxmlfile

ts = warpxmlfile.read("TS_001.xml")          # -> WarpTiltSeries (pydantic model)

ts.angles                                    # per-tilt float array, from <Angles>
ts.axis_offset_x, ts.axis_offset_y           # Angstroms, as written
ts.use_tilt                                  # bool array
ts.ctf["PixelSize"]                          # '1.7005' - <Param> values are kept as text
ts.grids["GridMovementX"].values             # float32, shape (Depth, Height, Width)
ts.attributes["ImageDimensionsAngstrom"]     # root attributes, verbatim

Editing and writing

Writing changes only the values you edited and leaves every other byte alone:

ts = warpxmlfile.read("TS_001.xml")
ts.axis_offset_x += 30.0                     # shift every tilt by 30 A
warpxmlfile.write(ts, "TS_001_shifted.xml")

Numbers are written as Warp writes them (shortest text that round-trips the 32-bit float). The same operations exist on the model: WarpTiltSeries.from_file, .from_string, .to_string, .to_file. Reading validates the file (per-tilt lengths, complete grids, unique Param names) and raises ValueError otherwise. Elements the model does not know are kept in ts.extra and preserved on write.

License

BSD 3-Clause.

Metadata

Release files for warpxmlfile 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 warpxmlfile 0.0.1
File Size Uploaded Provenance Actions
warpxmlfile-0.0.1.tar.gz 161.9 kB With provenance Details for warpxmlfile-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for warpxmlfile 0.0.1
File Interpreter ABI Platform Actions
warpxmlfile-0.0.1-py3-none-any.whl Python 3 none any Details for warpxmlfile-0.0.1-py3-none-any.whl

Total release size: 185.7 kB

Release files / warpxmlfile-0.0.1.tar.gz

Download URL warpxmlfile-0.0.1.tar.gz
Size 161.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b107bd54beb8f6a194a775fb499bacc1f9a6e528c62a5721d48d63eb2bab3563
BLAKE2b-256 checksum
How to use checksums
e8df30ac4b2110e3726b7c3d850905fc62c25015bd6c77115e4e6b99bcaa1879
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 22, 2026.

Transparency log

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

Download URL warpxmlfile-0.0.1-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74143887c6efef8152add863a67b45bd16d9884dc3705f960f47625ef9d7b904
BLAKE2b-256 checksum
How to use checksums
4ffa92e1707dd0c2847ecf5d39b72913af03fb1d6bf62bac58c2e23324124894
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 22, 2026.

Transparency log

Security for warpxmlfile 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for warpxmlfile-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 22, 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.

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