Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add boundary algorithm #2

Open
wants to merge 64 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c6fdfef
squashed
arnaudon Apr 19, 2023
aee7a0a
improve
arnaudon May 15, 2023
828cd00
fix CI
arnaudon May 15, 2023
09d037f
set debug off
arnaudon May 15, 2023
de73ace
get cov to 100
arnaudon May 16, 2023
ddc8eb1
Apply 1 suggestion(s) to 1 file(s)
adrien-berchet May 15, 2023
21e984c
Apply 1 suggestion(s) to 1 file(s)
adrien-berchet May 15, 2023
38ac8af
lint
arnaudon May 16, 2023
a00b4ba
more
arnaudon Jun 22, 2023
dad096b
small fix
arnaudon Jun 22, 2023
321b551
more
arnaudon Jun 30, 2023
ff089d9
more
arnaudon Sep 5, 2023
38ac871
more
arnaudon Sep 21, 2023
8b01201
more
arnaudon Sep 25, 2023
7eafd85
more
arnaudon Sep 27, 2023
6399917
more
arnaudon Oct 3, 2023
030c961
option to synthesize axons
arnaudon Oct 10, 2023
0f5e8d9
add option for barrel
arnaudon Oct 18, 2023
777ac40
more
arnaudon Nov 9, 2023
3154bc7
more
arnaudon Nov 21, 2023
ccc3388
more
arnaudon Dec 21, 2023
347559f
save mesh_name
arnaudon Jan 11, 2024
3d5fa1e
shuffle rows
arnaudon Jan 12, 2024
e327baa
closest_y option
arnaudon Feb 1, 2024
78912d6
remove neuroc for now
arnaudon Feb 2, 2024
1755b38
revert
arnaudon Feb 2, 2024
1cd25cf
partial fix
arnaudon Mar 1, 2024
202c268
fix
arnaudon Mar 6, 2024
3a15977
squashed
arnaudon Apr 19, 2023
93d6260
improve
arnaudon May 15, 2023
c4dc530
fix CI
arnaudon May 15, 2023
36f69f0
set debug off
arnaudon May 15, 2023
3da2b35
get cov to 100
arnaudon May 16, 2023
b491ff4
Apply 1 suggestion(s) to 1 file(s)
adrien-berchet May 15, 2023
b7f033f
Apply 1 suggestion(s) to 1 file(s)
adrien-berchet May 15, 2023
e421929
lint
arnaudon May 16, 2023
e4a4166
more
arnaudon Jun 22, 2023
bff52c8
small fix
arnaudon Jun 22, 2023
b4d1b08
more
arnaudon Jun 30, 2023
5765db5
more
arnaudon Sep 5, 2023
2209b3f
more
arnaudon Sep 21, 2023
f4fd1a8
more
arnaudon Sep 25, 2023
257503c
more
arnaudon Sep 27, 2023
cf0d128
more
arnaudon Oct 3, 2023
20e5aa4
option to synthesize axons
arnaudon Oct 10, 2023
a654639
add option for barrel
arnaudon Oct 18, 2023
6367e59
more
arnaudon Nov 9, 2023
8eb757d
more
arnaudon Nov 21, 2023
047d182
more
arnaudon Dec 21, 2023
1e7d5dc
save mesh_name
arnaudon Jan 11, 2024
f3c1875
shuffle rows
arnaudon Jan 12, 2024
28649f8
closest_y option
arnaudon Feb 1, 2024
502f403
remove neuroc for now
arnaudon Feb 2, 2024
556d688
revert
arnaudon Feb 2, 2024
83ac062
partial fix
arnaudon Mar 1, 2024
5fa9707
fix
arnaudon Mar 6, 2024
0d4fcf6
resume
arnaudon Jun 12, 2024
bd2edbe
Merge branch 'boundary_merge' of bbpgitlab.epfl.ch:neuromath/region-g…
arnaudon Jun 12, 2024
d4ce5c2
added mclass
arnaudon Jul 31, 2024
2537acd
fix
arnaudon Aug 2, 2024
3c5ce3b
mob update
arnaudon Sep 13, 2024
d3fac7f
more
arnaudon Sep 13, 2024
d9a3b57
more
arnaudon Sep 13, 2024
9b3812c
keep track of meshes
arnaudon Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.8
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
15 changes: 12 additions & 3 deletions region_grower/atlas_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This helper allows simple lookups without having to reason in term of [PH][1-6] and [PH]y.
"""

import operator
from pathlib import Path
from typing import List
Expand Down Expand Up @@ -31,16 +32,24 @@ def __init__(self, atlas: Atlas, region_structure_path: str):
if region_structure_path is not None and Path(region_structure_path).exists():
with open(region_structure_path, "r", encoding="utf-8") as region_file:
self.region_structure = yaml.safe_load(region_file)
self.region_structure_base_path = Path(region_structure_path).parent
else:
raise ValueError("Please provide an existing region_structure file.")
raise ValueError(f"region_structure file not found at {region_structure_path}.")

self.regions = list(self.region_structure.keys())
self.layers = {}
for region in self.regions:
self.layers[region] = self.region_structure[region]["layers"]
self.y = atlas.load_data("[PH]y")
try:
self.y = atlas.load_data("[PH]y")
except:
self.y = None

self.brain_regions = atlas.load_data("brain_regions")
self.orientations = atlas.load_data("orientation", cls=OrientationField)
try:
self.orientations = atlas.load_data("orientation", cls=OrientationField)
except:
self.orientations = None

def layer_thickness(self, layer: Union[int, str]) -> Atlas:
"""Returns an atlas of the layer thickness."""
Expand Down
12 changes: 12 additions & 0 deletions region_grower/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ def generate_distributions(
is_flag=True,
default=False,
)
@click.option(
"--resume",
help="Resume synthesis, do not synthesize if file exists (default: False)",
is_flag=True,
default=False,
)
@click.option(
"--max-drop-ratio",
help="Max drop ratio for any mtype (default: 0)",
Expand Down Expand Up @@ -284,6 +290,12 @@ def generate_distributions(
is_flag=True,
default=False,
)
@click.option(
"--synthesize-axons",
help="Display the versions of all the accessible modules in a logger entry",
is_flag=True,
default=False,
)
def synthesize_morphologies(**kwargs): # pylint: disable=too-many-arguments, too-many-locals
"""Synthesize morphologies."""
if mpi_enabled and kwargs.get("with_mpi", False): # pragma: no cover
Expand Down
Loading