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.9.0.tar.gz (214.4 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.9.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msw_io-1.9.0.tar.gz
  • Upload date:
  • Size: 214.4 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.9.0.tar.gz
Algorithm Hash digest
SHA256 45cf8c94052f0b24b9b48efe718fef1e488570ddb8d92e29b647d9b715a6ad72
MD5 d6c4de1c6cb9871dba532d7a6732a4b4
BLAKE2b-256 c7de246a1d5564c8f0b33a5b185768acb985d127b94fbe145019f210f8d6eb4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msw_io-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b216e318a690443bd173c8b04770b725b519b9383ab194efbbe75fff6e60f7e
MD5 c1a4baf38ab0f047d3b3e5721fda17e5
BLAKE2b-256 8aafaa618efe25178c317960efe33af99963463c3b70d62b90a7d66e9d9891a7

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