This repository was archived by the owner on Feb 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Simplify report access #144
Copy link
Copy link
Open
Description
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:
- Point to a simulation config that was used to generate the report.
- The simulation config must have the "network" field that points to a Sonata circuit config that was used by the simulation config.
- 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.
- 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
Labels
No labels