Add anterior/posterior/flat views and small colormaps (#91)#158
Merged
Conversation
Subset of #91 — takes the cleanly-licensed parts: - New view orientations in plotting.surface_plotting: anterior, posterior, flatL, flatR. Adds an inline note that flatL/flatR assume a pre-flattened mesh (camera angle alone doesn't flatten geometry). - New small categorical palettes eco_kos and spec_5 (ColorBrewer 5-step Spectral, Apache 2.0). - BuGyRd diverging colormap, but built programmatically by interpolating 5 control points with np.interp instead of hand-listing 256 RGB tuples. Same visual result, 4 lines instead of 256. Skipped from the original PR pending separate clarification: - fs_colours2 (FreeSurfer-derived 35-entry palette): non-BSD source license needs explicit credit/clearance before merging. Co-authored-by: Raul Cruces <rcruces@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subset of #91 — landing the cleanly-licensed parts.
Included
surface_plotting.py— four new view orientations:anterior,posterior,flatL,flatR. Added an inline note thatflatL/flatRassume a pre-flattened mesh.colormaps.py— three new palettes:eco_kos— categorical, 6-colorspec_5— 5-step Spectral from ColorBrewer 2.0 (Apache 2.0)BuGyRd— diverging blue→grey→red, built programmatically by interpolating 5 control points withnp.interp. Visually identical to the original 256-row hand-listed array, 4 lines instead of 256, far easier to review.tests/test_colormaps.py— registration, shape, alpha-channel, and smoothness checks.Skipped
fs_colours2(the 35-entry FreeSurfer-style palette). FreeSurfer's color LUT is under a non-BSD-compatible license; this needs explicit sourcing/clearance before it can ship in a BSD-3 package. Happy to revisit if @rcruces can confirm an independent source.@rcruces credited as Co-author on the squashed commit.
Test plan
pytest brainspace/tests/test_colormaps.py→ 3 passed.