convert_chunks_to_neo#

convert_chunks_to_neo(
save_path: Path,
duration__ms: float | None = None,
spike_data_file: Path | None = None,
) Block[source]#

Load chunks and convert to NEO Block format (compatible with SimulationRunner output).

This function creates a NEO Block that’s identical in structure to what SimulationRunner.run() would return, making it compatible with existing analysis code.

Parameters:
  • save_path (Path) – Directory where chunks were saved

  • duration__ms (float, optional) – Total simulation duration in ms (if None, inferred from data)

  • spike_data_file (Path, optional) – Path to SimulationRunner spike results file (e.g., ‘watanabe__spikes_only.pkl’) If provided, spike data will be loaded from this NEO Block instead of chunks

Returns:

NEO Block containing spike trains and analog signals

Return type:

Block