Skip to content

Commit

Permalink
Feat: support custom node sets defined in simulation config (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkilic authored Jul 9, 2024
1 parent e1a7f68 commit 2e672f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bluecellulab/circuit/circuit_access/sonata_circuit_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, simulation_config: str | Path | SimulationConfig) -> None:
raise FileNotFoundError(f"Circuit config file {simulation_config} not found.")

if isinstance(simulation_config, SonataSimulationConfig):
self.config: SimulationConfig = simulation_config
self.config = simulation_config
else:
self.config = SonataSimulationConfig(simulation_config)
circuit_config = self.config.impl.config["network"]
Expand Down Expand Up @@ -191,7 +191,7 @@ def is_valid_group(self, group: str) -> bool:

@lru_cache(maxsize=16)
def get_target_cell_ids(self, target: str) -> set[CellId]:
ids = self._circuit.nodes.ids(target)
ids = self._circuit.nodes.ids(self.config.impl.node_sets[target])
return {CellId(x.population, x.id) for x in ids}

@lru_cache(maxsize=100)
Expand Down

0 comments on commit 2e672f7

Please sign in to comment.