Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d21cb79
drop verbose option and use logging
su-saka Mar 18, 2025
aafdedc
small readme update
su-saka Mar 18, 2025
b59bb6e
revert back to verbose
su-saka Mar 19, 2025
e246361
update gitignore
su-saka Apr 11, 2025
3fb982f
Merge branch 'master' into su_202503
su-saka Jun 13, 2025
02a3e44
RW refactor and add the option to provide custom exploration mode
su-saka Jun 23, 2025
aa7aa9c
Merge branch 'develop' into su_202503
su-saka Jun 23, 2025
03606a5
Merge branch 'develop' into su_202503
su-saka Jun 26, 2025
0709026
remove wrong default values from the template
su-saka Jun 26, 2025
20c1d43
Merge pull request #396 from mpinb/develop
bgmeulem Jun 27, 2025
22cfe23
Update README.md
bgmeulem Jun 27, 2025
d0613b9
[BUG] Database register path does not need to exist, it can be created
bgmeulem Jun 27, 2025
60974c8
Remove precompiled netcon mechanism `.dll` (#398)
bgmeulem Jun 27, 2025
8474712
Improve test suite (#400)
bgmeulem Jun 28, 2025
00b3af7
Update test suite (#402)
bgmeulem Jun 28, 2025
2483066
[minor] documentation updates (#406)
bgmeulem Jul 29, 2025
9e70721
Develop (#415)
bgmeulem Aug 1, 2025
3c4fc49
Merge branch 'develop' into su_202503
su-saka Aug 21, 2025
df85e7e
temp compatibliity fixes
su-saka Aug 21, 2025
ef91ce2
Develop (#425)
bgmeulem Aug 27, 2025
534ec2c
Fix broken docs build (#427)
bgmeulem Aug 27, 2025
e8fbabb
Improve tutorial 4.1: manipulations (#429)
bgmeulem Aug 28, 2025
d0f5809
Add `IPython` to `docs` (#431)
bgmeulem Aug 29, 2025
b623cdb
[Minor] docs update (#433)
bgmeulem Aug 29, 2025
ac1506b
compatibility with dask cluster syntax and dask gateway
Kostusas Oct 8, 2025
3544b4a
Merge remote-tracking branch 'origin/dask-gateway' into su_dask-gateway
su-saka Oct 9, 2025
e796dc0
improve RW code
su-saka Nov 21, 2025
d2018ed
bugfix
su-saka Nov 21, 2025
aa23b40
undo temp compatibility changes
su-saka Nov 21, 2025
06201c4
add option to insert mechanisms with a positive linear slope
su-saka Nov 21, 2025
45fbcc2
Merge branch 'master' into su_202503
su-saka Nov 21, 2025
119323e
Merge branch 'su_dask-gateway' into su_202503
su-saka Nov 21, 2025
e726db5
add option to provide fig and ax for get_3d_plot_morphology
su-saka Dec 25, 2025
09468ea
improve RW class docstring
su-saka Dec 25, 2025
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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ barrel_cortex/*
getting_started/example_data/**/metadata.json
getting_started/biophysical_constraints/86_CDK_20041214_BAC_run5_soma_Hay2013_C2center_apic_rec.param
getting_started/functional_constraints/network.param
getting_started/example_simulation_data/C2_evoked_UpState_INH_PW_1.0_SuW_0.5_C2center/20150815-1530_20240/20240_network_model.param
getting_started/example_simulation_data/C2_evoked_UpState_INH_PW_1.0_SuW_0.5_C2center/20150815-1530_20240/20240_neuron_model.param
getting_started/example_data/biophysical_constraints/86_CDK_20041214_BAC_run5_soma_Hay2013_C2center_apic_rec.param
getting_started/example_data/functional_constraints/network.param
getting_started/example_data/simulation_data/C2_evoked_UpState_INH_PW_1.0_SuW_0.5_C2center/20150815-1530_20240/20240_network_model.param
getting_started/example_data/simulation_data/C2_evoked_UpState_INH_PW_1.0_SuW_0.5_C2center/20150815-1530_20240/20240_neuron_model.param
getting_started/radii/data/neuron1/output**

# Ignore example param files generated from templates, but don't ignore templates themselves
Expand Down
7 changes: 5 additions & 2 deletions Interface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def print_module_versions():
logger.info("Loaded modules with __version__ attribute are:\n" + ', '.join(module_versions))


def get_client(ip=None, client_port=38786, timeout=120):
def get_client(ip=None, client_port=38786, timeout=120, cluster=None):
"""
Gets the distributed.client object if dask has been setup

Expand Down Expand Up @@ -288,7 +288,10 @@ def get_client(ip=None, client_port=38786, timeout=120):
hostname
) # fetches the ip of the current host
logger.info("Getting dask client with ip {}".format(ip))
c = Client(ip + ':' + client_port, timeout=timeout)
if cluster:
c = cluster.get_client()
else:
c = Client(ip + ':' + client_port, timeout=timeout)
logger.info("Got dask client {}".format(c))
logger.debug("Making mechanisms visible on client side")
local_pythonpath = os.environ.get('PYTHONPATH', '')
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Installation instructions can be found [here](https://mpinb.github.io/in_silico_

ISF is available for Linux, Windows and macOS.
For installation and environment management, ISF uses [pixi](https://pixi.sh/latest/).
Please follow the installation instructions on the [`pixi` documentation](https://pixi.sh/latest/#installation)
Please follow the installation instructions on the [pixi documentation](https://pixi.sh/latest/#installation)

To install ISF with pixi, simply:

Expand Down
9 changes: 5 additions & 4 deletions biophysics_fitting/L5tt_parameter_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ def get_L5tt_template():
'spatial': 'uniform'
},
'Ca_HVA': {
'begin': 900.0,
'end': 1100.0,
'begin': None,
'end': None,
'gCa_HVAbar': None,
'outsidescale': 0.1,
'spatial': 'uniform_range'
},
'Ca_LVAst': {
'begin': 900.0,
'end': 1100.0,
'begin': None,
'end': None,
'gCa_LVAstbar': None,
'outsidescale': 0.01,
'spatial': 'uniform_range'
Expand Down Expand Up @@ -391,6 +391,7 @@ def get_L5tt_template_v2():
return NTParameterSet(p['neuron'])



def set_morphology(cell_param, filename=None):
"""Add the morphology to a cell parameter object.

Expand Down
515 changes: 268 additions & 247 deletions biophysics_fitting/exploration_from_seedpoint/RW.py

Large diffs are not rendered by default.

4,523 changes: 4,247 additions & 276 deletions pixi.lock

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ requires = ["hatchling"]
cmasher = ">=1.6.3,<2"
cython = ">=3.0.11,<4"
dash = ">=2.18.1,<3"
dask = "2.30.0.*"
dask = ">=2022.6"
fasteners = ">=0.17.3,<0.18"
flask = "==1.1.4"
flask = ">=2.3"
ipywidgets = ">=8.1.5,<9"
jupyterlab = ">=3.5.3,<4"
jupyter-scatter = ">=0.19.1,<0.20"
Expand All @@ -59,6 +59,8 @@ seaborn = ">=0.12.2,<0.13"
scipy = "1.5.2.*"
wheel = ">=0.45.1,<0.46"
zarr = ">=2.15.0,<3"
dask-gateway = ">=2023.1.1,<2024"
async-timeout = ">=4.0.3,<5"

[tool.pixi.pypi-dependencies]
bluepyopt = "==1.9.126"
Expand All @@ -70,15 +72,15 @@ blenderspike-py = { git = "https://github.com/ArtemKirsanov/BlenderSpike.git" }

# OS specific dependencies
[tool.pixi.target.osx]
pypi-dependencies = { neuron = ">=8.2", "distributed"= ">=2.30.0"}
pypi-dependencies = { neuron = ">=8.2", distributed = ">=2022.6"}
dependencies = { numpy = "==1.21", pytables = ">=3.7.0,<4" }

[tool.pixi.target.linux]
dependencies = { neuron = "==7.8.2", numpy = "==1.19.2", distributed = "==2.30.0", gcc = "<15" }
dependencies = { neuron = "==7.8.2", numpy = "==1.19.2", distributed = ">=2022.6", gcc = "<15" }
pypi-dependencies = { tables = ">=3.8.0,<4" }

[tool.pixi.target.win]
dependencies = { numpy = "==1.19.2", distributed = "==2.30.0"}
dependencies = { numpy = "==1.19.2", distributed = ">=2022.6"}
pypi-dependencies = { tables = ">=3.8.0,<4" }

# Docs does not inherit the default dependencies
Expand Down
9 changes: 6 additions & 3 deletions single_cell_parser/cell_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def insert_range_mechanisms(self, label, mechs):
h.pop_section()

elif mech.spatial == 'linear':
''' spatially linear distribution with negative slope'''
''' spatially linear distribution with slope'''
maxDist = self.cell.max_distance(label)
# set origin to 0 of first branch with this label
if label == 'Soma':
Expand Down Expand Up @@ -459,8 +459,11 @@ def insert_range_mechanisms(self, label, mechs):
dist = self.cell.distance_to_soma(sec, seg.x)
if relDistance:
dist = dist / maxDist
#rangeVarVal = mech[param]*(dist*slope + offset)
rangeVarVal = max(mech[param] * (dist * slope + 1),
if slope > 0: # positive slope
rangeVarVal = min(mech[param] * (dist * slope + 1),
mech[param] * offset)
else:
rangeVarVal = max(mech[param] * (dist * slope + 1),
mech[param] * offset)
s = param + '=' + str(rangeVarVal)
paramStrings.append(s)
Expand Down
23 changes: 15 additions & 8 deletions visualize/cell_morphology_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ def interactive_app(
port=5050,
host=self.dash_ip)


def get_3d_plot_morphology(
lookup_table=None,
colors="grey",
Expand All @@ -1502,7 +1503,9 @@ def get_3d_plot_morphology(
synapse_legend=True,
legend=None,
return_figax = True,
proj_type="ortho"
proj_type="ortho",
fig = None,
ax = None
):
"""Constructs a 3d matplotlib plot of a cell morphology, overlayed with some scalar data.

Expand All @@ -1528,21 +1531,25 @@ def get_3d_plot_morphology(
synapse_legend (bool): Whether the synapse activations legend should appear in the plot
legend (bool): Whether the legend for scalar data (e.g. membrane voltage) should appear in the plot
return_figax (bool): Whether to return the figure and axis objects. Default: True
proj_type (str): Projection type for the 3D plot. Default: "ortho"
proj_type (str): Projection type for the 3D plot, ignored if fig and ax are provided. Default: "ortho"
fig (matplotlib.figure.Figure): Figure object to plot on. If None, a new figure and axes will be created.
ax (matplotlib.axes._subplots.Axes3DSubplot): Axes object. Ignored if fig is None. Note that it must be created as a 3D axes with the intended projection type.

Returns:
tuple | None: fig and ax object if :paramref:`return_figax` is True. None otherwise.
"""
#----------------- Generic axes setup
fig = plt.figure(
figsize=(15, 15),
dpi=dpi,
num=str(time_point) if time_point is not None else None)
ax = plt.axes(projection='3d', proj_type=proj_type)
if not fig:
assert not ax, "If no figure is given, ax argument is ignored!"
fig = plt.figure(
figsize=(15, 15),
dpi=dpi,
num=str(time_point) if time_point is not None else None)
ax = plt.axes(projection='3d', proj_type=proj_type)
ax.set_xticks([])
ax.set_yticks([])
ax.set_zticks([])
plt.axis('off')
ax.axis('off')
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')
Expand Down
4 changes: 2 additions & 2 deletions visualize/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def write_video_from_images(
Returns:
None. Writes the video to the specified path.
'''
try:
subprocess.check_output(["module load", "ffmpeg"])
try:
subprocess.check_output(["module load", "ffmpeg"], shell = True)
except Exception as e:
raise EnvironmentError("Could not load ffmpeg") from e

Expand Down