The part you can try today

swell-ruler: a proposed chicken-muscle ruler, untested on real images

You don't need the SWELL machine to try its ruler. A lab that already does expansion microscopy could expand a few chicken myofibrils alongside its samples, image them before and after on its own microscope, and get the axial expansion factor of each myofibril long enough to measure (on the separately built test gel, 28% of the true pairs got one), a whole-gel strain map and QC flags (which on that gel caught none of the under- and over-expanded patches). One small Python package, free, no account. It is one more member of a family of in-gel rulers (sarcomeres in Sheard et al. 2019, the GelMap grid of Damstra et al. 2023, nuclear pores, photobleached patterns), not a new kind of QC; no journal-grade test of it exists yet.

The separately built test gel, as its builder scored itresult
gel-mean axial error (median)−0.14% (−0.01%)
per-myofibril axial RMS, on the pairs that got a ratio1.8% · 28%
transverse ruler bias−17.8%
under- and over-expanded patches flagged0% · 0%

Install and try

python -m pip install "swell-ruler[images,figures] @ https://x-wow.com/downloads/swell_ruler-0.1.2-py3-none-any.whl"
python -m swell_ruler demo

SHA-256 of swell_ruler-0.1.2-py3-none-any.whl, to check a downloaded copy: f3709576545a05b6dc9dd0ef05ae89bf58f7cc9c9b12fa46f3a9f8eb928e126d

The demo draws a synthetic before/after pair with a planted under-expanded patch, measures it and scores each check PASS or FAIL. Today it passes the axial factor and fails the transverse factor and the patch: the same weak spots the separately built gel found. Then run it on your own pair, with your own measured blur widths (PSFs):

python -m swell_ruler images pre.tif post.tif --px-pre 0.194 --px-post 0.194 --e-macro 4.5 --pre-mode dpc --psf-pre 0.55 --psf-post 0.41

Needs Python 3.9+ (NumPy, SciPy and Pillow come with it). It is not on PyPI, so install it from this link or from the SWELL download, which has the source, tests and data format.

What it reports

  • Axial factor per myofibril: post ÷ pre sarcomere period, fitted on the post image's own Z-disc ladder. On the separately built gel the gel-level average held up; per-myofibril precision did not (1.8% RMS).
  • Transverse factor: post ÷ pre width. Biased on that gel by a blur shape it does not model, even with the right blur widths.
  • Landmark factor: from neighbours' positions, no calibration needed.
  • Maps and flags: local expansion, fibril vs gel, gel stretch, tears and folds, places with no partner. On that gel they caught the bubble and most of the fold, but none of the under- or over-expanded patches.
  • Anisotropy is reported only beyond ±1%, and no call is made while the transverse and landmark rulers disagree by more than 3%.
  • No expansion yet? stripes checks whether your label-free images carry enough striation contrast (go if q ≥ 1.2, rescaled to 0.194 µm pixels; q is read from the image's noise, so smoothed images, such as JPEGs or frames from a colour camera, read too high).

simulated Tested on synthetic gels only, including a synthetic gel built separately from the analysis code (see Tested harder). It has never seen a real micrograph, and its image front-end is deliberately simple, so check what it detects. Before anyone should trust it: real before/after gels in two chemistries, agreement with an independent in-gel reporter such as a GelMap grid in the same gel, and a fresh blind test.