Move the "writing to file" part to a separate function in the class and keep "get_lfp" as it was. In that function, specify the argument index in get_lfp(index) with the n cells (just range(self.n)) under current node.
Writes to separate temporary files.
Do not concatenate id with lfp in the array, since they are not of the same data type. Can create a separate dataset, e.g. called ids, in the same h5 file, just for storing the ids.
https://github.com/chenziao/Stylized-Cell-Inference/blob/f9be33417a06fa27ed97b1501b310989f988771c/stylized_module/base/active_model_synapse_input.py#L268
Move the "writing to file" part to a separate function in the class and keep "get_lfp" as it was. In that function, specify the argument index in get_lfp(index) with the n cells (just range(self.n)) under current node.
Writes to separate temporary files.
Do not concatenate id with lfp in the array, since they are not of the same data type. Can create a separate dataset, e.g. called ids, in the same h5 file, just for storing the ids.