axon_packer

nrv.nmod.axon_packer(diameters: <MagicMock name='mock.array' id='139958333163664'>, y_gc: <MagicMock name='mock.float32' id='139958361186784'> = 0, z_gc: <MagicMock name='mock.float32' id='139958361186784'> = 0, delta: <MagicMock name='mock.float32' id='139958361186784'> = 0.5, n_iter: <MagicMock name='mock.int32' id='139958332678912'> = 20000, v_att: <MagicMock name='mock.float32' id='139958361186784'> = 0.01, v_rep: <MagicMock name='mock.float32' id='139958361186784'> = 0.1, monitor=False, monitoring_Folder='', n_monitor=200)[source]

Axon Packing algorithm: this operation takes a vector of diameter (random population) and places it at best. The used algorithm is largely based on [1]

Parameters:
  • diameters (np.array) – Array containing all the diameters of the axon population to pack

  • delta (float) – minimal inter-axon distance to respect before considering collision, in um

  • n_iter (int) – Number of iterations

  • v_att (float) – vector norm for attraction velocity, in um per iteration

  • v_rep (float) – vector norm for repulsion velocity, in um per iteration

  • y_gc (float) – y coordinate of the gravity center for the packing, in um

  • z_gc (float) – z coordinate of the gravity center for the packing, in um

  • monitor (bool) – monitor the packing algorithm by saving regularly plot of the population

  • monitoring_Folder (str) – where to save the monitoring plots

  • n_monitor (int) – number of iterration between two successive plots when monitoring the algorithm

Returns:

  • y_axons (np.array) – Array containing the y coordinates of axons, in um

  • z_axons (np.array) – Array containing the z coordinates of axons, in um

Note

  • scientific reference

    [1] Mingasson, T., Duval, T., Stikov, N., and Cohen-Adad, J. (2017). AxonPacking: an open-source software to simulate arrangements of axons in white matter. Frontiers in neuroinformatics, 11, 5.

  • This algorithm cannot be parallelized for the moment.

  • dev Note

    the algorithm perform a fixed number of iteration, the code could evoluate to tke into account the FVF convergence, however this value depends on the range on number of axons.