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.6.0.tar.gz (201.1 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.6.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msw_io-1.6.0.tar.gz
  • Upload date:
  • Size: 201.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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.6.0.tar.gz
Algorithm Hash digest
SHA256 76fbfc5109931816892c49e8d40ad7f322947e51001dfd192fc044420f0fc34d
MD5 185a1d49addb819d78fc752cea2cd481
BLAKE2b-256 1ca47b2cfe4a22856862392c283de5025465ef10c42b637f45b42fded97e03f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msw_io-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50f5c866edea8df3f8d6997f9265c606b52ffa5072778bb4eeebdaf21d58c7b0
MD5 ac11559f84a91069b2571860d3389c24
BLAKE2b-256 df64b094e35ac6cc1887888de5261c56cde004beccdc6f3d8015495dc3c5556c

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