Skip to content

Should NEST Device Ids be relative to avoid confusion #190

@drodarie

Description

@drodarie

The ids of the targets stored in the NEO files corresponds to the global NEST ids which are useless for the user as they don't know in which order the targets were loaded in NEST, especially since targets can be cells or connections.

I would store local/relative ids instead, since the user can recover the targeted scaffold objects in the same order after the simulation but cannot get the NEST ids. Example with the SpikeRecorder:

    def implement(self, adapter, simulation, simdata):
        nodes = self.get_target_nodes(adapter, simulation, simdata)
        device = self.register_device(simdata, nest.Create("spike_recorder"))
        self.connect_to_nodes(device, nodes)

        def recorder(segment):
              segment.spiketrains.append(
                              SpikeTrain(
                                  device.events["times"],
                                  units="ms",
                                  # Add the commented code to subtract the first id of the NEST Nodecollection 
                                  array_annotations={"senders": device.events["senders"]},  # - nodes.tolist()[0]
                                  t_stop=simulation.duration,
                                  device=self.name,
                                  pop_size=len(nodes),
                              )
                          )

Metadata

Metadata

Assignees

Labels

bsb-nestAuto-created by migration scriptquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions