Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Simplify report access #144

@asanin-epfl

Description

@asanin-epfl

The problem: Sonata specs force very complicated API to access reports.

When there is a report file, you want to open simply and access its data directly. Sonata specs, and hence bluepysnap, require additional steps:

  1. Point to a simulation config that was used to generate the report.
  2. The simulation config must have the "network" field that points to a Sonata circuit config that was used by the simulation config.
  3. The simulation config must have the "run" field that contains the parameters for simulation. These parameters must be the same in the report file. Otherwise it won't open.
  4. The simulation config must have the "reports" field where the report file, we want to open, is specified.

So, we have to use this:

    sim = Simulation('path/to/simulation/config')
    pop_rep = sim.reports['node-population-name']['report-name']
    t = 2 # 2nd sec of simulation
    id = [45, 67] # node ids
    print(pop_rep.get(id, t, t))

plus complicated configs of simulation and circuit:

{
  "network": "path/to/sonata/circuit/config.json",
  "output": {
    "output_dir": "/path/to/dir/where/report/located"
  },
  "run": {
    // the exact parameters of report otherwise bluepysnap will throw an error
  },
  "format": "HDF5",
  "reports": {
    "report-name": {
      "file_name": "report-filename"
    }
  }
}

sonata circuit config:

{
  // all the required keys like "network", "components" etc.
}

Instead of an easy access API like:

from bluepysnap import Report

report = Report('path/to/report')
t = 2 # 2nd sec of simulation
id = [45, 67] # node ids
print(report[t, id])

The proposition would be to create the easy access API. Currently libsonata offers such. The only
thing it lacks is array indexing of report data BlueBrain/libsonata#153.

cc @mgeplf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions