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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msw_io-1.2.0.tar.gz
  • Upload date:
  • Size: 198.0 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.0.tar.gz
Algorithm Hash digest
SHA256 d46bbc0a61d456a2787e17e4dccf98abff4409f7493851c938bc510638465ed2
MD5 17de7dffb970c1fe2acf522786e79539
BLAKE2b-256 0efecd5080055202ad08372110541658408763e561a2ab1d8c0450bdb9e9df04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msw_io-1.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6416a06127125c7466233500c65c1aab1b711e53f5fc01def79484ce63ef8ffb
MD5 5e6a7d46c2d1e626add6aa5fa7746281
BLAKE2b-256 547f8f53dab1bb79750fec9c7c260e5f60ae386837e6248a7778276456e44730

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