Skip to content

NF Add Blue/Purple/Red/Orange/Green colormap#395

Merged
TomDLT merged 1 commit intomainfrom
nf/bprog-colormap
Jun 29, 2021
Merged

NF Add Blue/Purple/Red/Orange/Green colormap#395
TomDLT merged 1 commit intomainfrom
nf/bprog-colormap

Conversation

@mvdoc
Copy link
Contributor

@mvdoc mvdoc commented Jun 25, 2021

Example
image

@cchen23
Copy link
Contributor

cchen23 commented Jun 27, 2021

The color blocks seem a bit vertically mis-aligned to me (both in the example and in the actual PNG) -- is that the case, or is it an illusion that they are mis-aligned?

@cchen23
Copy link
Contributor

cchen23 commented Jun 27, 2021

Also, do we have any procedure for deciding what colormaps to add to pycortex, or do we just add whichever colormaps people would like to add?

@mvdoc
Copy link
Contributor Author

mvdoc commented Jun 28, 2021

The color blocks seem a bit vertically mis-aligned to me (both in the example and in the actual PNG) -- is that the case, or is it an illusion that they are mis-aligned?

It's an illusion. Each color has 51 pixels. This is how the colormap was generated

import numpy as np
new_colors = np.array([
    [0, 138, 255, 255], # Blue
    [186, 16, 255, 255], # Violet
    [255, 23, 36, 255], # Red
    [255, 108, 1, 255], # Orange
    [151, 214, 1, 255], # Lime green
])/255.

new_colormap = np.repeat(new_colors[None], 51, axis=1)
# new_colormap.shape = (1, 255, 4)

I don't think we have any formal decision process. It's fairly easy to use custom colormaps, and the user can specify their own colormap directory (but this should probably be better documented).

@cchen23
Copy link
Contributor

cchen23 commented Jun 28, 2021 via email

@cchen23
Copy link
Contributor

cchen23 commented Jun 28, 2021 via email

@TomDLT
Copy link
Contributor

TomDLT commented Jun 29, 2021

Either way, though, this PR seems fine to me. I think determining how to organize the colormaps/which colormaps to add should be a separate discussion.

I agree, let's merge this PR.

Maybe we could have some section on the pycortex documentation page that organizes the colormaps somehow

I agree, at least we could have a short page describing a small number of good default choices.

@TomDLT TomDLT merged commit b680d32 into main Jun 29, 2021
@mvdoc mvdoc deleted the nf/bprog-colormap branch December 6, 2021 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants