Compare imputed force network between CellFIT and DLITE

In this notebook, we will visualize how to compare results between two methods - in this case CellFIT and DLITE.

First, import general classes

[1]:
import pandas as pd
import seaborn as sns
import numpy as np
import pickle
import os
import sys
import pylab
import matplotlib.pyplot as plt

Then, DLITE classes.

[2]:
from DLITE.cell_describe import node, edge, cell, colony
from DLITE.ManualTracingMultiple import ManualTracingMultiple
from DLITE.SurfaceEvolver import SurfaceEvolver
from DLITE.PlottingFunctions import PlottingFunctions

Now, we load the data. Data is stored as .txt files

[3]:
os.chdir(r'../Notebooks/data/Synthetic_data/Fig_2')
timepoints = [int(i) for i in np.linspace(1, 8, 8)]
name_first = 'surface_dec_edge_groups_80_150_numbers_'
name_end = '.fe.txt'

Lets instantiate the class

[9]:
SurfaceEvolverInstance = SurfaceEvolver(name_first, name_end)

Now, we compute tensions! We do this twice. First, we specify the solver as CellFIT

[10]:
colonies = SurfaceEvolverInstance.computation_based_on_prev_surface_evolver(timepoints, cleanup_cutoff=0.1,
                                                                            colonies = None, index = None,
                                                                            old_dictionary = None, maxiter = 60*1000,
                                                                            solver = 'CellFIT')
Name is surface_dec_edge_groups_80_150_numbers_1.fe.txt
Number of fit edges: 122
Number of cells 25 25
Solver is CellFIT
First colony {'0': <DLITE.cell_describe.colony object at 0x11bc6cf98>}
Number now is 2
Number of fit edges: 122
Number of cells 25 25
Next colony number 1
Number now is 3
Number of fit edges: 122
Number of cells 25 25
Next colony number 2
Number now is 4
Number of fit edges: 122
Number of cells 25 25
Next colony number 3
Number now is 5
Number of fit edges: 122
Number of cells 25 25
Next colony number 4
Number now is 6
Number of fit edges: 122
Number of cells 25 25
Next colony number 5
Number now is 7
node a = node b, possible topological change
Number of fit edges: 121
Number of cells 25 25
Next colony number 6
Number now is 8
node a = node b, possible topological change
Number of fit edges: 120
Number of cells 25 25
Next colony number 7

Next, we specify DLITE

[11]:
colonies2 = SurfaceEvolverInstance.computation_based_on_prev_surface_evolver(timepoints, cleanup_cutoff=0.1,
                                                                            colonies = None, index = None,
                                                                            old_dictionary = None, maxiter = 60*1000,
                                                                            solver = 'DLITE')
Name is surface_dec_edge_groups_80_150_numbers_1.fe.txt
Number of fit edges: 122
Number of cells 25 25
guess tension is [0.883, 0.378, 0.949, 0.639, 0.119, 0.009, 0.49, 0.923, 0.398, 0.246, 0.274, 0.02, 1.0, 0.27, 0.284, 0.419, 0.668, 0.562, 0.988, 0.463, 0.042, 0.769, 0.364, 0.335, 0.914, 0.654, 0.299, 0.399, 0.313, 0.904, 0.149, 0.349, 0.575, 0.073, 0.444, 0.02, 0.461, 0.842, 0.558, 0.451, 0.707, 0.715, 0.242, 0.235, 0.19, 0.147, 0.839, 0.692, 0.774, 0.215, 0.718, 0.814, 0.221, 0.461, 0.267, 0.298, 0.047, 0.252, 0.397, 0.688, 0.318, 0.321, 0.882, 0.506, 0.562, 0.612, 0.697, 0.177, 0.913, 0.099, 0.445, 0.724, 0.858, 0.923, 0.452, 0.457, 0.366, 0.575, 0.789, 0.57, 0.015, 0.703, 0.815, 0.764, 0.124, 0.63, 0.487, 0.971, 0.033, 0.632, 0.498, 0.578, 0.804, 0.031, 0.001, 0.366, 0.599, 0.032, 0.957, 0.605, 0.999, 0.995, 0.022, 0.427, 0.855, 0.161, 0.742, 0.835, 0.055, 0.359, 0.462, 0.488, 0.455, 0.501, 0.227, 0.542, 0.475, 0.854, 0.061, 0.338, 0.453, 0.976]
Function value 1.1578588314606784
Solution [0.80322979 0.79827144 0.77451898 0.4271403  0.83839292 0.77637584
 0.98472933 0.58362401 0.51714427 0.4946717  0.61956455 0.50652825
 0.49439263 0.60801353 0.48321299 0.57008509 0.54008036 0.55597409
 0.55514036 0.49006105 0.57871163 0.55760102 0.72103905 0.74888149
 0.6058796  0.56417943 0.58517326 0.76510191 0.60727439 0.73618363
 0.68989784 0.52403262 0.76266922 0.73372533 0.52661337 0.61789059
 0.7244105  0.51216314 0.53554973 0.71912556 0.68796054 0.73357959
 0.70958424 0.55331677 0.69550562 0.53713026 0.56059598 0.72025083
 0.48918393 0.46531083 0.66339361 0.55615267 0.51023867 0.52850272
 0.48673964 0.46487705 0.6925499  0.40001031 0.46775157 0.48140944
 0.42492071 0.53778626 0.48449706 0.58438458 0.42151643 0.51161706
 0.51872799 0.58220078 0.70036448 0.51674356 0.53982303 0.45181703
 0.75098551 0.70388612 0.5850491  0.40959733 0.68548351 0.70452213
 0.79063258 0.55488725 0.67325955 0.64662777 0.69010117 0.75714388
 0.71864033 0.72776111 0.54661366 0.59408578 0.61711687 0.59982828
 0.71505152 0.60151705 0.70251949 0.6935167  0.54972556 0.63842101
 0.75194028 0.69597925 0.67391238 0.66798128 0.67292608 0.44273808
 0.68679426 0.68600114 0.52012387 0.47701751 0.45742506 0.52113592
 0.70793191 0.73219772 0.7583844  0.66110062 0.7691996  0.72636855
 0.4554832  0.71050084 0.60264955 0.64254483 0.76535232 0.62088472
 0.70314618 0.67960209]


-----------------------------
guess pressure is [0.0029837949364334526, 0.0029837949364334526, 0.0029837949364334526, 0.0029837949364334526, 0.002638104743192565, 0.0029837949364334526, 0.0028109498398130087, 0.0029261799042266377, 0.002964589925697848, 0.0027245272915027868, 0.002681316017347676, 0.002820552345180811, 0.0029837949364334526, 0.0029773932661882507, 0.002922178860323387, 0.0027421318846770916, 0.002865564089092385, 0.0029837949364334526, 0.0028038479868847384, 0.0029422507639046964, 0.002969946878923867, 0.0028705542799606063, 0.0029275839742630566, 0.0028038479868847384, 0.002948765426593462]
Function value 0.00016114114848454772
Solution [ 0.00094908  0.00260098  0.00400728  0.0048207  -0.00046755  0.00379188
  0.00333793  0.00524183  0.0044718   0.00329391  0.00152116  0.00175372
  0.00158242  0.00156994  0.00394419  0.00043695  0.00151329  0.00438822
  0.0025432   0.00542623  0.00206285  0.00558981  0.00391058  0.00343827
  0.00049599]


