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.2.1.tar.gz (197.9 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.2.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msw_io-1.2.1.tar.gz
  • Upload date:
  • Size: 197.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2.1.tar.gz
Algorithm Hash digest
SHA256 f41af6fda3029dd2de5219bec6f45f4dd9ae1472b811757fa10fb85f9b5f6790
MD5 53e7459033b87e4881472e2bbcdd31b7
BLAKE2b-256 fea3d3367892624c559f688cf873247c550f78c524e8b6b69131a2092af49e50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msw_io-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33608ed2c7057c4de6797c7ad66180ac3d1015b9e05d8867d5fe54ea6c5fe2ce
MD5 f3b72a6337ba59787ca91d70989afe9b
BLAKE2b-256 d9eff4bd0d67b3c6e2f01915a4faf74b4cbf043ebfda966fd865e875650665d0

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