In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline
In [2]:
%run nb_init.py
/home/guillaume/anaconda/envs/python3/lib/python3.4/site-packages/graph_tool/draw/cairo_draw.py:1340: RuntimeWarning: Error importing Gtk module: No module named 'gi'; GTK+ drawing will not work.
  warnings.warn(msg, RuntimeWarning)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/home/guillaume/Python/leg-joint/notebooks/nb_init.py in <module>()
     20 import graph_tool.all as gt
     21 #import matplotlib.pyplot as plt
---> 22 import leg_joint as lj
     23 import numpy as np
     24 

/home/guillaume/Python/leg-joint/leg_joint/__init__.py in <module>()
     24 import matplotlib.pylab as plt
     25 
---> 26 from .epithelium import Epithelium
     27 from .optimizers import find_energy_min, isotropic_optimum
     28 from .optimizers import approx_grad, check_local_grad, running_local_optimum

ImportError: bad magic number in 'leg_joint.epithelium': b'\x03\xf3\r\n'
In [3]:
all_kwargs =  {'seq_kwargs': {'num_cells': 30, ## The number of apoptotice cells
                              'width_apopto':60., ## The width of the apoptotic region
                              'amp': 0., ## The importance of the ventral bias
                              'seed': 10, ## Seed for the random process
                              'num_steps': 10, ## The number of step to perform apoptosis
                              'ventral_bias': True,
                              'random': True,
                              'gamma': 1,
                              'theta_sorted': False},
               'apopto_kwargs': {'vol_reduction':0.5,
                                 'contractility': 1.,
                                 'radial_tension': 0.},
               'post_kwargs': {'max_ci':3.,
                               'rate_ci':1.4,
                               'span_ci':2}
               }
In [4]:
eptm = lj.Epithelium(graphXMLfile='../saved_graphs/xml/before_apoptosis.xml',
                     identifier='joint', copy=True)