-----------------------------
Solver is DLITE
First colony {'0': <DLITE.cell_describe.colony object at 0x120332f98>}
Number now is 2
Number of fit edges: 122
Number of cells 25 25
guess tension is [0.8032297930414365, 0.7982714417257826, 0.7745189841400304, 0.42714029537457393, 0.8383929203919726, 0.7763758436196577, 0.9847293256113157, 0.5836240104397188, 0.517144267009547, 0.4946717026868276, 0.6195645497969452, 0.5065282467262532, 0.4943926297115149, 0.6080135281535994, 0.48321298601221174, 0.5700850896464955, 0.5400803600077972, 0.5559740910359058, 0.5551403649843797, 0.4900610487464253, 0.5787116265340824, 0.5576010245211805, 0.721039048932413, 0.7488814928628005, 0.6058795959523511, 0.5641794297884994, 0.5851732601914619, 0.7651019127492455, 0.6072743912920094, 0.7361836270171814, 0.6898978398249537, 0.5240326198411819, 0.7626692219528004, 0.7337253262894716, 0.5266133717034424, 0.6178905915027509, 0.7244105039224292, 0.5121631434112189, 0.5355497279517943, 0.7191255623095095, 0.6879605388621968, 0.7335795884298855, 0.7095842350014323, 0.5533167744646207, 0.6955056206369143, 0.5371302599109491, 0.560595981040037, 0.7202508266158624, 0.4891839285932396, 0.46531082561188997, 0.6633936071182251, 0.5561526653033223, 0.5102386669556854, 0.5285027183084825, 0.48673964143755627, 0.4648770541283427, 0.6925498980495315, 0.4000103051184112, 0.4677515738743271, 0.4814094390378489, 0.4249207102440255, 0.5377862589199827, 0.4844970560792053, 0.584384582247965, 0.421516432171102, 0.5116170560925615, 0.5187279872931734, 0.5822007779300339, 0.7003644788643558, 0.5167435612965079, 0.5398230301282789, 0.45181703362633246, 0.7509855095868634, 0.703886116671533, 0.5850490953490685, 0.4095973288459492, 0.6854835149567224, 0.7045221283336031, 0.7906325765929723, 0.554887249855233, 0.6732595537442105, 0.6466277657266247, 0.6901011734966962, 0.7571438828678742, 0.7186403261964308, 0.727761113820236, 0.5466136648202086, 0.5940857792160695, 0.6171168680071558, 0.5998282818603395, 0.715051524207906, 0.6015170471916884, 0.7025194882108113, 0.6935167006647552, 0.549725563762582, 0.6384210100261917, 0.7519402778314603, 0.6959792494260302, 0.6739123773751909, 0.6679812778052875, 0.672926079119951, 0.4427380756845015, 0.6867942634741149, 0.6860011412683908, 0.5201238744289215, 0.4770175099386501, 0.45742505664193917, 0.5211359224823985, 0.707931906231061, 0.732197722970186, 0.7583843975162026, 0.6611006184642122, 0.7691996011522503, 0.7263685476198125, 0.45548320334792286, 0.7105008386587369, 0.602649549181648, 0.6425448257785709, 0.7653523169784027, 0.620884723767251, 0.7031461784901297, 0.6796020894242449]
Function value 1.1456145028713303
Solution [0.83865041 0.83116442 0.80678859 0.53733297 0.96059928 0.81009483
 1.03990547 0.61284638 0.54232708 0.51849725 0.64561742 0.53461549
 0.51446018 0.64741532 0.5111174  0.62551352 0.57934841 0.60937046
 0.59117168 0.52379649 0.61471099 0.5946673  0.76908971 0.79962006
 0.63071342 0.62023531 0.61786216 0.78905771 0.63525875 0.76368341
 0.74956832 0.57417552 0.81350804 0.75965144 0.55789133 0.6523792
 0.77397282 0.54974601 0.60288456 0.70563895 0.66298266 0.78378941
 0.6860576  0.58005891 0.74049811 0.56586686 0.61923084 0.70347274
 0.44767876 0.51506662 0.62961468 0.59798785 0.46548324 0.56887019
 0.44315592 0.42633529 0.68185893 0.44385612 0.49880403 0.43309596
 0.45883571 0.50718426 0.4470452  0.55397668 0.45077452 0.45886396
 0.49324526 0.56838603 0.60312918 0.48875585 0.52722874 0.50308667
 0.44853734 0.6067149  0.56265684 0.45809883 0.57769733 0.64217927
 0.70315751 0.53893624 0.5829848  0.51584942 0.42261879 0.42678426
 0.42798005 0.42962004 0.54278719 0.52821261 0.54695026 0.51003959
 0.39312034 0.56438265 0.76539534 0.41487291 0.50097401 0.69776088
 0.4658874  0.77586074 0.766973   0.72883967 0.73344001 0.49300337
 0.74070612 0.71139518 0.56377605 0.51422164 0.50961418 0.56631235
 0.76540289 0.82204594 0.80993957 0.72657753 0.82755874 0.78785416
 0.50070238 0.77430276 0.64767062 0.69401137 0.82473246 0.66964985
 0.76016129 0.7331521 ]


-----------------------------
guess pressure is [0.0038096529882825445, 0.0026009820411298946, 0.004007275193098055, 0.004820701730619684, -0.0004675454569680948, 0.0037918757115467674, 0.003337932479594137, 0.0052418328373207935, 0.004471799238258617, 0.0032939116265280413, 0.0015211636220579825, 0.0017537249458177912, 0.0015824176134681476, 0.0015699375111212072, 0.003944192659296103, 0.00043694737491275067, 0.0015132915370892738, 0.0043882159372241785, 0.002543200947919661, 0.005426228009273116, 0.0020628545730958445, 0.005589812531006474, 0.003910583014377867, 0.0034382705508293238, 0.0004959933702142876]
Function value 0.00016484327683487807
Solution [ 0.00186038  0.00340519  0.00523133  0.00592777  0.00091018  0.00401347
  0.00511376  0.00641878  0.00508252  0.00423985  0.00252365  0.00364164
  0.00079392  0.00224731  0.00350347  0.00094791 -0.0016806   0.0020287
  0.00063806  0.0018009   0.00077355  0.0020637   0.00478899  0.00867548
  0.00013197]


-----------------------------
Next colony number 1
Number now is 3
Number of fit edges: 122
Number of cells 25 25
guess tension is [0.8386504101184178, 0.8311644216125404, 0.8067885920068874, 0.5373329727389003, 0.9605992835054328, 0.8100948311911886, 1.0399054706405613, 0.6128463829352716, 0.5423270782802745, 0.5184972451484343, 0.6456174157895288, 0.5346154877336169, 0.5144601779270946, 0.647415319632587, 0.5111173992435535, 0.6255135167471603, 0.579348414899146, 0.6093704598803729, 0.5911716801721238, 0.5237964948230645, 0.6147109870746582, 0.5946673038127214, 0.7690897050829956, 0.7996200617274575, 0.6307134206264982, 0.6202353121241869, 0.6178621637362548, 0.7890577077724364, 0.6352587477154954, 0.7636834133806595, 0.7495683248182943, 0.5741755241284392, 0.8135080446542029, 0.7596514357931712, 0.5578913263452241, 0.6523791972086094, 0.7739728208962248, 0.5497460088937639, 0.602884562440627, 0.7056389540040391, 0.662982656453801, 0.783789411527438, 0.6860576019473791, 0.5800589086415947, 0.7404981061327569, 0.5658668611602744, 0.6192308445607551, 0.703472738738766, 0.4476787581023752, 0.5150666201080746, 0.62961468306809, 0.5979878509253893, 0.46548324052041357, 0.5688701866129297, 0.44315591726649994, 0.4263352938346752, 0.681858932998438, 0.443856117320833, 0.49880403498584575, 0.43309596165507536, 0.45883570662368095, 0.5071842640723726, 0.4470451963763439, 0.5539766842147439, 0.45077452462606143, 0.4588639618851391, 0.4932452567132981, 0.5683860306913727, 0.6031291837768477, 0.4887558486731937, 0.5272287407499311, 0.5030866685783725, 0.44853734095798, 0.606714896277055, 0.5626568359858353, 0.4580988292411432, 0.5776973321776395, 0.6421792672200661, 0.7031575072067066, 0.5389362445683302, 0.5829848034696805, 0.515849421815308, 0.42261879085311627, 0.42678426066391945, 0.4279800474964488, 0.42962004101063517, 0.5427871936201422, 0.5282126107516767, 0.5469502561464855, 0.5100395928368997, 0.3931203394177036, 0.5643826458714591, 0.7653953389675193, 0.41487290917172653, 0.5009740144824926, 0.697760883110858, 0.4658874045309374, 0.7758607384818518, 0.7669729958994579, 0.7288396730364329, 0.7334400138783869, 0.4930033677320711, 0.7407061194978931, 0.7113951833866512, 0.5637760457090402, 0.5142216376155768, 0.5096141833728319, 0.5663123487009171, 0.7654028878670817, 0.8220459381206362, 0.8099395650365693, 0.726577532886239, 0.8275587354142694, 0.7878541648823346, 0.5007023795677351, 0.7743027558328415, 0.647670623960146, 0.6940113692149712, 0.824732464064851, 0.6696498479457988, 0.7601612920776774, 0.733152099845243]
Function value 1.4055007986890458
Solution [0.85979676 0.85140345 0.82714525 0.55728835 0.99831943 0.83075679
 1.06387877 0.62886484 0.55636568 0.53158939 0.66167101 0.55009946
 0.52805114 0.66731622 0.53491906 0.65693009 0.60771262 0.64046699
 0.61938385 0.54648511 0.64150893 0.61477676 0.80309137 0.83403532
 0.64658908 0.652495   0.63231952 0.80729956 0.65686397 0.78754783
 0.78737576 0.61052992 0.85074268 0.78119176 0.59241823 0.69522578
 0.82146419 0.57358372 0.63282151 0.66224023 0.61250891 0.81787642
 0.60882044 0.59964747 0.77535127 0.59936655 0.63448934 0.63537412
 0.39020753 0.53039658 0.55820368 0.6094936  0.43566805 0.60117703
 0.41315037 0.39591553 0.63967537 0.47578192 0.52680206 0.3729211
 0.46094848 0.41255921 0.41931827 0.46439299 0.49491263 0.45152451
 0.46473524 0.54262065 0.56601497 0.401137   0.43829227 0.52653009
 0.33209961 0.5143367  0.53547594 0.50803144 0.50916488 0.59014329
 0.65246163 0.45439587 0.5224847  0.35115089 0.27424964 0.3497535
 0.33637078 0.35195621 0.52147793 0.51329532 0.53664013 0.43706159
 0.29958646 0.50363945 0.7840218  0.25829555 0.45007931 0.74217311
 0.41046846 0.79068841 0.78236193 0.71201441 0.72651917 0.53901287
 0.7757005  0.74257903 0.58197707 0.53053239 0.53673673 0.58611076
 0.77793578 0.85371426 0.83434229 0.74043143 0.8478491  0.79888353
 0.50880563 0.78604024 0.66789557 0.7162667  0.85130835 0.6908843
 0.76953684 0.75711364]


-----------------------------
guess pressure is [0.004854761809997466, 0.003405191655726943, 0.005231327315112097, 0.005927766459153357, 0.0009101777203988708, 0.004013467759815586, 0.0051137559343983315, 0.006418781860339818, 0.00508252027713268, 0.004239846638823188, 0.0025236549096023186, 0.0036416396038495436, 0.0007939200963050602, 0.002247314457721466, 0.003503474491824202, 0.0009479082645718117, -0.0016806008843616256, 0.0020287048499899926, 0.0006380607581462097, 0.0018008978131521661, 0.0007735534701568538, 0.0020636956468879047, 0.004788988226501045, 0.008675482872007978, 0.00013196842780365716]
Function value 0.00014336932075917228
Solution [ 0.00255754  0.00397279  0.0060941   0.00682235  0.00217005  0.00399167
  0.00631774  0.00710176  0.00534231  0.00472359  0.0029626   0.00410627
  0.00104026  0.00235717  0.00271822  0.00160597 -0.00259389  0.00090898
 -0.00109941  0.00026727  0.00010807  0.00062648  0.00565027  0.01011388
  0.00020803]


-----------------------------
Next colony number 2
Number now is 4
Number of fit edges: 122
Number of cells 25 25
guess tension is [0.8597967637912005, 0.8514034490826556, 0.8271452460791734, 0.5572883485226922, 0.9983194298316906, 0.8307567867080919, 1.0638787737120472, 0.6288648401592538, 0.5563656812309515, 0.5315893935903536, 0.6616710069556377, 0.5500994584393678, 0.5280511405898434, 0.6673162177218526, 0.5349190606227953, 0.6569300866076615, 0.6077126196234403, 0.6404669916306612, 0.6193838536371175, 0.546485110164281, 0.6415089285373723, 0.6147767554078809, 0.8030913719757977, 0.8340353175547958, 0.646589077489786, 0.6524949992672562, 0.632319524809748, 0.8072995571669183, 0.6568639700096981, 0.7875478297593625, 0.7873757635143873, 0.6105299249686997, 0.8507426838157005, 0.7811917557501952, 0.5924182293078308, 0.695225776845213, 0.82146419463095, 0.5735837199750917, 0.6328215126342923, 0.662240229134969, 0.6125089064080862, 0.8178764185337912, 0.6088204369278541, 0.5996474691404053, 0.775351269949395, 0.5993665520993053, 0.634489336680693, 0.6353741221998814, 0.39020752929922004, 0.5303965795659326, 0.5582036827317217, 0.6094936024502218, 0.4356680504137541, 0.601177031748531, 0.4131503658966327, 0.39591552930944657, 0.6396753718393811, 0.47578192285274795, 0.5268020581623108, 0.3729211014989025, 0.46094847844090003, 0.41255921485506575, 0.4193182748073789, 0.46439298676613594, 0.49491262982584056, 0.45152451038218044, 0.46473523734675976, 0.542620652953065, 0.5660149706928045, 0.40113700489336124, 0.438292268760254, 0.5265300926588492, 0.3320996087576588, 0.514336699425601, 0.535475937635365, 0.5080314437881164, 0.5091648751481463, 0.5901432897813165, 0.6524616328927286, 0.45439587118021063, 0.5224847021474139, 0.35115088560766505, 0.2742496400243279, 0.34975349940677253, 0.33637077902126217, 0.35195621368507846, 0.5214779301264003, 0.5132953204869094, 0.5366401304464703, 0.4370615876714626, 0.2995864575365207, 0.5036394484356859, 0.7840218030010383, 0.2582955458282155, 0.45007930828460363, 0.7421731069970638, 0.41046846219023164, 0.7906884101470069, 0.7823619313367928, 0.7120144054732461, 0.7265191714491535, 0.5390128672792583, 0.775700504531657, 0.7425790289668229, 0.5819770675463298, 0.5305323943486343, 0.5367367319059306, 0.5861107620625349, 0.7779357763072169, 0.853714263148938, 0.8343422929313249, 0.7404314285712794, 0.847849103724535, 0.7988835291955124, 0.5088056275419109, 0.7860402365188661, 0.6678955691882542, 0.7162666995021273, 0.8513083495688684, 0.6908843017953225, 0.7695368389446708, 0.7571136376425577]
Function value 2.0293671599563097
Solution [0.8861685  0.87678938 0.85295997 0.58614315 1.04918099 0.85682048
 1.10675701 0.64881442 0.57335395 0.54801616 0.68285249 0.56834609
 0.54502319 0.69102836 0.56087194 0.68676888 0.63663563 0.67005887
 0.64942492 0.5730959  0.67412474 0.63784383 0.84438253 0.87551152
 0.6676489  0.68267941 0.6631284  0.82801906 0.67868426 0.81559185
 0.82375564 0.65873265 0.88946312 0.80637572 0.63112862 0.77938785
 0.86007304 0.5860501  0.65030528 0.5702006  0.51710027 0.85932951
 0.5342725  0.62069926 0.80003803 0.62336328 0.64656748 0.57965779
 0.34348222 0.58098772 0.4970645  0.65079674 0.42460475 0.6199591
 0.35692983 0.34590015 0.54974677 0.50141908 0.54580611 0.36782233
 0.4355637  0.16018626 0.36609264 0.24148212 0.52715743 0.53899147
 0.44419549 0.43237077 0.54478577 0.14858885 0.22130581 0.54972784
 0.268234   0.47619263 0.39268878 0.54887022 0.51739204 0.59013185
 0.65363567 0.23744604 0.47792843 0.27308428 0.21531525 0.29546969
 0.2859819  0.30608456 0.23375444 0.48433264 0.52006402 0.36998233
 0.22876752 0.40466505 0.77975343 0.19628417 0.35869781 0.77067832
 0.36622768 0.79342273 0.79000271 0.72339374 0.73727447 0.58978355
 0.80174564 0.7509208  0.59803523 0.54456584 0.56045384 0.6093656
 0.79010115 0.88668206 0.85437626 0.74170801 0.86369179 0.7981822
 0.50795103 0.78596882 0.6842746  0.73364931 0.87313648 0.70786855
 0.76829763 0.77670679]


-----------------------------
guess pressure is [0.00562974631858357, 0.003972793157370327, 0.006094096679959814, 0.006822349118420568, 0.0021700452105942723, 0.003991667097064714, 0.006317735044966222, 0.0071017643179001975, 0.005342310258811084, 0.0047235852228782816, 0.0029625977524761755, 0.004106267000910061, 0.001040256721876046, 0.002357168770563515, 0.0027182240033481464, 0.0016059739061925092, -0.0025938929945728225, 0.0009089787123384973, -0.001099412281028149, 0.00026726577272851695, 0.0001080745152622779, 0.0006264834766619618, 0.005650265850413222, 0.0101138788258512, 0.0002080318455806344]
Function value 0.00018669250726815572
Solution [ 0.00347465  0.00483698  0.00700598  0.00808403  0.00281308  0.00425218
  0.00687552  0.00799765  0.00625346  0.0042624   0.0028835   0.0020314
  0.00306468  0.00141943  0.00034624  0.00245808 -0.00221169  0.00042006
 -0.00164879  0.00016998 -0.00156718  0.00040266  0.00649918  0.01120861
 -0.0001881 ]


-----------------------------
Next colony number 3
Number now is 5
Number of fit edges: 122
Number of cells 25 25
guess tension is [0.886168500785216, 0.8767893779113515, 0.8529599667263718, 0.5861431473014085, 1.049180989211914, 0.856820482769583, 1.1067570072284802, 0.6488144200900912, 0.5733539549948687, 0.5480161599133755, 0.6828524889750579, 0.5683460924614594, 0.5450231899531282, 0.6910283631690379, 0.560871939443668, 0.6867688836635788, 0.6366356273452727, 0.6700588738746285, 0.6494249178588982, 0.5730958987145577, 0.674124736620364, 0.6378438303478468, 0.8443825315245925, 0.8755115183458092, 0.6676488967946594, 0.6826794097907525, 0.6631283983554277, 0.8280190569702833, 0.6786842577338756, 0.8155918504261468, 0.823755635044839, 0.6587326495173672, 0.8894631242872141, 0.8063757192400448, 0.631128624198708, 0.77938785335297, 0.8600730405550656, 0.5860501013213758, 0.6503052831647951, 0.5702006020276182, 0.517100272508192, 0.8593295145168538, 0.5342724987590354, 0.6206992555568911, 0.8000380331064588, 0.6233632838746779, 0.6465674818138181, 0.5796577902911025, 0.3434822172154437, 0.5809877235610984, 0.49706449641381983, 0.6507967388239255, 0.4246047527527266, 0.6199591042758381, 0.35692982863607176, 0.34590014787841966, 0.5497467698648859, 0.5014190785056507, 0.5458061060826926, 0.3678223262397723, 0.43556369577195203, 0.1601862621520683, 0.3660926420667831, 0.2414821213388748, 0.5271574320481192, 0.5389914672355637, 0.4441954879280261, 0.43237076901338395, 0.5447857689489766, 0.14858884968120165, 0.22130580598789693, 0.5497278441011177, 0.2682339970401414, 0.47619262937403617, 0.39268877720900774, 0.5488702241494409, 0.5173920428130627, 0.5901318503803431, 0.653635669808504, 0.23744604495608373, 0.47792842914867334, 0.27308427758983317, 0.21531524772942834, 0.2954696890885495, 0.2859818997137198, 0.306084560497701, 0.2337544387622629, 0.48433263564402196, 0.5200640174896066, 0.36998233018165816, 0.22876752283519425, 0.40466504602890807, 0.7797534299572276, 0.19628417030066736, 0.35869780762608433, 0.7706783172733126, 0.36622767702032, 0.7934227299721213, 0.7900027088307323, 0.7233937353187843, 0.7372744683549508, 0.5897835450245712, 0.8017456443353878, 0.7509208002496219, 0.5980352265771713, 0.5445658389179568, 0.5604538369270685, 0.6093656004395243, 0.7901011514832016, 0.8866820601960769, 0.8543762570185842, 0.7417080100870121, 0.8636917918865723, 0.7981822006195534, 0.5079510306599829, 0.7859688166098187, 0.6842745991879452, 0.7336493089022624, 0.8731364830477834, 0.7078685454417522, 0.7682976259955377, 0.7767067939608727]
Function value 2.9634089989742978
Solution [0.89730797 0.88848846 0.86434239 0.61493324 1.0973657  0.8677459
 1.11303758 0.65503223 0.57977166 0.55377802 0.69115171 0.57440074
 0.5511674  0.69787385 0.57924112 0.70360718 0.65398555 0.68698887
 0.66940444 0.56338425 0.6641264  0.64457224 0.82912005 0.85851066
 0.67602833 0.69913426 0.67532147 0.82959001 0.68825479 0.82144612
 0.84578728 0.6773686  0.87649859 0.81025627 0.62338097 0.75709826
 0.87762672 0.5726786  0.6381324  0.40999011 0.35925892 0.84383356
 0.48621335 0.62659326 0.76960146 0.656796   0.63367439 0.42685778
 0.07087606 0.53367139 0.48886885 0.66963917 0.36511548 0.61057225
 0.12449582 0.11480423 0.39220376 0.55879845 0.55781373 0.29279369
 0.42708196 0.17928654 0.12702894 0.29093845 0.55236857 0.30948873
 0.3912576  0.52694094 0.61210637 0.16135556 0.26275813 0.54855589
 0.35006717 0.45673484 0.51473538 0.54961027 0.51649262 0.52193145
 0.6385146  0.2906196  0.43516337 0.32001171 0.30315435 0.3222756
 0.3290617  0.33159075 0.18639751 0.49663342 0.5280729  0.39436619
 0.27249817 0.39230816 0.78113583 0.2885016  0.35390427 0.78081321
 0.37574252 0.8062008  0.80033173 0.73787681 0.75213496 0.59924746
 0.81724284 0.76785501 0.60200503 0.5495232  0.56996139 0.58022337
 0.80705888 0.89843433 0.86381769 0.75369553 0.87445669 0.81256272
 0.5153533  0.79967157 0.69080628 0.73891751 0.88198551 0.71408719
 0.78269663 0.78422798]


-----------------------------
guess pressure is [0.0066423321744372744, 0.0048369846623139345, 0.007005979738952175, 0.008084032122045713, 0.002813083535154562, 0.004252183711505638, 0.006875524595114536, 0.007997650667446995, 0.006253455378923811, 0.004262399826719404, 0.0028835043887650547, 0.0020313971694331926, 0.0030646759350694023, 0.0014194286414301724, 0.000346239491425905, 0.0024580846704541177, -0.002211691702757245, 0.0004200610853098562, -0.0016487910955735748, 0.00016997662690681461, -0.001567183219096923, 0.0004026595405183811, 0.006499183457858198, 0.01120861136322809, -0.00018809944338101704]
Function value 0.000345443568459386
Solution [ 2.62834014e-03  3.76338672e-03  6.24814652e-03  7.45904559e-03
  2.39465590e-03  2.63054896e-03  6.70513615e-03  6.55403338e-03
  5.04448938e-03  1.86577587e-03  2.24460896e-03  5.85646671e-04
  3.65364857e-03  3.66862807e-03 -7.74719877e-06  1.07345451e-03
  4.44726241e-04  2.41038961e-03 -1.47211191e-04  2.60087828e-03
 -3.45952464e-04  2.64809649e-03  7.89362686e-03  1.12415031e-02
  1.05058766e-03]


-----------------------------
Next colony number 4
Number now is 6
Number of fit edges: 122
Number of cells 25 25
guess tension is [0.897307967558673, 0.8884884624662959, 0.8643423873683659, 0.6149332445571848, 1.0973657024610661, 0.8677459038609328, 1.1130375793585752, 0.6550322332930747, 0.5797716595832811, 0.553778023982343, 0.691151705036398, 0.5744007374644617, 0.5511674029857407, 0.6978738473713083, 0.579241115408372, 0.7036071816817882, 0.6539855476782823, 0.6869888733517769, 0.669404436926122, 0.5633842480300524, 0.6641263977930926, 0.6445722441433307, 0.8291200474066277, 0.8585106577178964, 0.6760283310224681, 0.6991342603045616, 0.6753214735602775, 0.8295900135843112, 0.6882547906033429, 0.821446118255875, 0.8457872789846037, 0.6773686002424633, 0.6381323987600181, 0.8764985926483793, 0.8102562655016965, 0.6233809738185856, 0.8776267237961402, 0.5726786025418646, 0.2, 0.409990105416238, 0.3592589211197594, 0.8438335582265752, 0.4862133548349395, 0.6265932591789108, 0.769601455926217, 0.6567959998836844, 0.6336743941904222, 0.4268577825942638, 0.07087605866976647, 0.5336713897506291, 0.4888688538567063, 0.2, 0.3651154793551963, 0.6105722492058716, 0.12449582390066048, 0.11480423326009144, 0.3922037577204048, 0.5587984477347355, 0.5578137339004158, 0.2927936867746638, 0.4270819560630081, 0.1792865433639295, 0.1270289405653414, 0.2909384488384463, 0.5523685665186715, 0.30948872707555514, 0.39125759912526126, 0.5269409431319754, 0.6121063747073163, 0.16135556033914744, 0.2627581253681939, 0.5485558937633626, 0.350067169201436, 0.4567348357935179, 0.514735383911509, 0.5496102703880823, 0.5164926245522469, 0.5219314489040883, 0.6385145987288288, 0.2906196028205318, 0.4351633702812421, 0.3200117057389534, 0.30315434725261486, 0.32227559563773867, 0.32906170261614887, 0.3315907480990946, 0.18639751056858994, 0.4966334210143389, 0.528072896057586, 0.3943661879095589, 0.2724981698426949, 0.3923081617872783, 0.7811358300846258, 0.28850160096684535, 0.35390427437978716, 0.7808132137207474, 0.37574252367826727, 0.806200798167258, 0.8003317300719193, 0.7378768077218475, 0.7521349635908107, 0.5992474609567492, 0.8172428386226244, 0.7678550101313153, 0.6020050331186731, 0.5495231998397362, 0.5699613877038044, 0.5802233675650829, 0.8070588769456735, 0.8984343316400041, 0.8638176870161139, 0.7536955252085449, 0.8744566853927718, 0.8125627171432407, 0.5153533017412796, 0.7996715672348786, 0.6908062766094111, 0.7389175063357369, 0.8819855064606456, 0.7140871920521252, 0.7826966334403304, 0.7842279775954077]
Function value 3.78681160476705
Solution [0.90287114 0.89394398 0.87050136 0.6650946  1.1792164  0.87395927
 1.09005897 0.67502757 0.58417916 0.56274797 0.70398001 0.54659944
 0.56115611 0.66229547 0.61492539 0.72064377 0.69832087 0.71038523
 0.71282977 0.51714956 0.61288491 0.6080806  0.76642122 0.80681982
 0.69098219 0.7177941  0.69257949 0.83885772 0.70853932 0.84268869
 0.88721115 0.63416613 0.72586094 0.81766738 0.83555926 0.53712303
 0.8828285  0.29003925 0.42060574 0.25982111 0.19465532 0.79101839
 0.51844173 0.50306579 0.78408829 0.46950251 0.32032567 0.26006848
 0.09997303 0.59522405 0.35739606 0.54374822 0.47984119 0.41264944
 0.17045183 0.15053037 0.24160926 0.46827261 0.50683729 0.40950615
 0.51316761 0.14133974 0.18474956 0.23841868 0.62576496 0.200339
 0.24740932 0.32484428 0.39092715 0.13738024 0.21945679 0.48398125
 0.24817374 0.4395065  0.31851727 0.57728718 0.37379299 0.45714381
 0.52793309 0.24683275 0.31125003 0.06439664 0.05900848 0.237258
 0.22339973 0.24033935 0.2084912  0.60201551 0.62997843 0.40437867
 0.15780636 0.57263712 0.88397825 0.0527256  0.38122733 0.79539493
 0.29344722 0.83868314 0.83295646 0.77711698 0.78811475 0.59810902
 0.82574033 0.87463543 0.63025767 0.57926899 0.59947413 0.6516832
 0.8327187  0.94478967 0.90417043 0.78546799 0.91120903 0.84243596
 0.53375155 0.8300803  0.72636797 0.77447693 0.92535547 0.74763013
 0.8094747  0.82240657]


-----------------------------
guess pressure is [0.005823526277452706, 0.003763386718616424, 0.006248146520994342, 0.00745904559274735, 0.002394655902363129, 0.0026305489646506934, 0.006705136145085535, 0.006554033384331094, 0.0022446089636169093, 0.005044489383211416, 0.001865775866876982, 0.0005856466709334817, 0.003653648569051988, 0.0036686280700614095, -7.747198769707405e-06, 0.0010734545107127559, 0.0004447262410290898, 0.002410389607888104, -0.00014721119145739574, 0.002600878275538415, -0.0003459524637462407, 0.002648096493535961, 0.007893626863780315, 0.01124150305918038, 0.0010505876598049706]
Function value 0.0004949924927766765
Solution [ 0.00125322  0.00138914  0.00645732  0.00536348  0.00197557 -0.00111103
  0.0054192   0.00450007  0.0010914   0.0010642   0.00167936  0.00105709
 -0.00027787  0.00509423  0.00044044  0.00241997  0.00074416  0.00285401
 -0.00032865  0.00246018  0.0058007   0.00308644  0.01295876  0.01554338
  0.00656531]


-----------------------------
Next colony number 5
Number now is 7
node a = node b, possible topological change
Number of fit edges: 121
Number of cells 25 25
guess tension is [0.9028711383979597, 0.8939439831925184, 0.8705013586117539, 0.6650945959639002, 1.179216399794209, 0.8739592717155579, 1.0900589696114116, 0.6750275735665083, 0.5841791600007777, 0.5627479732927381, 0.7039800105736843, 0.5465994437880022, 0.5611561131566848, 0.6622954718389866, 0.6149253920143456, 0.7206437680911718, 0.6983208674595772, 0.7103852286098479, 0.7128297656037762, 0.517149557967858, 0.612884913525103, 0.6080806033058332, 0.7664212154926137, 0.8068198238490266, 0.690982188180086, 0.7177940986413054, 0.6925794868839179, 0.838857724546131, 0.7085393156109178, 0.8426886894221168, 0.8872111539139271, 0.6341661274720455, 0.7258609385112275, 0.8176673810251128, 0.8355592648302855, 0.5371230326247742, 0.8828284972991348, 0.2900392528079466, 0.4206057380015176, 0.2598211096381756, 0.19465531924899565, 0.7910183859368843, 0.5184417296374122, 0.5030657873173885, 0.7840882937171654, 0.46950251493944983, 0.3203256656260575, 0.2600684846996687, 0.09997303454543514, 0.5952240533568519, 0.3573960626335557, 0.5437482215848278, 0.4798411859657292, 0.41264944031191053, 0.17045182502449288, 0.15053037373319136, 0.24160925950081222, 0.46827261004678883, 0.5068372869676047, 0.40950615318802464, 0.5131676117580026, 0.141339744492186, 0.18474956245639657, 0.23841868052853415, 0.6257649589346872, 0.20033900088420864, 0.24740931688886794, 0.3248442833547454, 0.39092715487046537, 0.13738023750042463, 0.21945678549384381, 0.48398124623726924, 0.2481737442583006, 0.43950650449908907, 0.3185172748087903, 0.5772871751930306, 0.37379298682332485, 0.4571438099945509, 0.5279330945019951, 0.24683275131503649, 0.31125003368690024, 0.06439664241944289, 0.059008479805708114, 0.23725799589988145, 0.22339973350312994, 0.24033935259105463, 0.20849119753831202, 0.6020155086899456, 0.6299784348040474, 0.4043786708183389, 0.15780636043604845, 0.5726371206372668, 0.8839782517194958, 0.05272559881013163, 0.38122732971185724, 0.7953949312282178, 0.2934472226591618, 0.8386831355166016, 0.8329564644200166, 0.777116981857198, 0.7881147467410292, 0.5981090188840673, 0.8257403349195747, 0.6302576739246148, 0.5792689917893648, 0.5994741250138648, 0.6516831975106759, 0.8327186987519835, 0.9447896684090318, 0.904170428227379, 0.7854679862505806, 0.9112090345016635, 0.8424359633881289, 0.5337515467420119, 0.8300802999926964, 0.7263679728301718, 0.7744769263435738, 0.9253554708713724, 0.747630134276408, 0.8094747001386892, 0.8224065718878765]
Function value 3.7244447313641476
Solution [0.89653031 0.88715159 0.86367107 0.6463503  1.15276592 0.86757279
 1.08244224 0.66822667 0.5813424  0.56012188 0.69920573 0.54147735
 0.55596972 0.65093953 0.60941013 0.71867408 0.69444672 0.70810286
 0.70648011 0.51776304 0.61108058 0.59920683 0.76557802 0.80832569
 0.68615219 0.71526418 0.68782522 0.82320823 0.70420645 0.82896653
 0.88281503 0.64873295 0.73887342 0.81619977 0.8206535  0.53594632
 0.87797272 0.28941774 0.41186416 0.283617   0.20949372 0.7914186
 0.4807951  0.50268497 0.7851291  0.47859882 0.34520847 0.32923601
 0.12810907 0.61722262 0.32593929 0.54765624 0.47941905 0.4017764
 0.17198375 0.15117264 0.26487834 0.45685936 0.4835273  0.41598084
 0.51575274 0.14707209 0.18606015 0.24609422 0.54781263 0.22209568
 0.32026589 0.36081588 0.42716781 0.14170031 0.226416   0.46788388
 0.25228255 0.37436205 0.35456049 0.59870397 0.39390424 0.4734535
 0.50741487 0.25190369 0.27864162 0.0934064  0.09919544 0.23429237
 0.22864638 0.23702354 0.3067873  0.51524235 0.6064182  0.24805341
 0.15712193 0.35433909 0.82648364 0.08879247 0.3024565  0.83674103
 0.28888071 0.84493979 0.84222321 0.78639046 0.79968028 0.5950239
 0.8175806  0.6290401  0.58388568 0.60136097 0.62527776 0.84959261
 0.96343053 0.92232662 0.78739741 0.92870968 0.8435603  0.5373974
 0.83155421 0.7395218  0.78939978 0.94593629 0.76515799 0.81079146
 0.84152575]


