diff --git a/src/miv_simulator/interface/network_architecture.py b/src/miv_simulator/interface/architecture.py similarity index 99% rename from src/miv_simulator/interface/network_architecture.py rename to src/miv_simulator/interface/architecture.py index 257baa7..b9f0120 100644 --- a/src/miv_simulator/interface/network_architecture.py +++ b/src/miv_simulator/interface/architecture.py @@ -23,7 +23,7 @@ def _join(*args): return uses -class NetworkArchitecture(Component): +class Architecture(Component): """Creates the network architecture by generating the soma coordinates within specified layer geometry.""" class Config(BaseModel): diff --git a/src/miv_simulator/interface/network.py b/src/miv_simulator/interface/network.py index b983513..b9b715c 100644 --- a/src/miv_simulator/interface/network.py +++ b/src/miv_simulator/interface/network.py @@ -15,7 +15,9 @@ class Config(BaseModel): morphology_path: str = "./morphology" def launch(self): - config = Config.from_yaml(self.config.config_filepath) + self.source_config = config = Config.from_yaml( + self.config.config_filepath + ) self.h5_types = get( "miv_simulator.interface.h5_types", @@ -27,8 +29,8 @@ def launch(self): ], ).launch() - self.network = get( - "miv_simulator.interface.network_architecture", + self.architecture = get( + "miv_simulator.interface.architecture", [ { "filepath": self.h5_types.output_filepath, @@ -39,10 +41,10 @@ def launch(self): uses=self.h5_types, ).launch() - self.distances = self.network.measure_distances().launch() + self.distances = self.architecture.measure_distances().launch() self.synapse_forest = { - population: self.network.generate_synapse_forest( + population: self.architecture.generate_synapse_forest( { "population": population, "morphology": os.path.join( @@ -55,7 +57,7 @@ def launch(self): } self.synapses = { - population: self.network.distribute_synapses( + population: self.architecture.distribute_synapses( { "forest_filepath": self.synapse_forest[ population @@ -74,7 +76,7 @@ def launch(self): } self.connections = { - population: self.network.generate_connections( + population: self.architecture.generate_connections( { "synapses": config.synapses, "forest_filepath": self.synapses[ @@ -93,7 +95,7 @@ def launch(self): self.neural_h5 = get( "miv_simulator.interface.neuroh5_graph", uses=[ - self.network, + self.architecture, self.distances, *self.synapse_forest.values(), *self.synapses.values(), diff --git a/src/miv_simulator/interface/neuroh5_graph.py b/src/miv_simulator/interface/neuroh5_graph.py index 194e349..233a440 100644 --- a/src/miv_simulator/interface/neuroh5_graph.py +++ b/src/miv_simulator/interface/neuroh5_graph.py @@ -21,7 +21,7 @@ def graph(self) -> None: def __call__(self) -> None: print("Merging H5 data") - self.network = None + self.architecture = None self.distances = None self.synapses = {} self.synapse_forest = {} @@ -29,8 +29,8 @@ def __call__(self) -> None: populations = [] for u in self.uses: name = u.module.replace("miv_simulator.interface.", "") - if name == "network_architecture": - self.network = u + if name == "architecture": + self.architecture = u elif name == "distances": self.distances = u elif name == "connections": @@ -60,9 +60,9 @@ def __call__(self) -> None: ) self.synapses[u.config.population] = u - self.graph.import_h5types(self.network.config.filepath) + self.graph.import_h5types(self.architecture.config.filepath) self.graph.import_soma_coordinates( - self.network.config.filepath, + self.architecture.config.filepath, populations=list(populations) + ["STIM"], ) for p in self.synapse_forest.keys(): @@ -80,7 +80,7 @@ def __call__(self) -> None: self.save_file( "graph.json", { - "network": self.network.serialize(), + "architecture": self.architecture.serialize(), "distances": self.distances.serialize(), "connections": { k: v.serialize() for k, v in self.connections.items()