Package: matrixscreener
DEPRECIATEDThis software has been split up in smaller modules:leicacam: Communicate with
Leica microscopes over CAM TCP/IP socket.leicaexperiment: Read
Leica LAS Matrix Screener experiments (output from scans).leicascanningtemplate:
Read Leica matrix screener scanning templates (define wells etc).leicaautomator: Attempt
at fully automating a microscope scan.matrixscreenerThis is a python module for interfacing withLeica LAS AF/X Matrix
Screener. It can read experiments and communicate with the microscope
over network.The module can be used to:stitch wells from an experiment exported with theLAS AF Data
Exporterbatch compress images losslessprogrammatically select slides/wells/fields/images given by
attributes likeslide (S)well position (U, V)field position (X, Y)z-stack position (Z)channel (C)read experiment data from OME-XMLThe module is developed on Mac OS X, but should work on Linux and
Windows too. If you find any bugs, please report them as anissueon
github. Pull request are also welcome.FeaturesAccess experiment as a python objectCompress to PNGs without loosing precision, metadata or colormapImageJ stitching (Fiji is installed viafijibin)Communicate with microscope over CAM TCP/IP socketInstallpip install matrixscreenerExamplesstitch experimentimportmatrixscreener# create short handExperiment=matrixscreener.experiment.Experiment# path should contain AditionalData and slide--S*scan=Experiment('path/to/experiment')print(matrixscreener.imagej._bin)# Fiji installed via package fijibinmatrixscreener.imagej._bin='/path/to/imagej'# if path is omitted, experiment path is used for output filesstitched_images=experiment.stitch('/path/to/output/files/')stitch specific wellfrommatrixscreenerimportexperiment# path should contain AditionalData and slide--S*stitched_images=experiment.stitch('/path/to/well')do stuff on all imagesfrommatrixscreenerimportexperimentscan=experiment.Experiment('path/to/experiment--')forimageinscan.images:dostuff...do stuff on specific wells/fieldsfrommatrixscreenerimportexperiment# select specific partsselected_wells=[wellforwellinscan.wellsif'U00'inwell]forwellinselected_wells:dostuff...defcondition(path):x_above=experiment.attribute(path,'X')>1x_below=experiment.attribute(path,'X')<5returnx_aboveandx_belowselected_fields=[fieldforfieldinscan.fieldsifcondition(field)]forfieldinselected_fields:dostuff..subtract datafrommatrixscreener.experimentimportattribute# get all channelschannels=[attribute(image,'C')forimageinscan.images]min_ch,max_ch=min(channels),max(channels)communicate with microscopefrommatrixscreener.camimportCAMcam=CAM()# initiate and connect, default localhost:8895# some commands are created as short hands# start matrix scanresponse=cam.start_scan()print(response)# but you could also create your own command with a list of tuplescommand=[('cmd','enableall'),('value','true')]response=cam.send(command)print(response)# or even send it as a bytes string (note the b)command=b'/cmd:enableall /value:true'response=cam.send(command)print(response)batch lossless compress of experimentimport matrixscreener as ms

e = ms.experiment.Experiment('/path/to/experiment')
pngs = ms.experiment.compress(e.images)
print(pngs)See alsothis
notebook.Developgit clone https://github.com/arve0/matrixscreener.git
cd matrixscreener
# hack
./setup.py installTestingpip install tox
toxspecific test, here compression testpip install pytest numpy
py.test -k compression tests/test_experiment.pyspecific test with extra output, jump into pdb upon errorDEBUG=matrixscreener py.test -k compression tests/test_experiment.py --pdb -sAPI ReferenceAll commands should be documented in docstrings innumpy
format.API reference is availableonline, can be read withpydocor any
editor/repl that does autocomplete with docstrings.In example:pydoc matrixscreener
pydoc matrixscreener.cam
pydoc matrixscreener.experiment
pydoc matrixscreener.imagejRelease procedureCreate.pypircif missing.[distutils]
index-servers=
        pypi
        pypitest

[pypitest]
repository = https://testpypi.python.org/pypi
username = username
password = password

[pypi]
repository = https://pypi.python.org/pypi
username = username
password = passwordUpdatechangelog.mdUpdate version in__init__.py,setup.pyanddoc/conf.pyGit commit and tag version./generate-rst.sh(pandoc needed)Stage release:python setup.py sdist bdist_wheel upload-rpypitestRelease:python setup.py sdist bdist_wheel upload