Skip to main content

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 id int_id
  • spots[int_id, 0] is the x coordinate of the cell int_id
  • spots[int_id, 1] is the y coordinate of the cell int_id
  • spots[int_id, 2] is the z coordinate of the cell int_id
  • spots[int_id, 3] is the time of the cell int_id
  • spots[int_id, 3:10] are the values of the elongation matrix representing the cell int_id sphere
  • spots[int_id, 10] is the bsrs (??) of int_id

links is a numpy.ndarray where:

  • links[int_pos] is an edge
  • links[int_pos, 2] is the id of the edge
  • links[int_pos, 0] is the id of the cell at time t
  • links[int_pos, 1] is the id of the cell at time t + 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micro_mastodon_reader-1.0.0.tar.gz (377.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micro_mastodon_reader-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file micro_mastodon_reader-1.0.0.tar.gz.

File metadata

  • Download URL: micro_mastodon_reader-1.0.0.tar.gz
  • Upload date:
  • Size: 377.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for micro_mastodon_reader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 952963c90f4f065fee032887ad916b2e13a8245970b7513eb37e336df71dad92
MD5 7c57f55db1c49cc6ff77cb73a01bba10
BLAKE2b-256 fbf5a681af2512372eb3ca91359aea8d0d6e9b3f19480375c1e93bb72736f957

See more details on using hashes here.

File details

Details for the file micro_mastodon_reader-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for micro_mastodon_reader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26fe2a96065426b64d46845d6421466a3c0e5bb4a67881a6e1b70bf82e76267c
MD5 aca6931e74a4e97cee5f3c38863e351e
BLAKE2b-256 71ed13e91bc2561d27833c58d60eef4c7dbe778bf29efc47bab1f8e004b657b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page