Skip to main content

Murine Shift Work session data IO: file codec, namespace utilities, and session readers.

Project description

msw-io

PyPI

Murine Shift Work session data IO: file codec, namespace utilities, and session readers.

Provides a lean, installable library for reading and writing MSW session data without requiring the full murineshiftwork acquisition stack. Install it in analysis environments where you only need to load sessions, not run them.

Key features

  • Session readers - load MSW session data (JSONL, PKL, YAML) into structured MswSession models
  • Namespace utilities - build and parse MSW session paths from the canonical subject__datetime__task spec
  • IO codec - save and load trial data with numpy/tuple encoding
  • Standalone - no dependency on the murineshiftwork acquisition stack

Installation

pip install msw-io

Quick start

from murineshiftwork.readers import load_session

session = load_session("/data/mouse_01/session__20260514_143022_123456__gonogo")
print(session.subject, session.task, session.n_trials)

Load an entire acquisition (all sessions in a container directory):

from murineshiftwork.readers import load_acquisition

sessions = load_acquisition("/data/mouse_01/session__20260514_143022_123456__session_gonogo")
for s in sessions:
    print(s.basename, s.is_complete)

Generate session paths for a new recording:

from murineshiftwork.namespace import generate_session_paths

paths = generate_session_paths("mouse_01", "gonogo", "/data", printout=False)
print(paths["session_folder"])

Documentation

Full documentation including API reference: https://murineshiftwork.github.io/msw-io

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

msw_io-1.8.0.tar.gz (210.2 kB view details)

Uploaded Source

Built Distribution

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

msw_io-1.8.0-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file msw_io-1.8.0.tar.gz.

File metadata

  • Download URL: msw_io-1.8.0.tar.gz
  • Upload date:
  • Size: 210.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for msw_io-1.8.0.tar.gz
Algorithm Hash digest
SHA256 16763b5ea91180e6bfa0fda77ababfe024154935c24ccaeb96f1ed34f8a34476
MD5 4a4547e1b76fb06983f8cfc687791bff
BLAKE2b-256 8c5715746959c58c12b679369afc1988c2b056a0e92b85877efa8a50f8664310

See more details on using hashes here.

File details

Details for the file msw_io-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: msw_io-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for msw_io-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f6f6c4d1e680f9eeea197876ce39848707a56a378798476995e2f269586b0b
MD5 23cde181b9f79a9bec23da5775413a98
BLAKE2b-256 d2075b76d8fff369a7f4eda9bca0164adf4fe30977dbe71a1789ad836f7b3fdf

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