-----------------------------
guess pressure is [0.0044033129119453365, 0.0013891429199046471, 0.0064573202408394256, 0.005363475575091938, 0.001975568799641373, -0.0011110314673903362, 0.005419201746128608, 0.004500070877158787, 0.001091402732050861, 0.0010642007716023117, 0.0016793564725296507, 0.0010570928616006506, -0.0002778685918118495, 0.005094226509999778, 0.00044044461571380504, 0.0024199695277510765, 0.000744163315717327, 0.002854006538044884, -0.0003286470162669324, 0.002460183825189326, 0.005800700712813846, 0.0030864370447260736, 0.012958756827733722, 0.015543384963335322, 0.006565312824836861]
Function value 0.0006682057027989112
Solution [ 2.08747746e-03  2.56142899e-03  7.03695549e-03  5.92877801e-03
  2.33004057e-03  1.02015639e-03  5.93095342e-03  5.00524264e-03
  1.43867683e-03  2.20106082e-03  2.03510969e-03  1.59111166e-03
  4.97908757e-03  6.72690001e-03  1.47016750e-03  2.54303429e-03
  1.21649889e-03  2.05930741e-03 -3.11855855e-04  1.23589046e-03
 -7.94217964e-05  2.16047285e-03  1.06370905e-02  1.57221293e-02
  3.12059160e-03]


-----------------------------
Next colony number 6
Number now is 8
node a = node b, possible topological change
Number of fit edges: 120
Number of cells 25 25
guess tension is [0.8965303143709011, 0.8871515862315904, 0.8636710686565149, 0.6463502985735357, 1.1527659186156674, 0.8675727862905087, 1.0824422387513066, 0.6682266701477136, 0.5813424011455017, 0.5601218813095342, 0.6992057343774892, 0.5414773509861641, 0.5559697247835376, 0.6509395313262398, 0.6094101332091961, 0.7186740787030709, 0.6944467208458324, 0.708102855809259, 0.7064801105837755, 0.5177630403005162, 0.6110805815278504, 0.5992068281880965, 0.7655780208877044, 0.8083256872301734, 0.6861521921277209, 0.7152641831113319, 0.6878252176349607, 0.8232082344741655, 0.7042064503564563, 0.8289665314134275, 0.882815031349296, 0.6487329453792994, 0.7388734238817848, 0.8161997677335295, 0.820653500748574, 0.5359463217575051, 0.8779727222204219, 0.28941773527113956, 0.41186415678422145, 0.28361699903585214, 0.2094937182428363, 0.791418602617454, 0.4807951033197262, 0.5026849716942416, 0.7851291043448252, 0.47859881828244366, 0.3452084695546757, 0.32923601391542234, 0.12810906765077845, 0.6172226218536, 0.32593929477293176, 0.547656239675278, 0.4794190542361416, 0.40177639754444716, 0.17198375491797635, 0.15117263964806235, 0.26487834462719795, 0.45685936460211996, 0.4835273011916047, 0.4159808378080241, 0.5157527432684264, 0.1470720889202075, 0.1860601549625761, 0.24609421999950293, 0.5478126260987812, 0.22209568005232141, 0.32026589218922175, 0.36081588080072413, 0.4271678133017367, 0.14170030854203572, 0.22641599979358998, 0.4678838848464773, 0.25228255324905946, 0.37436204768896614, 0.3545604879387238, 0.5987039702427349, 0.39390424101912924, 0.4734534953482039, 0.2519036906011322, 0.27864161648872127, 0.09340640485530916, 0.09919543999132589, 0.23429237409007617, 0.22864637805280355, 0.2370235413777599, 0.3067872978904681, 0.5152423511795465, 0.6064182042119524, 0.24805341418411453, 0.15712193391457863, 0.35433909019488935, 0.826483641175255, 0.0887924653675975, 0.302456501283013, 0.8367410299140002, 0.28888070851364794, 0.8449397913303376, 0.8422232107465579, 0.7863904635664158, 0.7996802814025284, 0.5950239022451039, 0.8175806017564352, 0.6290400977322393, 0.5838856810977929, 0.6013609719379289, 0.6252777643542747, 0.849592612231359, 0.9634305297881922, 0.9223266187521818, 0.7873974142962625, 0.9287096787436354, 0.8435602989656136, 0.5373974042503037, 0.8315542107654307, 0.7395218040393443, 0.7893997757612328, 0.945936285670375, 0.7651579869106131, 0.8107914554065649, 0.8415257517543777]
Function value 3.7747633896922244
Solution [0.88771453 0.87936146 0.85611398 0.66837124 1.17532377 0.85949048
 1.07589982 0.66115616 0.57456107 0.55364824 0.69297844 0.53119093
 0.5501108  0.6510409  0.60476588 0.7078535  0.68441859 0.6975511
 0.69875089 0.51172067 0.60570318 0.60138769 0.75748477 0.80245598
 0.68109523 0.70425109 0.68452041 0.82211097 0.69798863 0.83354746
 0.87075681 0.65831018 0.74553046 0.81281372 0.82250504 0.54318425
 0.85348477 0.27181976 0.38405514 0.27320647 0.20017499 0.7840074
 0.42522426 0.51023339 0.79412316 0.48720681 0.32229588 0.37936229
 0.14208189 0.5984877  0.30862346 0.55840851 0.48954456 0.3741851
 0.16215332 0.14231345 0.2563311  0.42743616 0.44895929 0.42515006
 0.52160941 0.14246396 0.17504526 0.23749539 0.5168309  0.25837778
 0.37044386 0.41959561 0.41613706 0.13304755 0.21686756 0.43452152
 0.23866359 0.34030857 0.41621271 0.57216447 0.33369472 0.42479429
 0.24209154 0.23977576 0.06517561 0.0919298  0.25640416 0.24840843
 0.25938751 0.34822707 0.46395516 0.54677115 0.28872129 0.17225683
 0.37378931 0.83280942 0.08569923 0.2714018  0.83926703 0.3145172
 0.84855069 0.84525429 0.78821994 0.80066379 0.61309491 0.83238873
 0.62396103 0.58122011 0.58783657 0.64399298 0.84917979 0.95168712
 0.92252989 0.79104579 0.9282916  0.84700772 0.53685795 0.8348705
 0.73839209 0.78708876 0.94360702 0.76278923 0.81399265 0.83823628]


