This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
PySCNSlice
Automated analysis of bioluminescence and fluorescence time-lapse recordings from organotypic suprachiasmatic nucleus (SCN) slices.
The SCN is the master circadian pacemaker of the anterior hypothalamus. Kept alive as an organotypic slice and imaged for days, it reports its own timekeeping as a movie. PySCNSlice turns those movies into per-cell and whole-tissue rhythm measurements.
What is here
The first step, and the one that usually costs a person an afternoon with a mouse: finding the tissue. One call reads a registered recording, draws the accepted two-lobe outline, rotates it so both lobes sit the same way up in every recording, and writes a square crop centred on the outline — with no hand-drawn region of interest anywhere in the chain.
from pyscnslice import automatic_scn_outline
result = automatic_scn_outline(
"meanred_MCG_04_1_595.tif",
valid_mask="validfield_MCG_04_1_595.tif",
output_dir="out",
)
result["output"] # the two-lobe label image, oriented
result["cropped_output"] # standard square crop around the SCN centre
result["report"] # every setting, hash and measurement of that run
A registered ImageJ or OME hyperstack works as well as a two-dimensional time mean.
scn_channel picks the outline channel and scn_z the depth plane, both using
one-based ImageJ numbering; scn_time is "mean" (the default), "max", or a
one-based frame number such as 320. Whichever plane is chosen determines one
orientation and one crop, which are then applied to every plane in the stack.
Crops are "tight", "standard" (the default), "wide", or an exact
crop_size_px. Every preset is checked to keep every outline pixel, and a custom
size that would cut the outline is refused rather than silently clipped.
The method is frozen
The outline is accepted Round 6 attempt 7 and the orientation accepted Round 9 attempt 6, from the Cry1-DIO-dLuc red-channel tuning project. The public settings retain the accepted pixel values, because six declared attempts to simplify or normalise them failed the truth, shape or generalisation gates — a shorter interface would have meant a less portable method, not a tidier one.
tests/test_automatic_scn_outline_parity.py compares output bytes against ten
accepted fields rather than comparing behaviour. That evidence lives in the governed
tuning project rather than in this repository; point PYSCNSLICE_TUNING_ROOT at it to
run those tests, and without it they skip while the synthetic crop, orientation and
input-safety tests still run.
Install
pip install pyscnslice
Only numpy, scipy and tifffile. No plotting stack, no web framework, no audit layer: outlining a slice should not install any of them.
Where this came from
These modules lived in PyMicroglia until
2026-08-23. Nothing about outlining a suprachiasmatic nucleus concerns microglia, and
the code was already a leaf — nothing in that package imported it. PyMicroglia keeps
the automatic_scn_outline action, which now delegates here:
pip install "PyMicroglia[scn]"
Where this is going
PySCNSlice is the SCN layer of an automated Incucyte-to-rhythm pipeline: download,
find the SCN, crop, register and trace, test the rhythm, render videos. See
docs/automated-scn-pipeline.md for which package
owns which step and why.
License
MIT.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyscnslice-0.1.0.tar.gz.
File metadata
- Download URL: pyscnslice-0.1.0.tar.gz
- Upload date:
- Size: 91.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ccfa825b4b658eb9e3775d018e014ed6aeecf869b59a3626d08a2ec0cf1fc41
|
|
| MD5 |
8ee6bf2522a266739b6a453567d765e0
|
|
| BLAKE2b-256 |
9e159e5c384724a27dc34ae359399d045ea4c3ab7daee811f9d5c98e8f2e2323
|
Provenance
The following attestation bundles were made for pyscnslice-0.1.0.tar.gz:
Publisher:
release.yml on Jay2owe/PySCNSlice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscnslice-0.1.0.tar.gz -
Subject digest:
7ccfa825b4b658eb9e3775d018e014ed6aeecf869b59a3626d08a2ec0cf1fc41 - Sigstore transparency entry: 2571690475
- Sigstore integration time:
-
Permalink:
Jay2owe/PySCNSlice@4105e2a7ff6e64d0ab2e015e3566f246f0b55755 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Jay2owe
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4105e2a7ff6e64d0ab2e015e3566f246f0b55755 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyscnslice-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyscnslice-0.1.0-py3-none-any.whl
- Upload date:
- Size: 89.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe473fbf217d6051bd892f05a7f1a3dc8158a69cc54ae32cc4cb598d179f463e
|
|
| MD5 |
bd7bae9f3646b8cfa3c57964650bee7a
|
|
| BLAKE2b-256 |
236b14d9e35e98c10cb416e386d8ad70adb48a3dc82a5664f697d012dbb7ed22
|
Provenance
The following attestation bundles were made for pyscnslice-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Jay2owe/PySCNSlice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscnslice-0.1.0-py3-none-any.whl -
Subject digest:
fe473fbf217d6051bd892f05a7f1a3dc8158a69cc54ae32cc4cb598d179f463e - Sigstore transparency entry: 2571690487
- Sigstore integration time:
-
Permalink:
Jay2owe/PySCNSlice@4105e2a7ff6e64d0ab2e015e3566f246f0b55755 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Jay2owe
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4105e2a7ff6e64d0ab2e015e3566f246f0b55755 -
Trigger Event:
push
-
Statement type: