Example 2: Geometry-related features¶
The code snippet below shows a simple scenario for geometry analysis of the reconstructed cytoskelton.
1from cytoskeleton_analyser.inout import Paths # simulation-specific paths
2from cytoskeleton_analyser.position.drivers import process # driver fuction
3from sim_specs import cell, data_in, data_out, rinds
4
5# Set general parameters of the input simulation. (a shortlist
6# of config settings).
7params = {
8 'edge_len_fine': 0.008, # (μm) length of filament edge.
9 'iscoarse': True, # use coarse-grained representation
10 'coarsegraining': 25, # coarse-graining factor
11 'use_final': False, # if True, limit to final snapshot only
12 'cell': cell, # cell object
13 'slice_limits': {'bottom': 0., 'top': 0.8}, # z-pos. of slicing planes
14}
15
16# Specify features to process. If this is None,
17# all features are included.
18features = [
19 'RadialMass',
20]
21
22# Decide if this is a new analysis, or we merely want to import one.
23new = True
24
25# This dict will become populated only if analysis
26# is imported ('new' = False).
27# Otherwise, the results are stored on a disc.
28result = {}
29
30if __name__ == '__main__':
31
32 for ci in rinds:
33 paths = Paths(data_in, data_out, params['cell'], ci)
34 result[str(ci)] = process(new, paths, ci, params, True, features)