Light Mastodon project file reader for Python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file micro_mastodon_reader-1.1.0.tar.gz.
File metadata
- Download URL: micro_mastodon_reader-1.1.0.tar.gz
- Upload date:
- Size: 377.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81a7c690541276f5792b9d3c8a54857d1ee54f3d73e2a22a85c4dc2773dbc6f2
|
|
| MD5 |
ace456912d4aa9e164bb8e34ca3a59be
|
|
| BLAKE2b-256 |
d161d8888547a994caa8270a66805b13804a8d675b7074e2732d01776e29c47c
|
File details
Details for the file micro_mastodon_reader-1.1.0-py3-none-any.whl.
File metadata
- Download URL: micro_mastodon_reader-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8565a1fc103169c14637d8f85052aaa0ec67e03666e5638ec206080e00877de6
|
|
| MD5 |
1a93d058af8e693ba8a66533bad85cf2
|
|
| BLAKE2b-256 |
9da1b8881bf6491fafa316b27c458c20f8c72228f4bff42857a5808b0cb9def5
|