astrovascpy.report_reader

Module dedicated to the report reading. This is the standalone version before having proper sonata simulation config etc. The final version will use snap and will be in archngv most probably. Also this is a bit over-engineered but makes things easier if we have different types of reports in the future. Plus, this is a light version of the snap classes which will make things easy to adapt from these classes to the snap ones.

Classes

BloodflowReport(filepath)

Access to a BloodflowReport data.

FilteredFrameReport(frame_report[, group, ...])

Access to filtered FrameReport data.

FrameReport(filepath)

Access to FrameReport data.

PopulationBloodflowReport(frame_report, ...)

Access to PopulationBloodflowReport data.

PopulationFrameReport(frame_report, ...)

Access to PopulationFrameReport data.

class astrovascpy.report_reader.BloodflowReport(filepath)

Bases: FrameReport

Access to a BloodflowReport data.

class astrovascpy.report_reader.FilteredFrameReport(frame_report, group=None, t_start=None, t_stop=None)

Bases: object

Access to filtered FrameReport data.

report

Access to the report data.

Returns:

A DataFrame containing the data from the report. Row’s indices are the

different timestamps and the column’s MultiIndex are : - (population_name, node_id, compartment id) for the CompartmentReport - (population_name, node_id) for the SomaReport

Return type:

pandas.DataFrame

class astrovascpy.report_reader.FrameReport(filepath)

Bases: object

Access to FrameReport data.

data_units

Return the data unit for this report.

filter(group=None, t_start=None, t_stop=None)

Return a FilteredFrameReport.

A FilteredFrameReport is a lazy and cached object which contains the filtered data from all the populations of a report.

Parameters:
  • group (None/int/list/np.array/dict) – Get frames filtered by group. See NodePopulation.

  • t_start (float) – Include only frames occurring at or after this time.

  • t_stop (float) – Include only frames occurring at or before this time.

Returns:

A FilteredFrameReport object.

Return type:

FilteredFrameReport

population_names

Return the population names included in this report.

property time_units

Return the data unit for this report.

class astrovascpy.report_reader.PopulationBloodflowReport(frame_report, population_name)

Bases: PopulationFrameReport

Access to PopulationBloodflowReport data.

class astrovascpy.report_reader.PopulationFrameReport(frame_report, population_name)

Bases: object

Access to PopulationFrameReport data.

This function is generic for the soma-like or compartment-like reports.

get(group=None, t_start=None, t_stop=None)

Fetch data from the report.

Parameters:
  • group (int/list/np.array) – Get frames filtered by ids.

  • t_start (float) – Include only frames occurring at or after this time.

  • t_stop (float) – Include only frames occurring at or before this time.

Returns:

frame as columns indexed by timestamps.

Return type:

pandas.DataFrame

property name

Access to the population name.

node_ids

Return the node ids present in the report.

Returns:

Numpy array containing the node_ids included in the report

Return type:

np.Array