-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathparams.py
More file actions
79 lines (64 loc) · 2.18 KB
/
params.py
File metadata and controls
79 lines (64 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import pathlib
import matplotlib
import numpy as np
repoPath = pathlib.Path.cwd()
root = pathlib.Path(r"C:\data\monkey-data")
# root_4_linux = pathlib.Path("/data/monkey-data")
figPath = repoPath / "figures"
LargeFig = (7, 8)
MedFig = (4.3, 4.3)
from monkey import defs as monkey_defs
rng = np.random.default_rng(np.random.SeedSequence(12345))
n_iter = 100
def set_rc_params(dictArg: dict = {}):
matplotlib.rcParams["backend"] = "PDF"
matplotlib.rcParams["lines.markersize"] = 4
matplotlib.rcParams["xtick.major.pad"] = 1
matplotlib.rcParams["ytick.major.pad"] = 1
matplotlib.rcParams["axes.labelpad"] = 2
matplotlib.rcParams["axes.titlepad"] = 5
matplotlib.rcParams["font.size"] = 8
matplotlib.rcParams["axes.titlesize"] = 8
matplotlib.rcParams["axes.labelsize"] = 8
matplotlib.rcParams["xtick.labelsize"] = 6.5
matplotlib.rcParams["ytick.labelsize"] = 6.5
matplotlib.rcParams["legend.fontsize"] = 6.5
matplotlib.rcParams["legend.title_fontsize"] = 6.5
matplotlib.rcParams["text.usetex"] = True
matplotlib.rcParams["font.family"] = "sans-serif"
matplotlib.rcParams["font.serif"] = "Helvetica"
matplotlib.rcParams["legend.frameon"] = False
matplotlib.rcParams["legend.fancybox"] = False
matplotlib.rcParams["figure.dpi"] = 300
for key, val in dictArg.items():
matplotlib.rcParams[key] = val
class panels:
"sizes of different panels in the paper"
TinyH = 0.5
SmallH = 1.2
MedH = SmallH + TinyH
BigH = 3
schmatic = (2, MedH)
raster = (2.4, SmallH)
velocity = (LargeFig[0] - schmatic[0], TinyH)
proj_3d_align = (LargeFig[0], SmallH)
cca = (1.5, SmallH)
cca_hist = (2, SmallH)
rnn_raster = (2, SmallH)
rnn_velocity = (2, TinyH)
rnn_cca = (1.5, MedH - 0.2)
rnn_cca_hist = (2, MedH - 0.2)
class colors:
"colors for different data types in the paper"
MouseM1 = "tab:blue"
MouseStr = "tab:orange"
MainCC = "r"
LowerCC = "k"
UpperCC = "cornflowerblue"
Sim1CC = "cornflowerblue"
Sim2CC = "palevioletred"
SimAcrossCC = "indigo"
MonkeyPts = "xkcd:brown"
MousePts = "xkcd:violet"
LeftTrial = (0, 1, 0, 1)
RightTrial = (1, 0, 0, 1)