-----------------------------
guess pressure is [0.005175720831271824, 0.002561428992622581, 0.007036955488632387, 0.005928778012560504, 0.002330040568403676, 0.0010201563864400442, 0.00593095342468172, 0.005005242644416601, 0.001438676829188736, 0.0022010608218764895, 0.002035109688370881, 0.0015911116553562156, 0.004979087574494262, 0.00672690001092925, 0.0014701675009330447, 0.002543034292978422, 0.0012164988949886814, 0.002059307412757722, -0.0003118558548061365, 0.0012358904590301445, 0.0021604728497554965, -7.94217964063055e-05, 0.010637090503681718, 0.015722129270660606, 0.0031205915995119707]
Function value 0.0004732352255440094
Solution [ 0.00204501  0.00217612  0.0070643   0.00618135  0.0025324  -0.00032796
  0.0059224   0.00494635  0.00172626  0.00177685  0.00234278  0.00186232
  0.00309896  0.00585235  0.00145947  0.00263656  0.00194406  0.00178147
  0.00017171  0.00148209  0.00257526  0.00262307  0.01098025  0.01623567
  0.0046428 ]


-----------------------------
Next colony number 7

Then, we make dataframes for both colony outputs

First, for CellFIT solutions

[12]:
PlottingFunctionsInstance = PlottingFunctions()
[13]:
# We first find labels of edges that are present in all the colonies
common_edge_labels = PlottingFunctionsInstance.get_repeat_edge(colonies)
common_cell_labels = PlottingFunctionsInstance.get_repeat_cell(colonies)
[14]:
# Make the dataframes
edges_dataframe, cells_dataframe = PlottingFunctionsInstance.seaborn_plot(None, colonies,
                                                                                  common_edge_labels,
                                                                                  common_cell_labels,
                                                                                  ground_truth = True)
nodes_dataframe = PlottingFunctionsInstance.seaborn_nodes_dataframe(colonies, None)

Now, for DLITE solutions

[15]:
PlottingFunctionsInstance = PlottingFunctions()
[16]:
# We first find labels of edges that are present in all the colonies
common_edge_labels2 = PlottingFunctionsInstance.get_repeat_edge(colonies2)
common_cell_labels2 = PlottingFunctionsInstance.get_repeat_cell(colonies2)
[17]:
# Make the dataframes
edges_dataframe2, cells_dataframe2 = PlottingFunctionsInstance.seaborn_plot(None, colonies2,
                                                                                  common_edge_labels2,
                                                                                  common_cell_labels2,
                                                                                  ground_truth = True)
nodes_dataframe2 = PlottingFunctionsInstance.seaborn_nodes_dataframe(colonies2, None)

We have all the dataframes now. We can plot and compare results!

[18]:
tension_table = edges_dataframe.pivot_table(
        values='Local_normalized_tensions',
        index=['Edge_Labels'],
        columns='Time')

tension_table2 = edges_dataframe2.pivot_table(
        values='Local_normalized_tensions',
        index=['Edge_Labels'],
        columns='Time')

ground_truth_tension_table = edges_dataframe2.pivot_table(
        values='Ground_truth',
        index=['Edge_Labels'],
        columns='Time')

Here’s heatmaps of dynamic edge tensions

[19]:
%matplotlib inline
sns.set_context('poster')
fig, axn = plt.subplots(1, 3, figsize = (8,6),sharey=True)
cbar_ax = fig.add_axes([1.1, .15, .01, .7], title = 'Tension')

for i, ax in enumerate(axn.flat):
    if i == 0:
        df = ground_truth_tension_table
        title = 'Ground_truth'
    elif i == 1:
        df = tension_table
        title = 'CellFIT'
    elif i == 2:
        df = tension_table2
        title = 'DLITE'
    ax.set_title(title)
    sns.heatmap(df, ax=ax,
                cbar=i == 0, vmin=0, vmax=3, cmap = 'jet',
                cbar_ax=None if i else cbar_ax)
../_images/synthetic_data_Compare_force_network_CellFIT_DLITE_26_0.png
[20]:
pressure_table = cells_dataframe.pivot_table(
        values='Pressures',
        index=['Cell_Labels'],
        columns='Cell_Time')

pressure_table2 = cells_dataframe2.pivot_table(
        values='Pressures',
        index=['Cell_Labels'],
        columns='Cell_Time')

ground_truth_pressure_table = cells_dataframe.pivot_table(
        values='Ground_truth_pressure',
        index=['Cell_Labels'],
        columns='Cell_Time')

Here’s heatmaps of dynamic cell pressures

[22]:
sns.set_context('poster')
fig, axn = plt.subplots(1, 3, figsize = (8,6),sharey=True)
cbar_ax = fig.add_axes([1.1, .15, .01, .7], title = 'Pressure')

for i, ax in enumerate(axn.flat):
    if i == 0:
        df = ground_truth_pressure_table
        title = 'Ground_truth'
    elif i == 1:
        df = pressure_table
        title = 'CellFIT'
    elif i == 2:
        df = pressure_table2
        title = 'DLITE'
    ax.set_title(title)
    sns.heatmap(df, ax=ax,
                cbar=i == 0, vmin=-1, vmax=1, cmap = 'jet',
                cbar_ax=None if i else cbar_ax)
../_images/synthetic_data_Compare_force_network_CellFIT_DLITE_29_0.png