Skip to content

Commit 90c25ac

Browse files
committed
bump overleaf loc
1 parent 2b23fbf commit 90c25ac

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "overleaf"]
22
path = overleaf
3-
url = ./overleaf
3+
url = https://git.overleaf.com/624333a7419a0302a1f6e362

overleaf

Submodule overleaf updated from 31ddb2b to a1af8dc

pkg/pkg/io/io.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,23 @@ def glue(name, var, filename, figure=False, display=False, form=None):
7070
if figure:
7171
savename = "fig:" + savename
7272
else:
73+
# JSON
7374
with open(RESULTS_PATH / "glued_variables.json", "r") as f:
7475
variables = json.load(f)
75-
7676
# numpy types are not json serializable
7777
if isinstance(var, np.generic):
7878
var = var.item()
79-
8079
variables[savename] = var
81-
8280
with open(RESULTS_PATH / "glued_variables.json", "w") as f:
8381
json.dump(variables, f)
8482

83+
# TXT
84+
text = ""
85+
for key, val in variables.items():
86+
text += key + " " + str(val) + "\n"
87+
with open(RESULTS_PATH / "glued_variables.txt", "w") as f:
88+
f.write(text)
89+
8590
default_glue(savename, var, display=display)
8691

8792
if form == "pvalue":
@@ -90,6 +95,8 @@ def glue(name, var, filename, figure=False, display=False, form=None):
9095
else:
9196
factor = int(np.ceil(np.log10(var)))
9297
var = r"${<}10^{" + str(factor) + r"}$"
98+
elif form == "long":
99+
var = f"{var:,}"
93100

94101
if form is not None:
95102
glue(

scripts/connectomes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def get_hemisphere_indices(nodes):
7676
for dataset in datasets:
7777
adj, nodes = load_split_connectome(dataset)
7878
n_nodes = len(nodes)
79-
glue(f"{dataset}_n_nodes", n_nodes)
79+
glue(f"{dataset}_n_nodes", n_nodes, form="long")
80+
n_edges = np.count_nonzero(adj)
81+
glue(f"{dataset}_n_edges", n_edges, form="long")
8082
if RERUN_SIMS:
8183
left_inds, right_inds = get_hemisphere_indices(nodes)
8284
n_side = len(left_inds)
@@ -246,7 +248,7 @@ def draw_significance(x, xdist, y=1.02, ydist=0.03):
246248
[x - xdist, x - xdist, x + xdist, x + xdist],
247249
[y, y + ydist, y + ydist, y],
248250
color="dimgrey",
249-
clip_on=False
251+
clip_on=False,
250252
)
251253
ax.text(x, y, "*", ha="center", va="bottom", fontsize="large")
252254

@@ -259,5 +261,3 @@ def draw_significance(x, xdist, y=1.02, ydist=0.03):
259261
ax.set_ylim((ax.get_ylim()[0], 1))
260262

261263
gluefig("match_accuracy_comparison", fig)
262-
263-
# %%

shell/copy_results.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(cd bgm/overleaf && git pull)
22
rsync -r --max-size=49m ./bgm/results/figs ./bgm/overleaf
33
# python ./bgm/docs/unglue_variables.py
4-
# rsync ./bgm/docs/glued_variables.txt ./bgm/overleaf
4+
rsync ./bgm/results/glued_variables.txt ./bgm/overleaf
55
(cd bgm/overleaf && git add . && git commit -m 'update figures' && git push)

0 commit comments

Comments
 (0)