Skip to content

Commit e2f0421

Browse files
authored
Merge pull request #4 from liuzhenqi77/enh
2 parents 24ea05e + 5e28574 commit e2f0421

18 files changed

Lines changed: 2689 additions & 2024 deletions

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,8 @@ ENV/
9999
# Ruff
100100
.ruff_cache/
101101

102-
uv.lock
102+
uv.lock
103+
104+
# Claude code
105+
CLAUDE.local.md
106+
.claude/settings.local.json

docs/_static/theme_overrides.css

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,104 @@
1-
/* https://stackoverflow.com/questions/56195758/different-maxdepth-for-specific-entries-in-toctree-sphinx */
2-
.rst-content .toctree-wrapper:not(:last-child) ul {
3-
margin-bottom: 12px;
4-
}
1+
/* Layout tweaks */
2+
.wy-nav-content {
3+
max-width: 1200px !important;
4+
}
5+
6+
/* Make wide tables readable on desktop */
7+
@media screen and (min-width: 767px) {
8+
.wy-table-responsive table td {
9+
/* Prevent later stylesheets from re-wrapping cells */
10+
white-space: normal !important;
11+
}
12+
13+
.wy-table-responsive {
14+
overflow: visible !important;
15+
}
16+
}
17+
18+
/* Hide the hash icon that appears on hover in headings */
19+
.headerlink::after {
20+
font-size: 0;
21+
}
22+
23+
/* Call attention to API signatures */
24+
dl.py.function dt,
25+
dl.py.class dt,
26+
dl.py.method dt {
27+
background: #f8f8f8;
28+
padding: 8px;
29+
}
30+
31+
/* Paragraph readability */
32+
.wy-nav-content p {
33+
line-height: 1.5;
34+
}
35+
36+
/* Cleaner parameter/field lists */
37+
.rst-content dl.field-list {
38+
display: grid;
39+
grid-template-columns: max-content 1fr;
40+
gap: 0 1em;
41+
align-items: baseline;
42+
}
43+
44+
.rst-content dl.field-list > dd {
45+
align-self: center;
46+
}
47+
48+
/* Emphasize parameter names */
49+
.rst-content dl.field-list dt {
50+
font-weight: 600;
51+
color: #555;
52+
}
53+
54+
/* Signature parameter styling */
55+
.rst-content .sig-param .n {
56+
color: #333;
57+
}
58+
59+
.rst-content .sig-param .default_value {
60+
color: #666;
61+
}
62+
63+
/* Link styling */
64+
.rst-content a {
65+
color: #2980b9;
66+
}
67+
68+
.rst-content a:hover {
69+
color: #1a5276;
70+
}
71+
72+
/* Tighter list spacing inside field-list items */
73+
.rst-content dl.field-list dd ul li > p,
74+
.rst-content dl.field-list dd ul li > ul {
75+
margin-top: 0 !important;
76+
margin-bottom: 0 !important;
77+
}
78+
79+
/* Highlight the current page in the sidebar */
80+
.wy-menu-vertical li.current > a {
81+
background: #fcfcfc;
82+
border-left: 3px solid #2980b9;
83+
}
84+
85+
/* Inline code styling */
86+
.rst-content code.literal {
87+
background: #f0f0f0;
88+
padding: 2px 4px;
89+
border-radius: 3px;
90+
border: none;
91+
font-size: 85%;
92+
}
93+
94+
/* Code block styling */
95+
.rst-content div[class^="highlight"] {
96+
background: #f8f8f8;
97+
border-radius: 4px;
98+
}
99+
100+
.rst-content div[class^="highlight"] pre {
101+
font-size: 13px;
102+
line-height: 1.5;
103+
border-radius: 4px;
104+
}

docs/api.rst

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,32 @@ Support functions
5555

5656
.. _ref_images:
5757

58-
:mod:`neuromaps_mouse.images` - Image and surface handling
59-
----------------------------------------------------------
58+
:mod:`neuromaps_mouse.images` - Image processing
59+
-------------------------------------------------
6060
.. automodule:: neuromaps_mouse.images
6161
:no-members:
6262
:no-inherited-members:
6363

6464
.. currentmodule:: neuromaps_mouse.images
6565

