Overview
This is a python module for interfacing with Leica LAS AF/X Matrix Screener experiments.
The module can be used to:
stitch wells from an experiment exported with the LAS AF Data Exporter
batch compress images lossless
programmatically select slides/wells/fields/images given by attributes like
slide (S)
well position (U, V)
field position (X, Y)
z-stack position (Z)
channel (C)
Features
Access experiment as a python object
Compress to PNGs without loosing precision, metadata or colormap
ImageJ stitching (Fiji is installed via fijibin)
Installation
Install using pip…
pip install leicaexperiment
Examples
stitch experiment
from leicaexperiment import Experiment
# path should contain AditionalData and slide--S*
experiment = Experiment('path/to/experiment')
# if path is omitted, experiment path is used for output files
stitched_images = experiment.stitch('/path/to/output/files/')
# get information about placement of images in the stitch
xs, ys, attrs = experiment.stitch_coordinates(well_x=0, well_y=0)
stitch specific well
from leicaexperiment import stitch
stitched_images = stitch('/path/to/well')
do stuff on all images
from leicaexperiment import Experiment
experiment = Experiment('path/to/experiment--')
for image in experiment.images:
do stuff...
do stuff on specific wells/fields
from leicaexperiment import Experiment
from PIL import Image
experiment = Experiment('path/to/experiment--')
# on images in well --U00--V00
for well in experiment.well_images(0, 0):
do stuff...
# rotate top left image in first row
rows = experiment.well_rows
for r in rows:
img_path = experiment.image(r, 0, 0, 0)
img = Image.open(img_path)
img = img.rotate(90)
img.save(img_path)
subtract attributes from file names
from leicaexperiment import attribute
# get all channels
channels = [attribute(image, 'C') for image in experiment.images]
min_ch, max_ch = min(channels), max(channels)
batch lossless compress of experiment
from leicaexperiment import Experiment
e = Experiment('/path/to/experiment')
pngs = e.compress()
print(pngs)
API reference
API reference is at http://leicaexperiment.rtfd.org.
Development
Install dependencies and link development version of leicaexperiment to pip:
git clone https://github.com/arve0/leicaexperiment
cd leicaexperiment
pip install -r requirements.txt
run test
pip install tox
tox
extra output, jump into pdb upon error
DEBUG=leicaexperiment tox -- --pdb -s
build api reference
pip install -r docs/requirements.txt
make docs
Metadata
Release files for leicaexperiment 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| leicaexperiment-0.2.0.tar.gz | 1.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| leicaexperiment-0.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 1.3 MB
Release files / leicaexperiment-0.2.0.tar.gz
| Download URL | leicaexperiment-0.2.0.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78cda68457d79ce09d65159f97588b1920f2b8fd9528608c52847e0c80772632
|
|
BLAKE2b-256 checksum How to use checksums |
5863d3abf11d82be400633385e18962c0dc48f33eafc83cc2b1d4e44d1e81b8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / leicaexperiment-0.2.0-py2.py3-none-any.whl
| Download URL | leicaexperiment-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
22824af7bf5a17323a28d7343f99acdfd01444c5215b0ea44b5c591fd9ca36cd
|
|
BLAKE2b-256 checksum How to use checksums |
d58793d65217ef326ee95e42eb39a33c7803e1b45b83b4c53296303b7c6181d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |