Handling of Analysis Results

class flowtracks.an_scene.AnalysedScene(analysis_file)[source]

A class for accessing data and analyses of a scene analysed and saved in the format used by flowtracks.analysis.analyse().

Initializes the objects according to config and data-source metadata saved in the analysis file.


  • analysis_file: path to the HDF file containing analysis results.
collect(keys, where=None)[source]

Get values of a given key, either some of them or the ones corresponding to a selection given by ‘where’


  • keys: a list of keys to take from the data
  • where: a dictionary of derived-results keys, with a tuple (min,max,invert) as values. If invert is false, the search range is between min and max. Otherwise it is anywhere except that.


a list of arrays, in the order of keys.


Iterator over inertial trajectories. Since the analysis is structured around the inertial particles of the internal DualScene, it is possible to iterate those trajectories, adding the corresponding fields of analysis to the same object. Generates a Trajectory object for each inertial particle trajectory in the particles file (in no particular order, but the same order every time on the same PyTables version) and yields it.


each trajectory.


Return names that may be used to access data in any of the data sources available, whether analyses or inertial particles.


Return the number of components per item of each key in the order returned by keys().


Retrieves an inertial trajectory with the respective analysis. See iter_trajectories for the full documentation.


  • trid: trajectory ID to fetch.


a Trajectory object with analysis keys added.