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.
Arguments
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’
Arguments
keys
: a list of keys to take from the datawhere
: a dictionary of derived-results keys, with a tuple (min,max,invert) as values. Ifinvert
is false, the search range is between min and max. Otherwise it is anywhere except that.
Returns
a list of arrays, in the order of
keys
.
-
iter_trajectories
()[source]¶ 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.
Note
each trajectory.
-
keys
()[source]¶ Return names that may be used to access data in any of the data sources available, whether analyses or inertial particles.