66+
.. autosummary::
67+
:template: function.rst
68+
:toctree: generated/
69+
70+
parcellate_image
71+
register_image
72+
transform_image
73+
74+
.. _ref_io:
75+
76+
:mod:`neuromaps_mouse.io` - Image and surface handling
77+
------------------------------------------------------
78+
.. automodule:: neuromaps_mouse.io
79+
:no-members:
80+
:no-inherited-members:
81+
82+
.. currentmodule:: neuromaps_mouse.io
83+
6684
Functions to load the images and surfaces
6785

6886
.. autosummary::
@@ -91,15 +109,15 @@ Functions to load the images and surfaces
91109
plot_allenccfv3_lightbox
92110
plot_allenccfv3_3d
93111

94-
.. _ref_resampling:
112+
.. _ref_regions:
95113

96-
:mod:`neuromaps_mouse.resampling` - Resampling workflows
97-
--------------------------------------------------------
98-
.. automodule:: neuromaps_mouse.resampling
114+
:mod:`neuromaps_mouse.regions` - Region queries and alignment
115+
-------------------------------------------------------------
116+
.. automodule:: neuromaps_mouse.regions
99117
:no-members:
100118
:no-inherited-members:
101119

102-
.. currentmodule:: neuromaps_mouse.resampling
120+
.. currentmodule:: neuromaps_mouse.regions
103121

104122
.. autosummary::
105123
:template: function.rst
@@ -126,19 +144,5 @@ Functions to load the images and surfaces
126144
:toctree: generated/
127145

128146
correlation
147+
moran
129148

130-
.. _ref_transforms:
131-
132-
:mod:`neuromaps_mouse.transforms` - Transformations between spaces
133-
------------------------------------------------------------------
134-
.. automodule:: neuromaps_mouse.transforms
135-
:no-members:
136-
:no-inherited-members:
137-
138-
.. currentmodule:: neuromaps_mouse.transforms
139-
140-
.. autosummary::
141-
:template: function.rst
142-
:toctree: generated/
143-
144-
allenccfv3_to_allenccfv3

docs/installation.rst

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,61 @@ Installation and setup
99
Requirements
1010
============
1111

12-
TBD
12+
This package requires Python >= 3.8.
13+
14+
.. _installation_basic:
15+
16+
Basic installation
17+
==================
18+
19+
Assuming you have the correct version of Python installed, you can install
20+
`neuromaps-mouse` by opening a terminal and running the following:
21+
22+
.. code-block:: bash
23+
24+
git clone https://github.com/netneurolab/neuromaps-mouse.git
25+
cd neuromaps-mouse
26+
pip install .
27+
28+
.. _installation_optional:
29+
30+
Optional dependencies
31+
=====================
32+
33+
Some functionality in neuromaps-mouse requires additional dependencies.
34+
35+
Pyvista
36+
-------
37+
38+
Pyvista is the plotting library used in the package for 3D surface visualization.
39+
This will allow you to use functions like
40+
41+
* :func:`neuromaps_mouse.plotting.plot_allenccfv3_3d`
42+
43+
You will need a working Pyvista installation. We recommend using a clean conda
44+
environment and installing Pyvista using the following commands:
45+
46+
.. code-block:: bash
47+
48+
conda create -n plotting python=3.12
49+
conda activate plotting
50+
conda install -c conda-forge pyvista
51+
52+
Pyvista is actively maintained and generally installs without issues. Please
53+
also check out their `detailed installation guide <https://docs.pyvista.org/getting-started/installation.html>`_.
54+
55+
Pyvista is built on top of VTK, which supports multiple OpenGL window backends
56+
and you can choose one that fits your environment (see the `VTK runtime settings <https://docs.vtk.org/en/latest/advanced/runtime_settings.html>`_):
57+
58+
* **X11**: standard Linux display server (requires an active X server)
59+
* **Win32**: native Windows OpenGL context
60+
* **EGL**: offscreen GPU context (good for headless servers with GPUs)
61+
* **OSMesa**: CPU-based software rendering (good for headless servers without GPUs)
62+
63+
For example, on a headless Linux server without a GPU you can request OSMesa by
64+
setting the backend before importing PyVista/VTK:
65+
66+
.. code-block:: python
67+
68+
import os
69+
os.environ["VTK_DEFAULT_OPENGL_WINDOW"] = "vtkOSOpenGLRenderWindow"

0 commit comments

Comments
 (0)