Light Mastodon Reader for Python
This is a lighter version of Mastodon Reader for Python from Chrisoph Sommer.
Import the spots and links tables, features, tags and meta data from a Mastodon project file.
Ported to Python from: matlab-mastodon-importer
This reader is lighter mainly because it does not depend on pandas nor on networkx and it therefore only depends on numpy.
Example
Read the mastodon file:
from micromastodonreader import MicroMastodonReader
mr = MicroMastodonReader("demo/demo.mastodon")
# show meta data
meta_data = mr.read_metadata()
# read spot and link tables with features and tags columns
spots, links, tag_definition, features = mr.read(tags=True, features=True)
spots is a numpy.ndarray where:
spots[int_id]is the cell with idint_idspots[int_id, 0]is thexcoordinate of the cellint_idspots[int_id, 1]is theycoordinate of the cellint_idspots[int_id, 2]is thezcoordinate of the cellint_idspots[int_id, 3]is the time of the cellint_idspots[int_id, 3:10]are the values of the elongation matrix representing the cellint_idspherespots[int_id, 10]is thebsrs(??) ofint_id
links is a numpy.ndarray where:
links[int_pos]is an edgelinks[int_pos, 2]is the id of the edgelinks[int_pos, 0]is the id of the cell at timetlinks[int_pos, 1]is the id of the cell at timet + 1
tag_definition and features are a bit more complicated 🫠
You can also read information separately
# read only spot and link tables
spots, links = mr.read_tables()
# read tag_definition
tag_definition = mr.read_tags()
# read features
mr.read_features()
Installation
Current version
pip install git+git://github.com/GuignardLab/python-mastodon-importer-light
pip
pip install micro-mastodon-reader
more information on PyPi
Metadata
Release files for Micro-Mastodon-Reader 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| micro_mastodon_reader-1.1.1.tar.gz | 377.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| micro_mastodon_reader-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 387.0 kB
Release files / micro_mastodon_reader-1.1.1.tar.gz
| Download URL | micro_mastodon_reader-1.1.1.tar.gz |
|---|---|
| Size | 377.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8136b3079b956746cbc5a5121f7df5e872c94eabdd7e00c5f23a568dbff921c6
|
|
BLAKE2b-256 checksum How to use checksums |
f4eef01771e11bc1401288c5af8ad7d55c09501e9e34b65c7195f50026cdba8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / micro_mastodon_reader-1.1.1-py3-none-any.whl
| Download URL | micro_mastodon_reader-1.1.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
baa9d16542770dec0a8c12daa5dd6f8d5ea8f56508706c6b4309c5508b8cf9a7
|
|
BLAKE2b-256 checksum How to use checksums |
039df79e681f33353cb2d7e14643efcc5d745fbed5a8d266b74f33528ebbc039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|