2014-04-30 12:32:08,160 -leg_joint.epithelium -INFO -Instanciating epithelium joint
2014-04-30 12:32:09,373 -leg_joint.epithelium -INFO -Initial cells
2014-04-30 12:32:09,374 -leg_joint.epithelium -INFO -Initial junctions
2014-04-30 12:32:21,013 -leg_joint.epithelium -INFO -Update geometry
In [5]:
eptm.isotropic_relax()
In [6]:
ax = lj.plot_avg_rho(eptm, bin_width=20)
/home/guillaume/python3/lib/python3.3/site-packages/matplotlib-1.4.x-py3.3-linux-x86_64.egg/matplotlib/figure.py:1617: UserWarning: This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect.
  warnings.warn("This figure includes Axes that are not "
In [7]:
seq_kwargs = all_kwargs['seq_kwargs']
apopto_kwargs = all_kwargs['apopto_kwargs']

post_kwargs = all_kwargs['post_kwargs']

apopto_cells, fold_cells, apopto_sequence = lj.get_apoptotic_cells(eptm, **seq_kwargs)

print('%i apoptotic cell(s)' % len(apopto_cells))
print('surrounded by %i fold cells' % len(fold_cells))
30 apoptotic cell(s)
surrounded by 157 fold cells
In [8]:
eptm.set_local_mask(None)
lj.local_slice(eptm, theta_amp=2*np.pi,
               zed_amp=seq_kwargs['width_apopto'])


eptm.update_rhotheta()
d_theta = 0.
z_angle = np.pi / 6
pseudo_x = eptm.ixs.copy()
pseudo_y = eptm.ixs.copy()
pseudo_x.a = eptm.zeds.a * np.cos(z_angle) - eptm.rhos.a * np.sin(
             eptm.thetas.a + d_theta) * np.sin(z_angle)
pseudo_y.a = eptm.rhos.a * np.cos(eptm.thetas.a + d_theta)


is_apopto = eptm.is_cell_vert.copy()
is_apopto.a[:] = 0
color_dead = eptm.zeds.copy()
color_dead.a[:] = 0.
for cell in apopto_cells:
    color_dead[cell] = 1.
    is_apopto[cell] = 1
    for jv in cell.out_neighbours():
        is_apopto[jv] = 1
In [12]:
ax = lj.plot_eptm_generic(eptm, 
                          pseudo_x, pseudo_y, local=True,
                          cell_kwargs={'cell_colors':color_dead, 'cmap': 'Reds', 'alpha':0.8},
                          edge_kwargs={'c':'g', 'lw':1, 'alpha':0.4})
plt.savefig('../doc/imgs/apoptosis_repartition.svg')
In [10]:
mean_rho = eptm.rhos.a.mean()
thetas = np.linspace(0, 2 * np.pi, 60)
fig, ax = plt.subplots(figsize=(8, 4))
num_rows = 12
delta = 60.
for n, cells in enumerate(apopto_sequence[1:]):
    
    if len(cells) == 0: break
    dx = + (n % num_rows) * delta
    dy = - (n // num_rows) * delta
    ax.plot(mean_rho * np.cos(thetas) + dx,
            mean_rho * np.sin(thetas) + dy, 'k-', alpha=0.4)
    ax.text(dx, dy, str(n + 1), fontsize=10)
    for cell in cells:
        ax.plot(eptm.wys[cell] + dx, eptm.ixs[cell] + dy, 'ro', alpha=0.5)

ax.set_aspect('equal')
ax.set_xticks([])
ax.set_yticks([])
dx = + ((n + 1) % num_rows) * delta
dy = - ((n + 1) // num_rows) * delta

ax.plot(mean_rho * np.cos(thetas) + dx,
        mean_rho * np.sin(thetas) + dy, 'k-', alpha=0.4)
ax.text(dx, dy, 'all', fontsize=10)
for cell in apopto_cells:
    ax.plot(eptm.wys[cell] + dx, eptm.ixs[cell] + dy, 'ko', alpha=0.7)
ax.set_title('Sequence of apoptoses around the joint')

plt.show()
In [11]:
lj.gradual_apoptosis(eptm, seq_kwargs,
                     apopto_kwargs, post_kwargs)
In [13]:
eptm.graph
Out[13]:
<Graph object, undirected, with 73 vertices and 186 edges, edges filtered by (<PropertyMap object with key type 'Edge' and value type 'bool', for Graph 0x7fbb22b98310, at 0x7fbb22b2f110>, False), vertices filtered by (<PropertyMap object with key type 'Vertex' and value type 'bool', for Graph 0x7fbb22b98310, at 0x7fbb22b98bd0>, False) at 0x7fbb22b98310>
In [15]:
(eptm.is_local_vert.a * (eptm.is_cell_vert.a)).sum()
Out[15]:
19
In [28]:
eptm.zeds.fa.size
Out[28]:
5131
In [16]:
fig, ax = plt.subplots()
ax.plot(eptm.zeds.fa, eptm.ixs.fa, 'o', alpha=0.5)
Out[16]:
[<matplotlib.lines.Line2D at 0x7fbb1c15b7d0>]
In [47]:
for je in eptm.graph.edges():
    print(je.source(), je.target(), 
          eptm.zeds[je.source()], eptm.zeds[je.target()],
          eptm.is_cell_vert[je.source()], eptm.is_cell_vert[je.target()])
273 3610 nan -14.099431991577148 1 0
273 3609 nan nan 1 0
273 1512 nan -1.3159493207931519 1 0
273 1456 nan 4.452213287353516 1 0
273 4761 nan -4.5094112572008065 1 0
273 1511 nan -3.888937105216203 1 0
275 1460 -1.1418145533121804 -0.5534912504719165 1 0
275 4083 -1.1418145533121804 -1.6618512875358082 1 0
275 4084 -1.1418145533121804 -0.6352377008984207 1 0
275 1461 -1.1418145533121804 -1.1426801230372607 1 0
275 1514 -1.1418145533121804 -1.7158124046174956 1 0
276 3258 -0.08757383100483672 1.448652506582386 1 0
276 1459 -0.08757383100483672 1.3655196568138508 1 0
276 3259 -0.08757383100483672 1.8804058651499787 1 0
276 3708 -0.08757383100483672 -1.7423645724171335 1 0
276 1460 -0.08757383100483672 -0.5534912504719165 1 0
276 4084 -0.08757383100483672 -0.6352377008984207 1 0
276 1515 -0.08757383100483672 -2.3765013217926025 1 0
301 3294 nan -5.775954246520996 1 0
301 3589 nan -14.522082328796387 1 0
301 1566 nan -4.885640621185303 1 0
301 4027 nan -11.061452865600586 1 0
301 1513 nan nan 1 0
301 3588 nan -3.3918087482452393 1 0
301 1510 nan -2.773810625076294 1 0
302 1569 nan nan 1 0
302 1568 nan nan 1 0
302 1566 nan -4.885640621185303 1 0
302 4026 nan -1.8206626176834106 1 0
302 4027 nan -11.061452865600586 1 0
303 1511 nan -3.888937105216203 1 0
303 1514 nan -1.7158124046174956 1 0
303 1512 nan -1.3159493207931519 1 0
303 4083 nan -1.6618512875358082 1 0
303 5082 nan nan 1 0
303 5083 nan -2.371620018901476 1 0
304 4011 nan -3.1514766216278076 1 0
304 4012 nan nan 1 0
304 1516 nan -3.3551583290100098 1 0
304 1517 nan -2.3676369462852653 1 0
304 1570 nan -2.8544053084248553 1 0
332 1623 nan -4.627558513397251 1 0
332 3745 nan -2.8426042806686733 1 0
332 1568 nan nan 1 0
332 4026 nan -1.8206626176834106 1 0
332 3744 nan -2.8544053084248553 1 0
332 1567 nan nan 1 0
1457 1510 -2.762709856033325 -2.773810625076294 0 0
1459 1460 1.3655196568138508 -0.5534912504719165 0 0
1460 1461 -0.5534912504719165 -1.1426801230372607 0 0
1461 1514 -1.1426801230372607 -1.7158124046174956 0 0
1510 1513 -2.773810625076294 nan 0 0
1511 1512 -3.888937105216203 -1.3159493207931519 0 0
1511 1514 -3.888937105216203 -1.7158124046174956 0 0
1515 1516 -2.3765013217926025 -3.3551583290100098 0 0
1516 1517 -3.3551583290100098 -2.3676369462852653 0 0
1517 1570 -2.3676369462852653 -2.8544053084248553 0 0
1521 1574 13.181417465209961 -3.8302853107452393 0 0
1566 1569 -4.885640621185303 nan 0 0
1568 1569 nan nan 0 0
1568 1623 nan -4.627558513397251 0 0
1571 1574 nan -3.8302853107452393 0 0
1571 1572 nan nan 0 0
1572 1573 nan nan 0 0
1573 1626 nan nan 0 0
2822 1568 nan nan 1 0
2822 1569 nan nan 1 0
2822 2823 nan nan 1 0
2822 2824 nan -1.1941092014312744 1 0
2822 3696 nan nan 1 0
2822 1623 nan -4.627558513397251 1 0
2823 1569 nan nan 0 0
2823 2824 nan -1.1941092014312744 0 0
3182 3183 nan nan 1 0
3182 3184 nan 1.5334751605987549 1 0
3182 1626 nan nan 1 0
3182 1572 nan nan 1 0
3182 1573 nan nan 1 0
3183 3184 nan 1.5334751605987549 0 0
3183 1572 nan nan 0 0
3184 1626 1.5334751605987549 nan 0 0
3258 3259 1.448652506582386 1.8804058651499787 0 0
3258 1459 1.448652506582386 1.3655196568138508 0 0
3294 1566 -5.775954246520996 -4.885640621185303 0 0
3307 1457 -15.780364036560059 -2.762709856033325 0 0
3339 1461 -2.1269224633805144 -1.1426801230372607 0 0
3588 3589 -3.3918087482452393 -14.522082328796387 0 0
3588 1510 -3.3918087482452393 -2.773810625076294 0 0
3589 3294 -14.522082328796387 -5.775954246520996 0 0
3608 3307 nan -15.780364036560059 1 0
3608 3610 nan -14.099431991577148 1 0
3608 3609 nan nan 1 0
3608 1513 nan nan 1 0
3608 1457 nan -2.762709856033325 1 0
3608 1510 nan -2.773810625076294 1 0
3609 3610 nan -14.099431991577148 0 0
3609 1512 nan -1.3159493207931519 0 0
3609 1513 nan nan 0 0
3610 1456 -14.099431991577148 4.452213287353516 0 0
3610 3307 -14.099431991577148 -15.780364036560059 0 0
3695 3184 nan 1.5334751605987549 1 0
3695 3696 nan nan 1 0
3695 3697 nan nan 1 0
3695 1623 nan -4.627558513397251 1 0
3695 3745 nan -2.8426042806686733 1 0
3695 1626 nan nan 1 0
3696 2824 nan -1.1941092014312744 0 0
3696 1623 nan -4.627558513397251 0 0
3696 3697 nan nan 0 0
3697 3184 nan 1.5334751605987549 0 0
3707 1521 nan 13.181417465209961 1 0
3707 1574 nan -3.8302853107452393 1 0
3707 3708 nan -1.7423645724171335 1 0
3707 3709 nan -0.46027876140157564 1 0
3707 4011 nan -3.1514766216278076 1 0
3707 1571 nan nan 1 0
3707 1515 nan -2.3765013217926025 1 0
3707 1516 nan -3.3551583290100098 1 0
3708 3259 -1.7423645724171335 1.8804058651499787 0 0
3708 1515 -1.7423645724171335 -2.3765013217926025 0 0
3708 3709 -1.7423645724171335 -0.46027876140157564 0 0
3709 1521 -0.46027876140157564 13.181417465209961 0 0
3743 1626 nan nan 1 0
3743 3745 nan -2.8426042806686733 1 0
3743 4012 nan nan 1 0
3743 1573 nan nan 1 0
3743 3744 nan -2.8544053084248553 1 0
3743 1570 nan -2.8544053084248553 1 0
3744 3745 -2.8544053084248553 -2.8426042806686733 0 0
3744 1570 -2.8544053084248553 -2.8544053084248553 0 0
3744 1567 -2.8544053084248553 nan 0 0
3745 1623 -2.8426042806686733 -4.627558513397251 0 0
3745 1626 -2.8426042806686733 nan 0 0
4010 1571 nan nan 1 0
4010 1572 nan nan 1 0
4010 1573 nan nan 1 0
4010 4011 nan -3.1514766216278076 1 0
4010 4012 nan nan 1 0
4011 1516 -3.1514766216278076 -3.3551583290100098 0 0
4011 1571 -3.1514766216278076 nan 0 0
4011 4012 -3.1514766216278076 nan 0 0
4012 1570 nan -2.8544053084248553 0 0
4012 1573 nan nan 0 0
4025 3609 nan nan 1 0
4025 1513 nan nan 1 0
4025 4026 nan -1.8206626176834106 1 0
4025 4027 nan -11.061452865600586 1 0
4025 1512 nan -1.3159493207931519 1 0
4025 5082 nan nan 1 0
4025 1567 nan nan 1 0
4026 1568 -1.8206626176834106 nan 0 0
4026 1567 -1.8206626176834106 nan 0 0
4026 4027 -1.8206626176834106 -11.061452865600586 0 0
4027 1566 -11.061452865600586 -4.885640621185303 0 0
4027 1513 -11.061452865600586 nan 0 0
4082 1515 -2.128000934070597 -2.3765013217926025 1 0
4082 1516 -2.128000934070597 -3.3551583290100098 1 0
4082 4084 -2.128000934070597 -0.6352377008984207 1 0
4082 4083 -2.128000934070597 -1.6618512875358082 1 0
4082 5083 -2.128000934070597 -2.371620018901476 1 0
4082 1517 -2.128000934070597 -2.3676369462852653 1 0
4083 1514 -1.6618512875358082 -1.7158124046174956 0 0
4083 4084 -1.6618512875358082 -0.6352377008984207 0 0
4084 1460 -0.6352377008984207 -0.5534912504719165 0 0
4084 1515 -0.6352377008984207 -2.3765013217926025 0 0
4760 1511 -2.814428690336451 -3.888937105216203 1 0
4760 3339 -2.814428690336451 -2.1269224633805144 1 0
4760 1461 -2.814428690336451 -1.1426801230372607 1 0
4760 1514 -2.814428690336451 -1.7158124046174956 1 0
4760 4761 -2.814428690336451 -4.5094112572008065 1 0
4760 4762 -2.814428690336451 -3.502808788566427 1 0
4761 1456 -4.5094112572008065 4.452213287353516 0 0
4761 1511 -4.5094112572008065 -3.888937105216203 0 0
4761 4762 -4.5094112572008065 -3.502808788566427 0 0
4762 3339 -3.502808788566427 -2.1269224633805144 0 0
5081 3744 nan -2.8544053084248553 1 0
5081 1567 nan nan 1 0
5081 1517 nan -2.3676369462852653 1 0
5081 1570 nan -2.8544053084248553 1 0
5081 5082 nan nan 1 0
5081 5083 nan -2.371620018901476 1 0
5082 1512 nan -1.3159493207931519 0 0
5082 1567 nan nan 0 0
5082 5083 nan -2.371620018901476 0 0
5083 4083 -2.371620018901476 -1.6618512875358082 0 0
5083 1517 -2.371620018901476 -2.3676369462852653 0 0
In [22]:
eptm.update_geometry()
In [24]:
np.all(np.isfinite(eptm.ixs.fa))
Out[24]:
False
In [25]:
eptm.stamp
Out[25]:
6747
In [26]:
import hdfgraph
In [28]:
latest = hdfgraph.graph_from_hdf(eptm.paths['hdf'], stamp=6746)
/home/guillaume/python3/lib/python3.3/site-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return compiled_ex(*arguments, **kwargs)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return compiled_ex(*arguments, **kwargs)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
In [29]:
latest
Out[29]:
<Graph object, directed, with 15381 vertices and 45615 edges at 0x7fbb1ddded10>
In [44]:
eptm.graph
Out[44]:
<Graph object, undirected, with 73 vertices and 186 edges, edges filtered by (<PropertyMap object with key type 'Edge' and value type 'bool', for Graph 0x7fbb22b98310, at 0x7fbb22b2f110>, False), vertices filtered by (<PropertyMap object with key type 'Vertex' and value type 'bool', for Graph 0x7fbb22b98310, at 0x7fbb22b98bd0>, False) at 0x7fbb22b98310>
In [33]:
vertex_df, edge_df = hdfgraph.frames_from_hdf(eptm.paths['hdf'], stamp=6746)
/home/guillaume/python3/lib/python3.3/site-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return compiled_ex(*arguments, **kwargs)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return compiled_ex(*arguments, **kwargs)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
/home/guillaume/python3/lib/python3.3/site-packages/tables/conditions.py:447: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
  return func(*args)
In [41]:
vertex_df.drop_duplicates().xs(0, level='vertex_index')
Out[41]:
ages areas contractile_grad contractilities elastic_grad grad_ix grad_radial grad_sigma grad_wy grad_zed is_active_vert is_alive is_cell_vert is_local_vert ixs perimeters prefered_vol radial_tensions rhos sigmas
stamp
6746 0 12 0 276.48 0 0 0 0 0 0 0 0 1 0 26.401755 0 288 0 26.463649 1.810293 ...

1 rows × 28 columns

In [31]:
eptm.graph.set_vertex_filter(None)
eptm.graph.set_edge_filter(None)
In [43]:
eptm.graph.set_vertex_filter(eptm.is_local_vert)
eptm.graph.set_edge_filter(eptm.is_local_edge)
In [13]:
ax = lj.plot_avg_rho(eptm, bin_width=20)
In [3]:
eptm = lj.Epithelium(graphXMLfile='../saved_graphs/joint_2014-03-04T14_02_13/xml/post_optimize.xml',
                     identifier='joint')
In [29]:
eptm.identifier
Out[29]:
'joint_2014-03-06T09_25_05'
In [28]:
 
In [4]:
lj.draw(eptm,
        output3d=os.path.join(eptm.paths['png'],
                             'post_apopto_3d.png'),
        output2d=os.path.join(eptm.paths['png'],
                             'post_apopto_2d.png'))
In [5]:
import IPython.core.display as disp
In [6]:
disp.Image(os.path.join(eptm.paths['png'],
                        'post_apopto_3d.png'))
Out[6]:
In [7]:
disp.Image(os.path.join(eptm.paths['png'],
                        'post_apopto_2d.png'))
Out[7]: