tag:blogger.com,1999:blog-10866627141461821402024-02-20T00:25:56.326+01:00Mathieu Leocmach's research logMathieu Leocmach researcher in soft condensed matter physics shows what is research on a day-to-day basisMathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-1086662714146182140.post-17878123105909927542020-11-16T22:37:00.001+01:002020-11-16T22:37:57.866+01:00Texture analysis by DiRDiP<p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">Imagine you have a set of points evolving in time. It can be the center of colloidal particles in a suspension, of cell nuclei in a tissue, of bubbles in a foam, of people in a crowd. You also have a way of defining which point is bonded to which one. Two people are bonded if they hold hands. Two nuclei are bonded if their respective cell membranes touch. Two bubbles are bonded if they share a soap film. Two colloidal particles are bonded if they are within a certain distance from each other.<br /></span></p><p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">And now you make this dynamical, with people moving and handshaking around, bubbles deforming to flow through a funnel, colloidal suspension beeing sheared, tissue trying to fix the scar of a scalpel cut. Your points are moving and your bonds can stretch, rotate, break or be born.<br /></span></p><p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh25e7WY4whbqY6SvaBwdZckcxmY_8jtjJ7oO3WckEhEvaDvW7LB-sQCJEyPJNcQaX04t4dLDa4RwypcVQymfJvJR8LgqL6QRuSO4JqgkuVUD6xN5cEJmjXkNqZZsmsQYwgIoheadpKFgc/s615/graph_evolution.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="220" data-original-width="615" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh25e7WY4whbqY6SvaBwdZckcxmY_8jtjJ7oO3WckEhEvaDvW7LB-sQCJEyPJNcQaX04t4dLDa4RwypcVQymfJvJR8LgqL6QRuSO4JqgkuVUD6xN5cEJmjXkNqZZsmsQYwgIoheadpKFgc/w400-h143/graph_evolution.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A set of 9 positions with bonds between them, evolving in time. The positions can move, the bonds can appear (green) or disappear (red).<br /></td></tr></tbody></table><br />How would you characterize this mess? How to make statistically significant observations of such an ensemble of discreet events? How to deduce anything about the response properties of your system? </span></p><p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">One way is to translate the original discreet description of the evolution of the system (discreet points moving and discreet bonds deforming, appearing or disappearing) into a continuous description in terms of strain field. Even better, in terms of strain field<u>s</u>: the reversible part of the strain that correspond to the bonds that deform without breaking on one hand, and on the other hand the irreversible part of the strain that corresponds to the bonds that appear or disappear.<br /></span></p><p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">I've just released <a href="https://github.com/MathieuLeocmach/dirdip">a piece of code</a> that does just that.</span></p><p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">It's based on a great method published by <a href="https://doi.org/10.1140/epje/i2007-10298-8">François Graner and Benjamin Dollet in 2008</a> that allow to go from the set of point to the mechanical properties of the system. This paper is great, pedestrian and extremely clear on every detail. I really recommend the read if you know a bit about strain tensors and continuous mechanics.</span></span></p><p><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">Unfortunately, the original implementation of this analysis in Delphi was lost and later implementations in Matlab were never brought to releasable form. That is why I reimplemented everything in Python - I hope in a clean enough way - so that others will be tempted to use this method.</span> </span> <br /></span></p><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">This new implementation relies only on <a href="https://numpy.org/">Numpy</a></span><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"> and <a href="https://numba.pydata.org/">Numba</a> for optimized calculations, and on <a href="https://matplotlib.org/">Matplotlib</a> </span><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">to display the results. </span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"> </span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">I've cooked up examples to show how to use <a href="http://soft-matter.github.io/trackpy">Trackpy</a> results stored in</span> <a href="https://pandas.pydata.org/">Panda</a><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><a href="https://pandas.pydata.org/">s</a> dataframes as positions and how </span><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><a href="https://docs.scipy.org/doc/scipy/reference/spatial.html"><span style="font-family: inherit;">scipy.spatial</span></a> can be used to define bonds.</span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"> </span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">Following the title of the original paper, the code is named DiRDiP, for <b>Di</b>screte <b>R</b>earranging <b>Di</b>sordered <b>P</b>atterns.<br /></span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"> </span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">The code can be cited using the DOI provided by Zenodo: </span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">Mathieu Leocmach, DiRDiP, <a href="https://doi.org/10.5281/zenodo.4276047">https://doi.org/10.5281/zenodo.4276047</a> (2020)</span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><br /></span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><br /></span></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><h4 style="text-align: left;"><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">What the code takes as input</span></h4></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><ul style="text-align: left;"><li><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">Two arrays of coordinates at two different times. The dimensionality is arbitray, but for most applications 2D and 3D will be enough.<br /></span></li><li><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">Two sets of bonds, each linking positions at one of the two times.</span></li><li><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0">A grid on which to compute the continuous description. I've implemented the rectilinear grid in any dimension, the regular grid in any dimension, and the polar grid in 2D. Implementing other grids (spherical, cylindrical, etc) would be rather easy.</span></li></ul></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><h4 style="text-align: left;">What the code outputs</h4></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en">Arrays of matrices, one matrix per grid element. Exemple of matrices (as defined in the paper):</div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><ul style="text-align: left;"><li>statistical velocity gradient</li><li>statistical rotation rate</li><li>statistical topological rearrangement rate</li></ul><p>There is a submodule dedicated to displaying such arrays of matrices in Matplotlib.<br /></p></div><div class="css-901oao r-hkyrab r-1qd0xha r-1blvdjr r-16dba41 r-ad9z0x r-bcqeeo r-bnwqim r-qvutc0" dir="auto" id="tweet-text" lang="en"><h4 style="text-align: left;">What the code does not do</h4><div style="text-align: left;"><ul style="text-align: left;"><li>Localize interesting points and link their positions in time. Use <a href="http://soft-matter.github.io/trackpy">Trackpy</a> for that, or what fits to your problem.</li><li>Decide which points are linked together. This dependes so much on the physics or biology of your system. Some possible geometrical criteria are implemented in <a href="https://docs.scipy.org/doc/scipy/reference/spatial.html"><span style="font-family: inherit;">scipy.spatial</span></a>, like Voronoi neighbourhood, k-nearest neighbours, distance criterion, etc.</li><li>Decide how to average the results to obtain statistical significance. But you know, averaging numpy arrays is pretty easy. For example, if you have a seady state, you may want to average in time the arrays resulting from two successive time steps. If you have a spatial symmetry or invariance in your system, you may want to exploit it.</li></ul><h4 style="text-align: left;">What I am proud of</h4><ul style="text-align: left;"><li>Unit tests</li><li>Documentation of each function</li><li>Some examples</li></ul><h4 style="text-align: left;">What it still lack to be perfect</h4><div style="text-align: left;"><ul style="text-align: left;"><li>A tutorial</li><li>A generated documentation </li><li>More users<br /></li></ul></div></div><span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0"><span style="font-size: x-small;"><span style="font-size: 10pt;"></span></span></span></div>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-64316620528050085792020-03-14T09:41:00.001+01:002020-03-14T09:41:30.803+01:00Tracking contacts<div>Recently, I am trying to figure out how to detect topological changes in a gel network as it breaks. In other words, I am tracking contacts as a network is loosing its connectivity.</div><div><br></div>As the schools and universities are closing, as I am myself practicing social distancing, the irony is not lost on me.<div><br></div><div>My immediate and regular contacts are my wife and children, my parents and family living in the same city, my colleagues, the members of my akido club, the parents I meet at the bus stop, friends I see for games, and more distantly the people on the market, at the canteen and in public transportation.</div><div><br></div><div>This last one is limited to a minimum since I am mostly commuting by bicycle. I won't meet other parents now that schools are closed. Social distancing means for me: not going to aikido (the club will close anyway), moving games online, not meeting my parents and family in person. I will also work from home as much as possible, including avoiding the canteen. The two PhD students I advise are warned and we have ways to communicate online.</div><div><br></div><div>We'll get through this responsibly, limiting damage to public health and our research. That said, I'll go back to my network analysis on Monday, with 3 kids at home.</div>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-83222056496631493132020-01-29T12:09:00.001+01:002020-01-29T12:09:24.077+01:00TexMaker and input methodI write in LaTeX very often, either online via <span style="font-family: "Courier New", Courier, monospace;">Overleaf</span>, of locally on <span style="font-family: "Courier New", Courier, monospace;">Texmaker</span>.<br />
<br />
Recently, I have to write a report in French, so I need to type accented characters, including "ê". On a french keyboard, one has to type the "dead key" "^" and then the key for "e". But when I did so in <span style="font-family: "Courier New", Courier, monospace;">Texmaker</span>, I only got the "e", not "ê", as if I did not push on the dead key "^". It was pretty general, since I could not even get the accent alone like in "\^{e}" or on any other letter â, û, î, ô, etc. Since everything was working fine on all other applications, it must be a <span style="font-family: "Courier New", Courier, monospace;">Texmaker</span> problem.<br />
<br />
To make a long story, full of googling and forum and tials and errors, short, I discovered that is was a conflict between <span style="font-family: "Courier New", Courier, monospace;">Qt</span> (the graphical layer powering the interface of <span style="font-family: "Courier New", Courier, monospace;">Texmaker</span>) and <span style="font-family: "Courier New", Courier, monospace;">ibus</span>, the input method switcher I was using to write either in French or in Japanese.<br />
<br />
The workaround I found was to install another input method switcher: <span style="font-family: "Courier New", Courier, monospace;">fcitx</span>.<br />
<br />
Now I confess, this blog post is more a note for me to remember the procedure. But it may help others.<br />
<br />
So, things are explained on <a href="https://wiki.debian.org/InputMethodBuster" target="_blank">this page</a>.<br />
<ol>
<li>One need to have <span style="font-family: "Courier New", Courier, monospace;">fcitx</span> and <span style="font-family: "Courier New", Courier, monospace;">fcitx-mozc</span> installed</li>
<li>Type in the terminal <span style="font-family: "Courier New", Courier, monospace;">im-config</span> and select fcitx, validate</li>
<li>reboot (closing the session is not sufficient)</li>
<li>A keyboard icon shows up (on top bar for me). Right click, configure. Ask for your default keyboard (French for me). Validate and close.</li>
<li>Right click again on the keyboard icon, configure. Now you have access to all input methods, including mozc. Add mozc. </li>
<li>Selecting mosc on the list, click on the bottom icon showing some tools. In the menu, select the layout of your physical keyboard (French AZERTY for me). Validate and close.</li>
</ol>
Now, I might be a bit optimistic in this procedure because I actually tried much more things. Maybe between step 2 is actually more complex:<br />
<ol>
<li>Disable <span style="font-family: "Courier New", Courier, monospace;"><span class="backtick">ibus</span></span> for Gnome<br /><pre>sudo dpkg-divert --package im-config --rename /usr/bin/ibus-daemon</pre>
</li>
<li>Reboot</li>
<li>Type in the terminal <span style="font-family: "Courier New", Courier, monospace;">im-config</span> and select fcitx, validate</li>
<li>Reboot</li>
<li>(maybe) Enable back <span style="font-family: "Courier New", Courier, monospace;"><span class="backtick">ibus</span></span> for Gnome<br /><pre>sudo dpkg-divert --package im-config --rename --remove /usr/bin/ibus-daemon</pre>
</li>
<li>Reboot </li>
</ol>
Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-19419886593440796032019-05-03T15:34:00.000+02:002019-05-03T15:36:14.164+02:00How does a gel become mechanically stable?Gels are strange materials. They are mostly made of a liquid, however they are solid. This solidity comes from the structure of the gel: a dilute solid network.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Oy-yxUbDbXwzA2DOYWWyxFWV7B7JUJ_XPr3blTXeNUWRP42aKl5bRT1M6uAb6GKxR5OSVlGeGJWBqcG7pSiugLXVulbIik3icuuMdfn81rJaSeJwO8kqDWKB4_z5lIhhUENW6QNG_xgq/s1600/TEM_yaourt_5um.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="737" data-original-width="873" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Oy-yxUbDbXwzA2DOYWWyxFWV7B7JUJ_XPr3blTXeNUWRP42aKl5bRT1M6uAb6GKxR5OSVlGeGJWBqcG7pSiugLXVulbIik3icuuMdfn81rJaSeJwO8kqDWKB4_z5lIhhUENW6QNG_xgq/s320/TEM_yaourt_5um.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Transmission electron micrograph of a casein gel.</td></tr>
</tbody></table>
See the network in the above picture? Here the strands of the network are made of aggregated proteins. The holes, or pores, are permeated by water.<br />
<br />
A gel network can be made of various building blocks. For example if you take very long, linear molecules that you crosslink from time to time, you get a polymer network. If this network is swelled by a solvent, then it is a gel. That is the case of panna cotta, where long collagen molecules from the gelatin associate into a network to imprison the creamy milk.<br />
<br />
In the case of a yogurt, you start from globular proteins called caseins (think of little balls) dispersed in water. If you make them attract each other, the proteins will spontaneously aggregate into a network.<br />
<br />
From a mechanical point of view, these two cases look quite different. Long molecules are floppy, adopt many configurations. If you pull on such a long molecule, you are decreasing the number of configurations it can adopt. This is costly in terms of (free) energy, so it is hard to pull, as if the chain was a little spring. Now is you assemble such springs into a network, it is quite obvious that you will get a solid that is easy to deform.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLUelF9wW05FOqeVt7Mce__P_sVH6DipYcfKk56l77PKML8wba354xpBKKksDRmbvSy2pHVZ5sjz5nZjFLaV-AoqqbEQQ1fIYVmdghALla6cji7481F8bYhItIXb9eddYICpsrS1eBBQHY/s1600/isotropic_percolation.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="266" data-original-width="535" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLUelF9wW05FOqeVt7Mce__P_sVH6DipYcfKk56l77PKML8wba354xpBKKksDRmbvSy2pHVZ5sjz5nZjFLaV-AoqqbEQQ1fIYVmdghALla6cji7481F8bYhItIXb9eddYICpsrS1eBBQHY/s400/isotropic_percolation.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Using the path in black, it is possible to go from one end of the sample to the other. This sample is percolated. The black path is a percolation path.</td></tr>
</tbody></table>
<br />
<br />
Now, if you assemble sticky balls into a network, and if you pull on it, will it deform elastically or immediately break down into pieces? What are the conditions to make a particle gel stable? The answer to these question is not obvious and there have been many different answers in the literature.<br />
<ol>
<li>In polymer gels, having a percolating network is enough to have mechanical stability. Percolation means that it is possible to find a path along the network that goes from one end of the sample to the other. But many observation concluded that this was not enough to have mechanical stability in the case of particle gels.</li>
<li>A glass is mechanically stable because its particles are not able to rearrange, trapped by the cage formed by their neighbours. This concept was imported into gels by saying that particles were trapped by the attractive bonds they formed with their neighbours. This theory allows arrest, but does not explain the network structure of the gel. For a long time it was thought that a combination of percolation and glassy arrest could explain gel stability.</li>
<li>About a decade ago the paradigm shifted. There was this class of phase separation called "spinodal decomposition" that spontaneously formed a bicontinous pattern: a phase rich in particles intertwined with a phase poor in particles. Usually the pattern coarsen with time until complete separation of the phases. But it was found that if the particle-rich phase is dense enough to undergo a glass transition, then it becomes arrested and the structure stop evolving. So we get a network structure and thus a gel. This is called the arrested spinodal theory. However at very low volume fractions it does not describes well some observations. More importantly, it does not predicts the mechanical behaviour of the gel.</li>
<li>But there are other ideas in the literature that come more from a mechanical point of view. Back in the 19th century, Maxwell stated that mechanical stability was ensured if the number of mechanical constraints is equal to the number of degrees of freedom. From example, if you live in 3D space (I do), you have 6 degrees of freedom : you can move east, west, north, south, up and down and any combination of theses. If you are blocked so that you can't move north, can't move south, can't move east, can't move west, can't move up and can't move down, then you cannot move anywhere. So you are stable. This concept of "isostaticity" is very useful at the macroscopic scale, when you want to build a bridge or when you want to understand sand piles. But is this concept relevant when each particle is jiggling around due to thermal motion? In 2012, a paper found that when you look at a gel before and after breaking it, you find a decrease of the particles that have 6 or more bonds. These are actually the particles that should be stable, since each bond is a constrains, so higher than 6 you shouldn't be able to move.</li>
<li>In 2016, percolation stroke back. A paper found that not all paths along the network were important. If you considered only paths that never turned back, that were "directed", then you are interested in "directed percolation", not "isotropic percolation". The authors found that all their samples where directed percolation took place were mechanically stable, and that no other sample was. So, is directed percolation the cause of mechanical stability? For the moment, just remember that their samples were very dilute (less than 10% of particles).</li>
</ol>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKc3rQGhEOZtEPLUgxy5JnhcDP276O_4DI0sflJLsKVyQMC_0ududrdxcMJs6FRWFLVgey-2PzWR8m02Ec0IW9uuifr0tMav6zEhlAQtVlx_x_nNy31Vi2W-pQncoTsM3nPY7rgVUpXXHQ/s1600/directed_percolation.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="195" data-original-width="532" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKc3rQGhEOZtEPLUgxy5JnhcDP276O_4DI0sflJLsKVyQMC_0ududrdxcMJs6FRWFLVgey-2PzWR8m02Ec0IW9uuifr0tMav6zEhlAQtVlx_x_nNy31Vi2W-pQncoTsM3nPY7rgVUpXXHQ/s400/directed_percolation.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The path in black is a percolation path that never turn back. This is a directed percolation path.</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
Here we arrive on the scene with <a href="https://lamson-research.blogspot.com/2017/11/crystalline-gels.html" target="_blank">our method</a> to follow experimentally each individual particle during the process of gelation. All previous experiments were done by observing the state of the already formed gel. So the only influence that had been studied was the fraction of solid particles and the strength of the interactions. Here we add another axis: time.<br />
<br />
We asked this question: can we observe when a gel become mechanically stable, and how is the microstructure changing at that moment?<br />
<br />
First, we had to find a way of checking whether the suspension was mechanically stable or not. Usually you do that by putting the suspension in a rheometer, you oscillate at very low amplitude to measure the mechanical response. This response has two parts: elastic and viscous. If the viscous part is larger than the elastic part, the suspension is still liquid. If the elastic part is larger than the viscous part, the suspension is solid, so the gel has become mechanically stable. But in our case we need large (3 micron) particles to be able to observe everything in minute details. Large particles makes extremely soft gels. So soft that the rheometer does not have enough sensitivity.<br />
<br />
Therefore, we ditch the idea of a rheometer altogether and only look at the response of the system to thermal agitation. The sample is just under the microscope and we record the trajectories of all the particles due to thermal agitation. If particles are able to diffuse away freely, it means that the suspension is liquid. If the particles are stuck and vibrate around a mean position, it means that the suspension is solid. Actually, a clever method call microrheology manages to transform the displacement of the particles into a measure of the mechanical response, elastic or viscous. In this way, we know exactly when our suspension becomes a mechanically stable gel.<br />
<br />
In parallel, we can follow the progress of percolation. The usual isotropic percolation occurs always way before mechanical stability. Explanation (1) is out of the game.<br />
<br />
We can also follow directed percolation. It occurs later than isotropic percolation, and actually for dilute gels (below 10-12% particle fraction), the time of directed percolation matches very well the time of mechanical stability. But, it does not work at all a higher volume fraction. Mechanical stability occurs sometimes 5-15 times later than the directed percolation. So, obviously explanation (5) is not general.<br />
<br />
Now, we can look at isostatic particles, these particles that have 6 or more neighbours. Are these particles percolating? Yes, they are, and always at the exact time where mechanical stability sets in (see error bars in the paper, because science has error bars). So explanation (4) seems to be the correct one.<br />
<br />
But then, why does explanation (4) give the right time at low particle fraction?<br />
<br />
Look at the cartoons below. This is in 2 dimensions, so isostaticity means having 4 neighbours, not 6 like in 3D. Isostatic particles are shown in purple.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA1CSTiZzOXSY91R3IKmahfGUB202y-gzYRtvLgh4AbsuKkN8ULQ6MCCYYWJb3ccDWXTVgeBTTBQGxAE6Y3MORkUrR_GQUBE7EU-HmFz0mw5YdnDLk8sbWrHZITI25BaOmtRwkThAVlOhyphenhyphen/s1600/pathsA.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="288" data-original-width="1024" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA1CSTiZzOXSY91R3IKmahfGUB202y-gzYRtvLgh4AbsuKkN8ULQ6MCCYYWJb3ccDWXTVgeBTTBQGxAE6Y3MORkUrR_GQUBE7EU-HmFz0mw5YdnDLk8sbWrHZITI25BaOmtRwkThAVlOhyphenhyphen/s400/pathsA.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Path to gelation in the dilute case</td></tr>
</tbody></table>
In the dilute case (less than 10-12%)<br />
<ul>
<li>When particles begin to aggregate, they form very loose clusters, very open and far from each other.</li>
<li>These clusters compact. Particles make more bonds within the same cluster, but clusters are too far away from each other to meet now. Because of this compaction, the heart of each cluster is now isostatic.</li>
<li>Clusters finally begin to meet and form larger and larger clusters, until you get a percolating path. In this situation, you have groups of isostatic particles that are bridged by floppy non-isostatic bridges.</li>
<li>In order to make more bonds, floppy bridges have to straighten. So at the time isostaticity percolates through the system, the network is mostly made of straight paths. So directed percolation is easy and occur at the same time.</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAI4THpxNR8bj3i3hGR3Ug1f382DdeJkLlwiCHtK24mSxxFufnn_u30ldPjVl0LOsIgwO8ujCE3B_vMMfgsfui4ooh8lcv5Uafq_NsGCKrvB1WWDTLrs0IaTQk7B4YMnjHxGO3WBy9C3Q4/s1600/pathsB.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="288" data-original-width="1024" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAI4THpxNR8bj3i3hGR3Ug1f382DdeJkLlwiCHtK24mSxxFufnn_u30ldPjVl0LOsIgwO8ujCE3B_vMMfgsfui4ooh8lcv5Uafq_NsGCKrvB1WWDTLrs0IaTQk7B4YMnjHxGO3WBy9C3Q4/s400/pathsB.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Path to gelation in the dense case</td></tr>
</tbody></table>
<br />
In the dense case (more than 10-12%)<br />
<ul>
<li>When particles begin to aggregate, they are so close together that there is no space between clusters. Very quickly a percolating network is formed.</li>
<li>That is only after the formation of this initial network that rearrangements occur. More bonds are created locally and this is enough to obtain a directed percolating path.</li>
<li>Compaction continues to proceed until isostaticity percolates. That only then that the gel is mechanically stable.</li>
</ul>
That explains why directed percolation looks like a good explanation if you look only at dilute samples.<br />
<br />
To conclude, we can view a gel as a network that is sculpted and arrested by mechanical forces. Our mechanical explanation does not really contradict the arrested spinodal theory that is more thermodynamics. But we hope that explaining gels by mechanics will help understand the mechanics of gels. For example, we still do not understand why some particle gels break into well-defined and irreversible fractures (think yogurt) whereas some others just flow plastically and reversibly (think toothpaste or fresh cement).<br />
<br />
If you want to dig more in depth, our paper is scheduled to be published the 31th of May 2019 in Science Advances, and a preprint is already available on ArXiv:<br />
H. Tsurusawa, M. Leocmach, J. Russo, H. Tanaka, Direct link between mechanical stability in gels and percolation of isostatic particles. <a href="http://dx.doi.org/10.1126/sciadv.aav6090" target="_blank">Sci. Adv. 5, eaav6090</a> (2019). <a href="http://arxiv.org/abs/1804.04370" target="_blank">arXiv:1804.04370</a>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-62191355724287554372019-01-18T16:39:00.000+01:002019-01-18T16:44:38.541+01:00Want to study how flocs, swarms or crowds flow? I'm looking for prospective PhD studentHave you ever seen the patterns made by birds, sheeps or insects when they come together? There is no boss in the mass of living bodies, however they self-organize.<br />
<br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/V-mCuFYfJdI?start=24" width="560"></iframe><br />
<br />
The same kind of patterns can be seen at the microscopic scale in colonies of bacteria or in living tissues.<br />
<br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/q27Jn3h4kpE?start=24" width="560"></iframe><br />
<br />
And recently, I've been working on non-living microscopic particles that self-propel, displaying <a href="https://static-content.springer.com/esm/art%3A10.1038%2Fs41467-017-02625-7/MediaObjects/41467_2017_2625_MOESM3_ESM.avi" target="_blank">the same kind of patterns</a>.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7G8Pm8k26G0b03EpVN5B771F167r9C6Kybuk6MiZqO6WtT9exLiylFFC8BF7kK2fP8hFur3D8qYHBGiPk_uRhTWnchr6adwdb4UvAqrIXv6GEjV9SXxrJJ8VJX8Fykie34aXJZYU705yq/s1600/active_flou.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="471" data-original-width="1236" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7G8Pm8k26G0b03EpVN5B771F167r9C6Kybuk6MiZqO6WtT9exLiylFFC8BF7kK2fP8hFur3D8qYHBGiPk_uRhTWnchr6adwdb4UvAqrIXv6GEjV9SXxrJJ8VJX8Fykie34aXJZYU705yq/s400/active_flou.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Long exposure picture of self-propelled particles</td></tr>
</tbody></table>
<br />
<br />
A lot of beautiful physics has been done in the last decade about this class of system. Now it's known as "Active Matter".<br />
<br />
Patterns are mesmerizing, physics is intellectually pleasing, but what is the purpose? What do you make out of this "Active Matter"? Can you build a bridge? Power your home? Cure cancer ?<br />
<br />
Well, maybe.<br />
<br />
It becomes clearer by the day that cancer metastasis is a swarm of cancer cells migrating through the body, very close to the above patterns. In which conditions the solid tumour becomes a liquid-like swarm? How to influence this transition? These are actual questions physicists and biophysicists are asking right now.<br />
<br />
Maybe you can't power a house with active matter, but maybe you can make it do the worm of pumping the water of your shower. It has been found that a suspension of swimming micro-organisms flow more readily (has a lower viscosity) than the suspension of dead micro-organisms. Furthermore, in some situations, the viscosity is even lower than the liquid alone, without micro-organisms! They swim, converting their food into movement, and this moment helps the water flow up the pipe.<br />
<br />
And can we build something? Maybe not a bridge, but a muscle that would be able to contract from the action of trillions of micro-motors. Or some kind of new material that would react to a push to the left by deforming to the right?<br />
<br />
To understand this last point, I am looking for a PhD student interested in physics, mechanics, materials and afraid neither to code nor to perform experiments. This is an experimental investigation. See the announcement (2 pages, FR then EN) on my lab's <a href="http://ilm.univ-lyon1.fr/images/ILM/emplois/m2/2018/stage-M2-LeocmachCottinBizonne-ActiveMatterRheologie.pdf" target="_blank">website</a>.<br />
<br />Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-75523112707733999972018-02-05T08:56:00.001+01:002018-02-05T09:16:52.331+01:00Crystalline gels ArXiV<div dir="ltr">
Our paper on how crystalline gels form is out on the ArXiV <a href="http://arxiv.org/abs/1802.00772">http://arxiv.org/abs/1802.00772</a></div>
<div dir="ltr">
Very timely weather today in Lyon: first day of snow of the year (second of the winter). Lots of Bergeron processes happening up there.</div>
<div dir="ltr">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR70IgK-Oz11FFpIl_gVENHURwJ6QsK6O3Xe7vVDaGQN2prGWS8OnUbYdfhlAQBH5Oan709bS9icFgYoYZXC0AmMpbk-psc_j6D6YTxfRKbzp-815bOM6AuuMzwEkeXFwaviSZcwWr-ivG/s1600/1517817092642.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"> <img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR70IgK-Oz11FFpIl_gVENHURwJ6QsK6O3Xe7vVDaGQN2prGWS8OnUbYdfhlAQBH5Oan709bS9icFgYoYZXC0AmMpbk-psc_j6D6YTxfRKbzp-815bOM6AuuMzwEkeXFwaviSZcwWr-ivG/s400/1517817092642.jpg" width="400" /> </a> </div>
Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-14692744664660122017-11-08T00:02:00.000+01:002017-11-08T00:02:08.008+01:00Crystalline gelsWhat happened this summer, part 2/n<br />
<br />
We have a paper out in Nature Materials on how crystallisation can help make a gel.<br />
Tsurusawa, H., Russo, J., Leocmach, M., & Tanaka, H. (2017). <i>Formation of porous crystals via viscoelastic phase separation.</i> <a href="http://doi.org/10.1038/nmat4945" target="_blank">Nature Materials</a>, 16(10), 1022–1028.<br />
<br />
This is the second result of my collaboration with the lab of Hajime Tanaka, where I did my PhD. You haven't heard about the first result? We are still writing it down. In academia chronological order is not always granted.<br />
<br />
It all started with a crazy idea from the boss and an even crazier “I'll try that” from a fresh PhD student around April 2008. It took Hideyo almost three years, including a depression, to hammer this idea into a working experimental setup and one more year to perform the experiments before graduating. Then he joined a private company and left me with a mountain of data to analyse. I had followed the story from the beginning as we started our PhD at the same time. I had completed my PhD on colloidal glass a year before he finished his about colloidal gels. Different subjects but many common methods. Hideyo was a skilled experimentalist, I was more keen on developing analysis methods.<br />
<br />
We were both working with large colloidal particles (plastic balls of 3 microns in diameter) dispersed in an oily solvent. This system is perfect for observing in 3D at the particle level whatever physical phenomenon. The particles are charged and repel each other at long range. In water, you usually have plenty of dissolved ions. These ions tend to screen electrostatic repulsion, which means that same charges do not repel each other if they are further than 10 nm, at most 100 nm in extremely pure and neutral water. However in our oily solvent there are very few dissolved ions and electrostatic charges still can feel each other 10 microns apart.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsDJfoAom7l6mgV6senrD_v9RQMcDDmLp0KFKHbV78YpbawXicjMW-LueLSDWgOOa-hS8z0cKwLl1oST-PbCpWR-iAWamHKdUzkmNlgBRv0QXmuBJNipjdUSlufliHfBoZawaN9uhKPgiQ/s1600/interactions-1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="223" data-original-width="652" height="109" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsDJfoAom7l6mgV6senrD_v9RQMcDDmLp0KFKHbV78YpbawXicjMW-LueLSDWgOOa-hS8z0cKwLl1oST-PbCpWR-iAWamHKdUzkmNlgBRv0QXmuBJNipjdUSlufliHfBoZawaN9uhKPgiQ/s320/interactions-1.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Engineering interactions between colloidal particles. Refractive index matching and hairs ensures hard repulsion at contact. Charges provide long range repulsion but can be screened by ions. Non adsorbing polymers induces short range depletion attraction.</td></tr>
</tbody></table><br />
<br />
For me it was a bane since I wanted colloidal glasses, that is concentrated suspensions with particles close to contact. So I added some strange salts able to dissolve into the oil, providing ions that would shorten the range of repulsion. At that time, it was known that if you added polymers to the mix, they induced a short ranged attraction between particles and even at low particle content you could obtain a network of particles.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTKosKppARp9wHYNT_9uf8qknbr_xJ550yAhMckQkJcfn2g40NjaoZMmqfMZUosvD2TlRcoSpsgzNuL2Ek6WMLu-Habq2RAD2TJMOwc1ciNZt6X0RRTs2_xwchEe4Bew71miVf31ywRqaT/s1600/Cap362_Snapshot1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="256" data-original-width="512" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTKosKppARp9wHYNT_9uf8qknbr_xJ550yAhMckQkJcfn2g40NjaoZMmqfMZUosvD2TlRcoSpsgzNuL2Ek6WMLu-Habq2RAD2TJMOwc1ciNZt6X0RRTs2_xwchEe4Bew71miVf31ywRqaT/s320/Cap362_Snapshot1.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A colloidal gel observed by confocal microscopy</td></tr>
</tbody></table><br />
<br />
Such a solid network intertwined with a liquid solvent is called a gel. Yogurt is a gel, as most of our foods, organs, and many cosmetics. How gels form is still quite mysterious. We know that particles that attract each other would prefer to be grouped all together, leaving a large swath of empty solvent aside. A bit like when salad dressing unmix with oil on one side and vinegar on the other. Except that a yoghurt does not expel all the whey otherwise nobody wants to eat it. Some phenomenon stops the separation and allows the stability of the network. Except that your skin cream that was nice and stable yesterday just collapsed in a separated mess this morning. Nobody knows why and when a gel will suddenly lose its stability.<br />
<br />
To understand that, we have to know why the phase separation arrests in the first place. We have to know how a gel forms. And for this we want to observe gel formation with our large colloids to be able to follow what is going on in every detail. But nobody knew how to do that.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRbV8Py3q6yRy9pJolgjdzKRXr3WrtfYvq9I_RbsT-IDO-CVgiWNi2rSGZiM4X3VypR3EcMLZjYBDwDCFBQBbgI27vvfvtUSIYCLF6IBII_wSxMmFyDuJu3kDreNcBFJq5hDU3O03-o9je/s1600/cell-1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="391" data-original-width="437" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRbV8Py3q6yRy9pJolgjdzKRXr3WrtfYvq9I_RbsT-IDO-CVgiWNi2rSGZiM4X3VypR3EcMLZjYBDwDCFBQBbgI27vvfvtUSIYCLF6IBII_wSxMmFyDuJu3kDreNcBFJq5hDU3O03-o9je/s200/cell-1.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sketch of the semi-permeable cell</td></tr>
</tbody></table><br />
<br />
That when Hajime Tanaka had his crazy idea. Let's mix particles and polymers together but without salt. We have a short range attraction that is hidden by the long range repulsion. The suspension is stable with particles that stay far away from each other. We put this suspension in a chamber suitable for microscopy where the bottom is a membrane filter. Pore size is chosen so that neither colloidal particles nor polymers can go through, but salt can. Now we put everything under the microscope, add a salty solution on the other side of the membrane, and see the suspension forming a gel.<br />
<br />
What is especially great with this idea is that with large particles and thin enough sample chamber ions diffuse so fast across the chamber that switching off the repulsion is practically instantaneous from the point of view of the slowly diffusing particles.<br />
<br />
It seems simple but it took a couple of years or engineering to get the method right. Thanks Hideyo for toiling on that. Thanks also to John who analyzed a subset of the data and found that there was something strange going on; something that was at odd with existing models. Thanks also for calling me back to participate in that exciting story, even if I originally had to analyse a different subset of the data.<br />
<br />
The most common model for gel formation relies on glass transition. If you cool a liquid without crystallising it it will slow down so much that it hardly flows anymore. One could wait the age of the universe before observing any flow. So practically what was a liquid is now a solid, disordered like a liquid. This is the definition of a glass. You can also obtain a glass by compression rather than cooling. The phase separation between a particle poor phase and a particle rich phase is analog to a gas-liquid phase separation. The colloidal gas contains almost only solvent and the colloidal liquid is very concentrated in particles. What the model says is that the liquid is son concentrated, so dense, that it become a glass. To sum up, a special type of phase separation (a “spinodal decomposition”) creates a liquid network, but this liquid becomes a glass and so the network arrests and becomes solid.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr> <td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg0Y_tdB6ifwDjg8c3DlOZvdVDVyzJRxlOTwtg6givKEC10xMjYqW9DUHBq01nbkd3Mjb3ktHQ073TazoL-X9zgsCkMCEg8vGsIId91uEcFYrLKF8UR3StVO7VSAtBEZArXaTNzgNkuXOR/s1600/slice_article_highcp_t800.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="256" data-original-width="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg0Y_tdB6ifwDjg8c3DlOZvdVDVyzJRxlOTwtg6givKEC10xMjYqW9DUHBq01nbkd3Mjb3ktHQ073TazoL-X9zgsCkMCEg8vGsIId91uEcFYrLKF8UR3StVO7VSAtBEZArXaTNzgNkuXOR/s1600/slice_article_highcp_t800.jpg" /></a></td> <td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbEiyU0T7ULkcmaoV3P0zZcrtxcRbjLa9woqvdWRCy1E7MzhNEK62g2jkr8ps2nV86GmpstgoeiZJzbyBpUNmZ0tFi647A8apZ3ZaI_jWhMzXZfznB75NNdxjywzQR5p6KVYrawrEPYC6O/s1600/slice_article_t120.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="256" data-original-width="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbEiyU0T7ULkcmaoV3P0zZcrtxcRbjLa9woqvdWRCy1E7MzhNEK62g2jkr8ps2nV86GmpstgoeiZJzbyBpUNmZ0tFi647A8apZ3ZaI_jWhMzXZfznB75NNdxjywzQR5p6KVYrawrEPYC6O/s1600/slice_article_t120.jpg" /></a></td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">Reconstruction of gel structure. Gas particles in orange, liquid in grey, crystal in purple. Left: strong attration, thin network. Right: weaker attraction, stress-driven rearrangement is possible and thus crystallisation.</td></tr>
</tbody></table><br />
<br />
In our experiments we observed a very different scenario. The network formed, but strands were so thin (one or two particles thick) that we had a hard time calling it a liquid or a glass phase. In some conditions (weaker attraction) some strands snapped and the network could coarsen a bit more, maybe 4-5 particles thick. Here occurred the unexpected: crystallisation.<br />
<br />
Because there was enough space available in the liquid network, the particles in the network were able to rearrange locally to form crystal nuclei. Instead of a disordered glass we obtained a network full of ordered crystals.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHXuOFrL4O88oMgAWgC70CBxDfUhh7LqU5Egc0_NrYOXDcP-fxT-CBbnYU4IPntqb89prlAQeTXuEZV9L8Vuraesmor1PI8QYfk6uoNugdRXuT8hXT2TGEuDJ5lVqJq0B4XuCL_HCKb0C5/s1600/slice_article_t120.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="256" data-original-width="256" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHXuOFrL4O88oMgAWgC70CBxDfUhh7LqU5Egc0_NrYOXDcP-fxT-CBbnYU4IPntqb89prlAQeTXuEZV9L8Vuraesmor1PI8QYfk6uoNugdRXuT8hXT2TGEuDJ5lVqJq0B4XuCL_HCKb0C5/s200/slice_article_t120.jpg" width="150" /></a></td> <td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeKeF8ZTSgac5LO-MAPdLY9KudhSFtO4q7DCu_9TQ1Q4ffgzV0exzw8hmxKAMxfszJwqKHyLfgzJ6-8GChdbHlRBZg8Kn0acZwVh41on08vEIhy23H3aa63f1T-zPU95QwsQmeYT3VpdGb/s1600/slice_article_t390.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="256" data-original-width="256" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeKeF8ZTSgac5LO-MAPdLY9KudhSFtO4q7DCu_9TQ1Q4ffgzV0exzw8hmxKAMxfszJwqKHyLfgzJ6-8GChdbHlRBZg8Kn0acZwVh41on08vEIhy23H3aa63f1T-zPU95QwsQmeYT3VpdGb/s200/slice_article_t390.jpg" width="150" /></a></td> <td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswSUjW8VBqLqlFVDgiQ5wdwbi1QhRpAAseQAO8yW4ySFzqJng2k0sZH1GxI3jxCUsEUb_6iCydkYRt-D9H3W_EsUYFISSFZiKOVHDz87D4hxIC6XWUVMPbaLQBPkrPTyaOdrTxrc8qRV1/s1600/slice_article_t890.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="256" data-original-width="256" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswSUjW8VBqLqlFVDgiQ5wdwbi1QhRpAAseQAO8yW4ySFzqJng2k0sZH1GxI3jxCUsEUb_6iCydkYRt-D9H3W_EsUYFISSFZiKOVHDz87D4hxIC6XWUVMPbaLQBPkrPTyaOdrTxrc8qRV1/s200/slice_article_t890.jpg" width="150" /></a></td> </tr>
<tr><td class="tr-caption" colspan="3" style="text-align: center;">Growth of the crystals beyond the original liquid network</td></tr>
</tbody></table><br />
<br />
At some point, a crystal reached the edge of the liquid network. And it did not stop there. Particles in the gas adsorbed on the crystal, allowing it to grow further than the envelope of the original network. But there are so few particles in the gas, they should be quickly spent? Not if other parts of the system sublimate or vaporize. What we found is that particles in the liquid network vaporized and then adsorb on crystals far away, making them grow.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNYePxaUMQGEsfsivMLL73rrMAt55g4JqzHS4YXPDCCdc1jM_SJxdADvX60tvy1aBnk1kmgnp4dXIWb0v4IujMPlJXAm_o9EYBvkBarOH5vKlKVuQ4l6CQUzlFgc5W3Ce5B-IrOM_CzXKt/s1600/Pitter1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="481" data-original-width="599" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNYePxaUMQGEsfsivMLL73rrMAt55g4JqzHS4YXPDCCdc1jM_SJxdADvX60tvy1aBnk1kmgnp4dXIWb0v4IujMPlJXAm_o9EYBvkBarOH5vKlKVuQ4l6CQUzlFgc5W3Ce5B-IrOM_CzXKt/s320/Pitter1.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ice crystal grow at the expense of surrounding supercooled water droplets.</td></tr>
</tbody></table><br />
<br />
Interestingly, this sequence of events is very probably what is responsible for rain. Atmospheric clouds are made of water droplets. It is cold up there and the water is supercooled, liquid despite a temperature below freezing. Thermodynamics tells us that water vapor in contact with supercooled liquid water has to be at higher pressure than water vapor in contact with ice at the same temperature. Actually when one droplet eventually freezes we obtain an ice crystal in contact with vapor which pressure is too high because set by the surrounding supercooled water droplets. So the gas condenses on the crystal, and the crystal grows at the expense of surrounding droplets that need to evaporate to maintain the vapor pressure. The crystal sucks the water out of the droplets without touching them. At some point the crystal becomes large enough to fall out of the cloud. Tens of meters below the temperature is hot enough to melt the crystal into a rain drop. This is called the Bergeron process. Next time you open your umbrella, think about this complicated sequence of events involving three phases - crystal, liquid and vapor.<br />
<br />
Of course, if the temperature is below freezing down to the floor we get snow. The delicate geometric shapes of snowflakes are made possible by their formation process. Vapor adsorption on crystals allows a much slower and more harmonious growth than direct liquid condensation. Crystalline planes are more ordered, cleanly arranged. That is what we observed in our crystal-gels.<br />
<br />
So, to sum up, we have observed an other way to arrest a phase separation into a gel that involves crystallisation rather than glass transition. This process creates a crystalline network with a large area of neat, vapor-deposited crystalline planes. It screams “catalysis” to my ear, or any kind of application that needs a large area of crystalline materials. And we demonstrated that such porous materials could be made in one pot, with the system tumbling down all the different steps by itself: phase separation, stress-driven rearrangements, crystal nucleation, vapor deposition. I hope people designing “real materials” (not made with fancy colloids) will be able to make such crystal-gels with nice applications down the line.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-72702434455161322002017-08-31T22:42:00.001+02:002017-08-31T22:42:02.267+02:00ANR grant! Recruiting PhD student.<p dir="ltr">Unstacking what went on this summer 1/n</p>
<p dir="ltr">I had the pleasure to learn that my research proposal to the French national research agency (ANR) will be funded. I'll have 4 years to look into the microscopic mechanisms of gel fracture. </p>
<p dir="ltr">It means I'll be recruiting a PhD student from October 2018. If you are interested, let me know.</p>
Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-3147660806601640432017-07-26T02:21:00.001+02:002017-07-26T02:25:23.572+02:00Selected in TOC ROFL!<div dir="ltr">Our graphical abstract for the "polymer in procession" paper has been selected by TOC ROFl, a Tumblr that collects "funny table-of-contents images from scientific journal articles."</div><div dir="ltr"><div class="tumblr-post" data-href="https://embed.tumblr.com/embed/post/t75jocAMS0kM0lPb7EiWYg/160821117531" data-did="64d4cb3429e2e0a0ab875f9005c16fdd0e12576c" data-language="en_US"><a href="http://tocrofl.tumblr.com/post/160821117531/caterpillar">http://tocrofl.tumblr.com/post/160821117531/caterpillar</a></div><script async src="https://assets.tumblr.com/post.js"></script></div>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-9086146710879018842016-11-24T15:47:00.000+01:002016-11-24T16:06:42.766+01:00Polymers in processionAlmost three years ago I became involved in an interdisciplinary project between physicists and chemists. The chemists were specialists in organic chemistry, that is to say, make complicated molecules mostly based on carbon. The physicists were specialists of the mechanics of soft materials, that is to say, how matter in between fluid and solid deform, break or flow.<br />
<br />
Making these two groups of people work together was <span style="font-size: large;"><b>very</b></span> difficult. Interdisciplinary science is hard. Scientists spend years or decades to understand enough a narrow field of knowledge to be able to make it progress. So when you put together scientists of different fields, they do not have the same vocabulary, the same methods, the same questions or the same expectations. When among physicists we were saying "We impose a constant shear stress" as a matter of fact, chemists were seeing us as<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCOypgkUJhhff01qC5R2olgeDYVaHKkHOOjud02XevqkSFYJRtT4n79VWoI4VLAbn-6aX4pVyfeyEhAZqeAf_vlsHT18ftfwECsOpMnoFU8090PCnQ8iDdPVU4eEsNX_jw4ak886nJxLFv/s1600/rascar.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCOypgkUJhhff01qC5R2olgeDYVaHKkHOOjud02XevqkSFYJRtT4n79VWoI4VLAbn-6aX4pVyfeyEhAZqeAf_vlsHT18ftfwECsOpMnoFU8090PCnQ8iDdPVU4eEsNX_jw4ak886nJxLFv/s320/rascar.jpg" width="211" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Physicist as seen by chemists</td></tr>
</tbody></table>
but we only meant "we apply a sideways constant force on the sample". And of course when chemists were telling us "This counter-ion is more chaotropic" we thought they were doing something like this:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB1aS9K5fERlZ_hIUqJuKL6wH8ROYScJ4u73Cg4Ep-Bzw-hYVCrfEqc1_99RxPoA1ulWhts02GTFp2ps0FwX5nVFUiBYuYnDVO0tcM57Pc2f85oyRFez3Fn3avVHid7MK07r-RO9GiBTDt/s1600/sorciere.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB1aS9K5fERlZ_hIUqJuKL6wH8ROYScJ4u73Cg4Ep-Bzw-hYVCrfEqc1_99RxPoA1ulWhts02GTFp2ps0FwX5nVFUiBYuYnDVO0tcM57Pc2f85oyRFez3Fn3avVHid7MK07r-RO9GiBTDt/s320/sorciere.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Chemist as seen by physicists</td></tr>
</tbody></table>
<br />
To understand what the chemists meant I had to remember my chemistry classes like 15 years ago. Fortunately I quite liked chemistry in undergrads. I even defined myself as a chemical physicist, a much needed missing transmission belt. I was able to play the role of translator between the two groups. What the chemists meant was that the ion was disturbing a lot the water around itself.<br />
<br />
At the end, we were able to work together. We made mechanical experiments on samples that were about a millimetre thick and we understood the results at the level of atoms. Conversely, we used this chemical understanding to design the mechanical properties of our samples. Let me explain to you what we did, in terms that both my physicist and chemist colleagues are able to understand.<br />
<br />
All started with a new synthesis method used by the chemists. Polymers are long molecules where the same unit is repeated many times, a bit like a caterpillar. To make polymers the chemists started from a head and added about 70 body segments one by one. Then they added the chemical groups they wanted to each unit, like if they added legs to every body segment.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQWjTUe5IN1NFBZftjlqM4BviWq_EJelh_BZ4NZuIOu-MUyDyBvph8XdMh0sKKp1CapjVVhn5RHwIUGiQEeITe1BKynHDrQ4GR5viD65rqGo71fiU0sD598FwccimiG3QApk2qxAVlHO0R/s1600/polymerisation-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQWjTUe5IN1NFBZftjlqM4BviWq_EJelh_BZ4NZuIOu-MUyDyBvph8XdMh0sKKp1CapjVVhn5RHwIUGiQEeITe1BKynHDrQ4GR5viD65rqGo71fiU0sD598FwccimiG3QApk2qxAVlHO0R/s400/polymerisation-1.png" width="400" /></a></div>
<br />
Here they managed to have a head with two negative charges and each body segments with one positive charge. In water the polymer schematically looks like that:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgALdXFCmAo4_kHOWfyEtZ79OL7ZuLjRFKJ2aTJFp9Ql8SMHsR9OldJudvHSIiTgPdNMpvKYTMSFL5hVPYr49Jwy4YlhDV_wcI86wjC4_ZL3OKP1fcHQr1GaTm8_j_Oo9gsdjRexOhwDs9D/s1600/polyelectrolytes-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgALdXFCmAo4_kHOWfyEtZ79OL7ZuLjRFKJ2aTJFp9Ql8SMHsR9OldJudvHSIiTgPdNMpvKYTMSFL5hVPYr49Jwy4YlhDV_wcI86wjC4_ZL3OKP1fcHQr1GaTm8_j_Oo9gsdjRexOhwDs9D/s400/polyelectrolytes-1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A polymer were most of the counterions are far away.</td></tr>
</tbody></table>
The minus charges floating around are counter ions. They are here to ensure that matter has a neutral charge in average. Some counter ions are floating far from the polymer, other are very close to the body segment they neutralise. We say that they are "condensed" on the polymer. The more condensed counter ions, the less the polymer looks charged from far away.<br />
<br />
If you put that short linear polymer in pure water, it forms a very soft gel. Interestingly, you can inject it with a syringe. The gel is solid at rest, flows through the needle, and is solid again on the other side. Quite nice if you want to use a gel as a scaffold for cell growth in vivo. Nowadays, the gel is a soft solid that breaks irreversibly. You need a surgical procedure to put it in the body. With our type of gel a needle is enough.<br />
<br />
Unfortunately for the applications, we found that our gel was very easily disturbed. If instead of pure water we used salty water the gel collapsed. If we started from a neutral head instead of the head bearing two minuses, no gel could form. Our mechanical measurements found no difference between the polymer solution and water alone. So we thought that the gel was formed due to charge interactions: minus head sticking to plus body. If no minus on the head, no gel. If salts, themselves charged, get in the way of the electrostatic attraction, no gel.<br />
<br />
Also, something was quite strange: the gel was too soft. Like a thousand times too soft for such short polymers. A polymer gel is a 3D network whose edges are polymer chains and whose nodes are where chains meet, also called cross-links. The more meeting points you have, the harder the gel is. In other words, if you have short chains between cross-links, few body segments, the gel is hard. We measured the elasticity of the gel, and it was so soft that we predicted something like 60 000 body segments between meeting points! That is enough to make 880 of our short polymers!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP7kCmhTxfffZJSq175U1zCZjBgHJj8ReApAz15sZjUCPSSkkVj1iLfi1qojkeosLvhj6hhSErda4FclL_4zl607JfuM3d4hrr6EohB57RZ46hngrYVcVjGhNm2YDFzUARobtdkfTi4CYu/s1600/Thaumetopea_pityocampa_01.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP7kCmhTxfffZJSq175U1zCZjBgHJj8ReApAz15sZjUCPSSkkVj1iLfi1qojkeosLvhj6hhSErda4FclL_4zl607JfuM3d4hrr6EohB57RZ46hngrYVcVjGhNm2YDFzUARobtdkfTi4CYu/s320/Thaumetopea_pityocampa_01.jpg" width="181" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pine processionary caterpillars (<a href="https://commons.wikimedia.org/w/index.php?curid=895383">source</a>)</td></tr>
</tbody></table>
As the caterpillars on the picture above, our short polymers go on a single file.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/cl8IJrpYtgg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/cl8IJrpYtgg?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
So, we physicists were like "wow! that's strange" while the chemists were not caring much. Actually, the chemists were playing with their synthesis method to change the legs of the caterpillar.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzjuznldfPOp-XMg6VwU15JUPTyWnkugxILZ8n_UNv_2pqNd5u9-S9HUFE8pWi5vEqSdy6S5Dx6PDaUF8sUQXs-DuAqBWhmYIcWsot9CgD76SA2JeL5U0qZCz_Sf3Z_1okxnjc5EVcA7Yr/s1600/postfunc-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzjuznldfPOp-XMg6VwU15JUPTyWnkugxILZ8n_UNv_2pqNd5u9-S9HUFE8pWi5vEqSdy6S5Dx6PDaUF8sUQXs-DuAqBWhmYIcWsot9CgD76SA2JeL5U0qZCz_Sf3Z_1okxnjc5EVcA7Yr/s400/postfunc-1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Two ways to change the legs of the caterpillars: shape of leg correspond to the nature of the cation, either Immidazolium (aromatic cycle) or Pyrrolidinum (all single bonds). The colour corresponds to the counterion: F<sup>-</sup>, Cl<sup>-</sup>, Br<sup>-</sup> or I<sup>-</sup>.</td></tr>
</tbody></table>
For some compositions, the polymer was basically insoluble. No way to make a gel with it. To understand that, we have to remember that polymers are usually not very happy in water. What allows them to dissolve is their charges. If a polymer carries a lot of same charges (here pluses) these charges will repel each other, the polymer will stretch and will accept a lot of contact with water. If a polymer carries little charges, it will just collapse on itself to minimize the contact with water. You may remember from above that the more counter ions are condensed, the less charges the polymer carry, the less soluble it is.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEbfEeV08_545Ik2RGOH1KMHoq9SBx9tgidpBUZrh3pNosOFfINvpj15bpjAxMC4POM1eussYrBlYsrxk8NnMfU-ExpMz8y7R6yCTEd-ZM-ZykSr6K5-Mi3k7pRAPkUhK0J1SvWF4u6fuY/s1600/polyelectrolytes_condensed-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="31" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEbfEeV08_545Ik2RGOH1KMHoq9SBx9tgidpBUZrh3pNosOFfINvpj15bpjAxMC4POM1eussYrBlYsrxk8NnMfU-ExpMz8y7R6yCTEd-ZM-ZykSr6K5-Mi3k7pRAPkUhK0J1SvWF4u6fuY/s400/polyelectrolytes_condensed-1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A polymer with complete counterion condensation. Probably insoluble.</td></tr>
</tbody></table>
<br />
<br />
And indeed, we observed insolubility for the three compositions where the interaction between the repeated cation and its counterion was the strongest.<br />
<br />
On the opposite, when the repeated cation and its counterion interacted weakly, we observed very strong gels, indicating shorter processions. Actually for two compositions we observed gels exactly 880 times stronger than the original one, meaning that the processions were just a single chain long.<br />
<br />
So far so good, but all of this was learned by probing gently the softness of the gels, at deformations so low that they were not flowing but behaving as solids. To understand what is going on at larger strains, we have to have a look at the internal structure of a procession.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5IAcvVSX2ieULIVN_zBbbQsXp-yQBtipXj48HSROZwrw92UN0M6F1UVHxOE0oQh2ZTzvljIawPgD3mGDPg80oO9lt08dQ0rk1SvX_DdyK5sUO0oIQU51sIri9aMcqY53suRG_SOHPevw/s1600/scales_stretch-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5IAcvVSX2ieULIVN_zBbbQsXp-yQBtipXj48HSROZwrw92UN0M6F1UVHxOE0oQh2ZTzvljIawPgD3mGDPg80oO9lt08dQ0rk1SvX_DdyK5sUO0oIQU51sIri9aMcqY53suRG_SOHPevw/s400/scales_stretch-1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The procession at different scales.</td></tr>
</tbody></table>
As we said before, the monomers hates being in contact with water, so their preferred shape for the procession is a sphere. However plus charges prefer to be as far away as possible, so their preferred shape for the procession is a rod. It append that water-hating monomers are stronger on the small scales and that estranged charges are stronger on the large scales. So there is a scale D were the two influences balance. If the procession is just long enough to coil into a sphere of diameter D, then charges do not complain too much. But if the procession is longer, the charges refuse to make a larger sphere, and instead the procession grows into a cylinder of diameter D.<br />
<br />
This cylinder does no grow in a straight line indefinitely. On scales large enough, counterions screen the charges from each other and the procession winds its way away.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82z1xKQ-bqWOOyhGLRWawJEpVeh-CIq6mYZKFdbucmvIO9aBpXIVvVohnuFJQZS64YZ1NlEhayjCGEYgnokEujDMQSLY-rtm6ENfwOAB-9g_AiQQgqFklPCG39sjduwyMpmt0G8P_872u/s1600/retenzmoi.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82z1xKQ-bqWOOyhGLRWawJEpVeh-CIq6mYZKFdbucmvIO9aBpXIVvVohnuFJQZS64YZ1NlEhayjCGEYgnokEujDMQSLY-rtm6ENfwOAB-9g_AiQQgqFklPCG39sjduwyMpmt0G8P_872u/s400/retenzmoi.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Two charges in the mood for fight screened from each other by counterions.</td></tr>
</tbody></table>
So when we pushed harder on the gel to make them flow we found two threshold deformations. The first threshold corresponds to when the large scale winding path of the processions becomes extended. On small scales the procession is still collapsed to avoid contact with water. To stretch it further more monomers has to come in contact with water, it cost much more energy and this is visible on the mechanical measurements. The second threshold corresponds to the breaking of head to body bonds and it's when the gel flows.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5l3cx_FVrX5GeLM4Gh5Nl2AYO5hoJthroSfv6LN1zgrSmyjBrE177AcawnNgINnQsGfbXufgl-OvFCw_oqc5OEgjzhaGa7O9NCSvzju5qbNsF6ZtMCLhyphenhyphenQXzAb4vM_sMdxPaVrtAM6fhO/s1600/stretch-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="113" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5l3cx_FVrX5GeLM4Gh5Nl2AYO5hoJthroSfv6LN1zgrSmyjBrE177AcawnNgINnQsGfbXufgl-OvFCw_oqc5OEgjzhaGa7O9NCSvzju5qbNsF6ZtMCLhyphenhyphenQXzAb4vM_sMdxPaVrtAM6fhO/s400/stretch-1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Each circle is a blob of momomers collapsed to avoid contact with water.</td></tr>
</tbody></table>
<br />
<br />
For all compositions, the first threshold deformation is very small, telling us that the processions are almost linear at rest. It implies that the amount of charge condensation is directly related to the softness of the gel. So we are able to estimate charge condensation that varies from 10 free counterions per polymers (lots of charges) to one free counterion every 9 polymers in the procession (very few charges).<br />
<br />
By contrast the second threshold vary widely between compositions between 10% and 800%. Some gels flow immediately, others need to be stretched height time their initial size before flowing. This indicates that the head to body bonds are incredibly strong. Usually in water ionic bonds are about 100 times weaker that chemical (covalent) bonds. For our lowest charge polymer we measure head to body bonds that are within 20% of the carbon-carbon bond!<br />
<br />
Our explanation is that with few charges the procession collapse around the head-to-body bond to avoid water. So the environment just around the bond is not water, it's hydrophobic polymer. Such environment is like an oil, where charges are few but interact very strongly. Indeed in oils other people have measured ionic bonds that strong. Actually this strategy is used by life itself: proteins can have just one charge in the middle of a large hydrophobic patch. When two such proteins with opposite charges meet the two hydrophobic patched stick together, expelling water from the direct environment of the charged and the ionic bond become very strong. This forms a lock and key mechanism that helps for example our immune system to recognise and block pathogens.<br />
<br />
<br />
Time to wrap up, thanks for reading down to here. At the end, we have done very standard mechanical measurements at the millimetre scale to extract informations at the chemical level. Our model tells us what to change to tune the mechanical properties of our gel by a factor thousand. Thanks to a referee, we also did a back of the envelope calculation to see what these gels would give in a physiological environment, and we have a good candidate to inject in a living body. If anybody is interested on the biology side...<br />
<br />
<h4>
Reference:</h4>
Srour H, et al. Ion pairing controls rheological properties of “processionary” polyelectrolyte hydrogels. <a href="http://dx.doi.org/10.1039/C6SM02022D" target="_blank">Soft Matter</a>. 2016. <a href="http://arxiv.org/abs/1611.07721" target="_blank">ArXiv 1611.07721</a>.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-37545715421241967722016-02-09T17:37:00.000+01:002016-02-09T19:03:45.322+01:00Layered cake and floating crystals<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://commons.wikimedia.org/wiki/File:Mille_cr%C3%AApe.jpg#/media/File:Mille_cr%C3%AApe.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="242" src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Mille_cr%C3%AApe.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mille crepe. By <a href="https://commons.wikimedia.org/wiki/User:Laitr_Keiows" title="User:Laitr Keiows">Laitr Keiows</a> - <span class="int-own-work" lang="en">Own work</span>, <a href="http://creativecommons.org/licenses/by-sa/3.0" title="Creative Commons Attribution-Share Alike 3.0">CC BY-SA 3.0</a>,</td></tr>
</tbody></table>
<br />
<br />
The soil we stand on is like a mille crepe, a layered cake made by the slow deposition of solid matter on an ocean bottom, each era adding a layer of a different nature. The process that makes particles even slightly denser than water settle down is called sedimentation.<br />
<br />
A particle is pulled down by gravity, slowed down by the viscosity of the solvent. It also gets kicked randomly by the atoms around. For a large and heavy particle like a canon ball this random motion is negligible and the particle sediment to the bottom. For a small and almost buoyant particle like a protein, this random motion dominates and the particle diffuses in any direction. In between we have the so called sedimentation-diffusion equilibrium. Particles settle down, but also diffuse up, and we observe that the concentration of particles changes depending on height. At the bottom we count more particles than at the top. This is what we call a density profile.<br />
<br />
Equilibrium density profiles are a great tool for physicist. By measuring them, you can learn how your particles behave as a system. For example, if you observe a density that decreases exponentially with altitude, you known that the suspension behaves like an "ideal gas", which means that the particles almost do not interact. That's more or less the density profile of the gases in the atmosphere.<br />
<br />
If you observe a sudden jump in a density profile, it means that you have an interface between two phases. For example between a gas of particles and a liquid of particles.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.chm.bris.ac.uk/pt/paddy/img/work/clitical.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://www.chm.bris.ac.uk/pt/paddy/img/work/clitical.jpg" height="131" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A colloidal gas-liquid interface. Picture by <a href="http://www.chm.bris.ac.uk/pt/paddy/Work_1.html" target="_blank">Paddy Royall</a>.</td></tr>
</tbody></table>
If your particles are all the same size, you can even observe two consecutive jumps, from gas to liquid and then from liquid to crystal, where the particles are neatly aligned. Particles with different sizes would jumble the alignment. In general, it is quite difficult to make particles of different size crystallize.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiLaPOqd6qPZjhVw3LzploexB76tkunKgDu6x4UR-8jDE56dDDhjsFDf-Oza2fjj-vBoj6ev7FbP80z32NGz53fZle5IMECqKnEeGsg4wC3x3CgSPJlqDlLUIDTjaX27ZQ9YOSDbAzYKaX/s1600/monodisperse_gas_liquid_crystal_text.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiLaPOqd6qPZjhVw3LzploexB76tkunKgDu6x4UR-8jDE56dDDhjsFDf-Oza2fjj-vBoj6ev7FbP80z32NGz53fZle5IMECqKnEeGsg4wC3x3CgSPJlqDlLUIDTjaX27ZQ9YOSDbAzYKaX/s1600/monodisperse_gas_liquid_crystal_text.png" /></a></div>
<br />
<br />
<a href="http://journals.aps.org/prl/abstract/10.1103/PhysRevLett.83.1239" target="_blank">There are several ways to get to this triple coexistence situation</a>. One possibility is that you first have the gas and the liquid that separate, and then the crystal forms from the liquid. A second possibility is crystals condensing from the liquid, settling down in sufficient quantities and only then does the liquid evaporates to form a gas layer on top. A third possibility is the crystals forming at the same time as gas bubbles, racing to the bottom or the top respectively. Only when gas and crystal layers sit on top of each other does some of the crystal melts to form a liquid layer in between.<br />
<br />
My contribution was to add some more complexity to the first scenario. What if I add a few large particles (green) in the suspension of small particles (red) ?<br />
<br />
At first, nothing changes: on top a gas that has almost no particle and on the bottom a mixture of many small and a few large particles. If there was only small particles crystals would form at the bottom. But the large particles get in the way and no crystallisation occurs at the bottom.<br />
<br />
Meanwhile the large particles settle faster than the small ones. So at the top of the liquid we soon have a layer devoid of large particles. Only small particles? Easy to make crystals then (big red blobs on the video below). Crystals are large, compact, and fall even faster than large particles. They outpace them and dive in the dense mixture of large and small particles. Splash!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/gRqwJ6mgGeM/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/gRqwJ6mgGeM?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
And here we have something unexpected: the crystals float! I mean, yes, ice floats over water, we are accustomed to this. But water is an exception. Solid metal sink down into molten metal.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://i.kinja-img.com/gawker-media/image/upload/18lpxe9hhqk9gjpg.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://i.kinja-img.com/gawker-media/image/upload/18lpxe9hhqk9gjpg.jpg" width="320" /></a></div>
<br />
Actually we demonstrates that the mixture of small and large particles can get so dense without crystallizing that crystals made only of small particles can float in it.<br />
<br />
The crystals are reasonably happy in there, not melting but not growing either. Since crystals are dropped continuously from the top, they end up filling pretty much the whole pool (where the large particles are) and even piling up over the level of the large particles.<br />
<br />
Now the crystals that are over the level of the pool have no large particles to prevent their growth, so they grow and make a dense "ice pack" on top of the pool.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLWsfX1Lpg9yUCajE6kKYL3tMpqqGAGrsRfJfnnNS49W6KMcXSXQYZpUS5lbCIbIWG0i5d7WqjKM8Y9MCMp1IgS4k6vSLGBZeCeceNHSqmMqO_UK2X99S9Mj87_ewAFXc4PsLmmG8lLjih/s1600/front_final.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLWsfX1Lpg9yUCajE6kKYL3tMpqqGAGrsRfJfnnNS49W6KMcXSXQYZpUS5lbCIbIWG0i5d7WqjKM8Y9MCMp1IgS4k6vSLGBZeCeceNHSqmMqO_UK2X99S9Mj87_ewAFXc4PsLmmG8lLjih/s320/front_final.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Final state of the limit between floating crystals (below) and the ice pack (above). This is the same place as the video above.</td></tr>
</tbody></table>
<br />
<br />
At the end, you get a pretty layered cake: gas on top, then a layer of liquid, then the ice pack, then the crystals made of small particles floating in the pool of large and small particles.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAEHZW40cEVpEhq3l6pM1QHKTgTT8RA7-aJmicmqoErozlpMz2XPo-Bo-5US1sm8pSyGpsxAQP2pvVT9c7sWEWbcezVsikJo58T4PZfvj93Th-U8n-IrFz_NX8p1witxqV8nGktk8OkKt-/s1600/layers_final.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAEHZW40cEVpEhq3l6pM1QHKTgTT8RA7-aJmicmqoErozlpMz2XPo-Bo-5US1sm8pSyGpsxAQP2pvVT9c7sWEWbcezVsikJo58T4PZfvj93Th-U8n-IrFz_NX8p1witxqV8nGktk8OkKt-/s640/layers_final.png" width="308" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Details of the full layered sediment. Top: gas-liquid interface. Middle: ice pack. Bottom: crystals made of small particles in a small+large amorphous matrix.</td></tr>
</tbody></table>
<br />
<br />
Leocmach, M., Royall, C. P., & Tanaka, H. (2010). Novel zone formation due to interplay between sedimentation and phase ordering. EPL (Europhysics Letters), 89(3), 38006. doi:10.1209/0295-5075/89/38006<br />
<a href="http://arxiv.org/abs/1402.0315">http://arxiv.org/abs/1402.0315</a>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-84735950848793117762015-12-03T17:04:00.002+01:002015-12-03T17:04:40.799+01:00Virtual lab notebook in IPythonI am using IPython a lot, either as a command prompt or in a Jupyter notebook. This is great to analyse data on the go. During such analysis you may generate some files, either some intermediate data, or figures.<br />
<br />
Sometimes, weeks, months or years later you would like to remember exactly what you did to generate this file. This is important for science reproducibility, to check you followed the right method or just to reuse this handy bit of code. <br />
<br />
When you have copied the code in a script file, easy. When you have organised properly your notebook and never delete the interesting cell, piece of cake. When it was yesterday and you can press the up key N times to look for the right set of lines in the history, painful but doable. But this no warranty, no rigorous method. One day you will think that writing the script is useless, one day you will delete the wrong cell in your notebook, and months after you will have to come back to this analysis and the history will be gone.<br />
<br />
It is really akin to the lab notebook, the one in which you note the date, the temperature, the sample name, the procedure you follow, the result of the measures and all the qualitative observations. Some of it seems to matter much at the moment, but if you forget to write it down, you will never be able to reproduce your experiment.<br />
<br />
<h2>
How to make IPython generate this virtual notebook for you?</h2>
You want a file per IPython session with all the commands you type. You can achieve this manually by typing at the begining of each session<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">%logstart mylogfile append</span><br />
<br />
<br />
But of course, you will forget.<br />
<br />
We have to make this automatic. This is made possible by the profile configuration of IPython. If you have never created a profile for IPython, type in a terminal<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">ipython profile create</span><br />
<br />
This will generate a default profile in <span style="font-family: "courier new" , "courier" , monospace;">HOME/.ipython/profile_default</span><br />
<br />
Edit the file HOME/.ipython/profile_default/ipython_config.py and look for the line <br />
<span style="font-family: "courier new" , "courier" , monospace;">#c.InteractiveShell.logappend = ''</span><br />
<br />
Instead, write the following lines<br />
<blockquote class="tr_bq" style="font-family: "courier new" , "courier" , monospace;">
import os<br />
from time import strftime<br />
ldir = os.path.join(os.path.expanduser("~"),'.ipython')<br />
filename = os.path.join(ldir, strftime('%Y-%m-%d_%H-%M')+".py")<br />
notnew = os.path.exists(filename)<br />
with open(filename,'a') as file_handle:<br />
if notnew:<br />
file_handle.write("# =================================")<br />
else:<br />
file_handle.write("#!/usr/bin/env python \n# %s.py \n"<br />
"# IPython automatic logging file" %<br />
strftime('%Y-%m-%d'))<br />
file_handle.write("# %s \n# =================================" %<br />
strftime('%H:%M'))<br />
<br />
# Start logging to the given file in append mode. Use `logfile` to specify a log<br />
# file to **overwrite** logs to.<br />
c.InteractiveShell.logappend = filename </blockquote>
<br />
And here you are, each time you open a IPython session, either console or notebook, a file is created in HOME/.ipython. The name of this file contains the date and time of the opening of the session (format YYYY-MM-DD_hh-mm). Everything you type during this session will be written automatically in this file. <br />
<br />Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-17121720806864563332015-09-08T14:02:00.000+02:002015-09-08T14:03:13.585+02:00LaTeX to MS WordThe good news first: our paper on wrinkling yoghurt was accepted. I won't tell you where since it is under embargo. If you want to know what it means to have a paper accepted, and what sort of work in involved (disclaimer: comparable to the amount of work need for the research in itself), have a look at this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/K4qY8WvgZOw/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/K4qY8WvgZOw?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
But last Friday night, 11pm, we received a mail from the editorial office saying something like<br />
<blockquote class="tr_bq">
Our typesetting department must have Word document files of your paper [...].<br />
Please provide these files as Word documents as quickly as possible and within the next 8 hours to keep your paper on schedule for publication. </blockquote>
Well, except for the short notice and the looming weekend, there was a big problem. Our paper was not a Word file and the conversion is all but easy. Let me explain<br />
<br />
<h3>
Academic paper formatting</h3>
<br />
But there is another last step not described here: formatting. Of course, you can open any text editor (notepad, your webmail) and type words after words to write the text of your article. But then, you would miss:<br />
<ol>
<li>figures</li>
<li>equations </li>
<li>cross-references</li>
</ol>
Figures are the graphs, the pictures and the drawings. You can insert them if you switch to any modern word processor, LibreOffice or Microsoft Word for example. Getting them beautiful and right is a work in itself.<br />
<br />
Equations are a nightmare with Word. Just writing y≈αx<sup>7</sup> makes you seek in 3-4 different menus. But you can do it. Markup languages, like the HTML of this page, makes it easier once you know the syntax. LaTeX is a markup language made for equations. The above equation just writes $y=\alpha x^7$. LaTeX syntax for equations has become a <i>de facto</i> standard, so other languages likes Markup, offer to write the math parts in LaTeX. Plugins in LibreOffice also do that.<br />
<br />
Cross referencing means that in your text you can write "see Figure 3", then switch figures 3 and 4 and have "see Figure 4" written automatically in your text. In practice you do not write the figure number, but insert a reference that the program will convert into the figure number. You can do that with Word through one menu and a rather unhelpful dialogue box. In LaTeX it is just "Figure \ref{fig:velocitygraph}". Actually, in the final document, you can even get an hyperlink to the figure. Same with chapters, sections, equations.<br />
<br />
What is great with LaTeX is that your bibliography can be generated the same way. You just insert "was discovered recently \cite{Leocmach2015}" and the paper Leocmach2015 gets inserted in your bibliography, formatted properly and consistently. In the final document you would get "was discovered recently [17]" with an hyperlink going to the 17th item in your bibliography. Of course, you have ways to do that with plugins in Word or LibreOffice.<br />
<br />
LaTeX is also nice because you can specify what you mean and then let the program format it for you. For example, when I want to write "10 µm" what I mean is ten micro metre, not "one zero space greek letter mu m", so in LaTeX I write "\SI{10}{\micro\metre}" and it will generate a "10", followed by an unbreakable space (you don't want the number and the unit on different lines or pages), followed by a micro sign µ (different from the μ in some fonts) and a "m".<br />
<br />
By the way, LaTeX is open source and free, no need for a licence. The "final document" is a PDF that anybody can read. Actually, until Friday night Editors and Referees of our paper had only seen and judged the PDF. Nobody was caring about formatting (even if it helps to have a clean looking paper to show rather than a messy Word file).<br />
<br />
So LaTeX is made for academic paper writing, and heavily used in Math, Physics and other communities. It would be unthinkable that a journal specialised in Physics refuse LaTeX formatted paper. However for Biology, Word is the norm. It must be a pain for the typesetting departments who have to translate Word format into something more usable. Broad audience journals often accept both, but not the journal we submitted to. <br />
<br />
<h3>
Latex to Word conversion</h3>
I spent most of my Saturday thinking about a reliable and reusable way to convert my paper. This won't be the last time I am asked to provide a Word file. I received advices on Twitter, tried various solutions, all unsatisfactory, and at the end I settled to this method:<br />
<ol>
<li>Dumb down the LaTeX layout. I was using a two column layout with figures within the text, I switched to a single column layout with a figure per page at the end of the document.</li>
<li>Add \usepackage{times} to your LaTeX preamble in order to use Word default font Times New Roman.</li>
<li>Let LaTeX make the PDF. All the commands, custom packages, etc. are taken into account. Cross references and bibliography are also right.</li>
<li>Convert PDF into Word. @fxcouder did it for me using Adobe. There are probably open source ways of doing it. Simple equations were preserved, but as soon as fractions were involved the format was messy.</li>
<li>Clean the Word file. No messing up, you need a real Microsoft Word with a licence. Work in 97/2000 compatibility mode. You need to <a href="https://support.office.com/en-us/article/Show-or-hide-formatting-marks-c0460106-19d3-4441-986c-b655bffe6be4" target="_blank">show formatting marks</a>, track down and delete the section breaks to obtain a single flow of text. Fix also the line breaks and hyphenations for the paragraphs to be in one piece. All messy equations must be cleaned up, leaving only the numbering for the numbered ones.</li>
<li>Re type the equations. I did this by hand in Word since I had few equations to retype. </li>
<li>Copy the whole text and paste in into the template provided by the editor. </li>
</ol>
Rather than retyping the equations, an other way would be to process the original tex document into an ODT (LibreOffice) document using <a href="http://pandoc.org/" target="_blank">pandoc</a>.<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">pandoc -s article.tex -o article.odt </span></blockquote>
Pandoc is messing cross-references, citations and anything custom in your LaTeX code. Do not use it for the conversion of the main text. However it gets the equations right. Then from LibreOffice, you can export the equations and import them back into the Word document.<br />
<br />
<br />
So, why worry? It takes you only half a day for a 15 pages paper instead of the 8 hours requested by the editorial office.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-28961458873553407662015-07-15T23:48:00.002+02:002015-07-15T23:53:59.217+02:00Food scienceAt the beginning of June, I had the pleasure to attend my first conference about food science: <a href="http://www.isfrs.ethz.ch/">The 7th International Symposium on Food Rheology and Structure</a>.<br />
<br />
I love food, my family loves food. With my sisters and brother we talk about food almost each time we meet. My aunts and uncles do the same. We love making food for each others and for our guests. My wife has the same kind of sensibility.<br />
<br />
I love food, I love to cook. I love to improvise a new dish. I have dozens of spices in my kitchen, and I try to master their use, alone or in combination. I became versed in some recipes, likes lasagne bolognese, but I take on new challenges as often as possible. I often knead pasta or udon, I made chocolate éclair when they were impossible to find in Tokyo.<br />
<br />
I love food, I love to understand it. My scientist brain can't be turned off when I cook. Mayonnaise is an emulsion, flour a granular material. When I make white sauce, the size of the eddies generated by my spoon is a visual indication of the Reynolds number and thus the viscosity of the sauce undergoing a sol-gel transition. Boiling water is a thermostat at 100°C.<br />
<br />
I love food, I study it. My first independent project as an undergrad was about mayonnaise. Then I learned that soft matter science was a thing and went up to the PhD studying rather inedible soft materials. Freshly arrived in France as a postdoc, my new boss asked me if I wanted to study "waxy crude oil" or yoghurt. Of course I chose the later. I studied it as a physicist during 3 years and now finally I was able to present my results to food scientists.<br />
<br />
I love food, but I am not a food scientist. I am not trying to formulate a new yoghurt. I don't make the link between the mouth feel adjectives rated by a panel of trained consumers and mechanical measurements. I am more interested by the physics that it reachable through the study of food systems.<br />
<br />
I love food, and it was a pleasure to meet the food science community. I discovered very interesting systems, I heard interesting questions being raised, I received nice feedbacks about my contribution (see below). I even met a reader of this blog, hello Dilek!<br />
<br />
<script async="" class="speakerdeck-embed" data-id="f103e51e52f446c18410f02a417a1522" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script><br />
<br />
I love food, I will meet this community again. I have been invited to <a href="http://www.coulomb.univ-montp2.fr/Matiere-molle-pour-la-science-des" target="_blank">Journées Scientifiques sur le thème Matière Molle pour la Science des Aliments</a>, a conference to unite the French food science community. It will be held in October 28-29 in Montpellier. <br />
<br />
<br />
<br />
<br />
Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-32081596912985184092015-05-12T23:49:00.000+02:002015-05-12T23:49:24.254+02:00CNRS positionAfter months of efforts, project writing and presentation rehearsals, I was selected to be hired as a CNRS researcher! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.cnrs.fr/compratique/telechargement/autresdocuments/CNRSfr.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.cnrs.fr/compratique/telechargement/autresdocuments/CNRSfr.jpg" /></a></div>
<br />
<br />
This permanent position starts in October and will be located in <a href="http://ilm.univ-lyon1.fr/index.php?option=com_content&view=article&id=58&catid=27" target="_blank">Institut Lumière et Matière</a> (Light and Matter Institute) lab in Lyon University. I am so relieved to obtain a stable research position! Postdoc life is not bad but it lacks stability.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://ilm.univ-lyon1.fr/templates/overlord/images/logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://ilm.univ-lyon1.fr/templates/overlord/images/logo.png" height="150" width="320" /></a></div>
<br />
<br />
I am looking forward to join the new lab, but in the meanwhile I have stuff to do, especially now that I can focus back on science.<br />
<ul>
<li>get the paper about the wrinkling yoghurt accepted somewhere</li>
<li>finish a paper pending since I left Tokyo 2 years and a half ago</li>
<li>get rheological measurements done for the collaboration with next door chemists (can't talk about it, patent application pending)</li>
<li>finalise minute understanding of yoghurt fracture and synaeresis by new confocal experiments</li>
</ul>
Because after that I will have to start my new project... Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-61781211507974966442015-03-03T15:35:00.000+01:002015-03-06T00:59:58.900+01:00Multiscale localisation in 3D and confocal images deconvolution: Howto<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"> </script><br />
<style type="text/css">
a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}
h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}
.prompt {display:none}
.highlight .hll { background-color: #49483e }
.highlight { background: #272822; color: #f8f8f2 }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
</style><br />
<p>Following <a href="http://lamson-research.blogspot.com/2015/02/multiscale-localisation-in-2d-howto.html">last week's impulse</a>, here is a tutorial about the subtleties of multiscale particle localisation from confocal 3D images.<br />
</p><br />
<p>For reference, this has been published as <br />
<dl><dt>A novel particle tracking method with individual particle size measurement and its application to ordering in glassy hard sphere colloids.</dt>
<dd>Leocmach, M., & Tanaka, H. </dd> <dd>Soft Matter (2013), 9, 1447–1457.</dd> <dd><a href="https://dx.doi.org/10.1039/C2SM27107A">doi:10.1039/c2sm27107a</a></dd> <dd><a href="http://arxiv.org/pdf/1301.7237.pdf">ArXiV</a></dd> </dl>The corresponding code is available at <a href="https://sourceforge.net/p/colloids">Sourceforge</a>, including the IPython notebook corresponding to the present tutorial.</p><br />
<br />
<div class="text_cell_render border-box-sizing rendered_html"><h1 id="Particle-localisation-in-a-confocal-image">Particle localisation in a confocal image<a class="anchor-link" href="#Particle-localisation-in-a-confocal-image">¶</a></h1></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>First, import necessary library to load and display images</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">scipy.ndimage</span> <span class="kn">import</span> <span class="n">gaussian_filter</span>
<span class="kn">from</span> <span class="nn">matplotlib</span> <span class="kn">import</span> <span class="n">pyplot</span> <span class="k">as</span> <span class="n">plt</span>
<span class="kn">from</span> <span class="nn">colloids</span> <span class="kn">import</span> <span class="n">track</span>
<span class="o">%</span><span class="k">matplotlib</span> <span class="n">inline</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>We also need to define functions to quickly display tracking results.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="k">def</span> <span class="nf">draw_circles</span><span class="p">(</span><span class="n">xs</span><span class="p">,</span> <span class="n">ys</span><span class="p">,</span> <span class="n">rs</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">for</span> <span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">xs</span><span class="p">,</span><span class="n">ys</span><span class="p">,</span><span class="n">rs</span><span class="p">):</span>
<span class="n">circle</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">Circle</span><span class="p">((</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">radius</span><span class="o">=</span><span class="n">r</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">gca</span><span class="p">()</span><span class="o">.</span><span class="n">add_patch</span><span class="p">(</span><span class="n">circle</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">display_cuts</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">centers</span><span class="p">,</span> <span class="n">X</span><span class="o">=</span><span class="mi">30</span><span class="p">,</span> <span class="n">Y</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">Z</span><span class="o">=</span><span class="mi">30</span><span class="p">):</span>
<span class="sd">"""Draw three orthogonal cuts with corresponding centers"""</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">);</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imf</span><span class="p">[</span><span class="n">Z</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">);</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">2</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imf</span><span class="p">[:,</span><span class="n">Y</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">);</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">2</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imf</span><span class="p">[:,:,</span><span class="n">X</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><h2 id="Raw-confocal-image">Raw confocal image<a class="anchor-link" href="#Raw-confocal-image">¶</a></h2></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>Load the test data, which is only a detail of a full 3D stack. Display different cuts.</p><p>Note that raw confocal images are heavily distorted in the <span class="math">\(z\)</span> direction. We actually have 4 particles in the image: two small on top of each other, one on the side and a slightly larger below and on the side.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">imf</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">fromfile</span><span class="p">(</span><span class="s">'../../../multiscale/test_input/Z_elong.raw'</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">uint8</span><span class="p">)</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="mi">55</span><span class="p">,</span><span class="mi">50</span><span class="p">,</span><span class="mi">50</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imf</span><span class="p">[</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imf</span><span class="p">[:,</span><span class="mi">25</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imf</span><span class="p">[:,:,</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMNqjIVME_TmsX9qN2CkgHAbmRewS97F416rOeS5bXYOvKf-bzn5GuNf88YalsLHhWPGRFkddqb3-SjdaIvvsLAwC-e5-Lp1x5nXhEx8sWE6dXBEsMzwo40DdX8ztjl_9ucYd02uNWzmZD/s1600/Deconvolution_7_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMNqjIVME_TmsX9qN2CkgHAbmRewS97F416rOeS5bXYOvKf-bzn5GuNf88YalsLHhWPGRFkddqb3-SjdaIvvsLAwC-e5-Lp1x5nXhEx8sWE6dXBEsMzwo40DdX8ztjl_9ucYd02uNWzmZD/s1600/Deconvolution_7_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Create a finder object of the same shape as the image. Seamlessly work with 3D images.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">finder</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">MultiscaleBlobFinder</span><span class="p">(</span><span class="n">imf</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">Octave0</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">nbOctaves</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Feed the image in the tracker with default tracking parameters. The output has four columns : <span class="math">\((x,y,z,r,i)\)</span> where <span class="math">\(r\)</span> is a first approximation of the radius of the particle (see below) and <span class="math">\(i\)</span> is a measure of the brightness of the particle.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">finder</span><span class="p">(</span><span class="n">imf</span><span class="p">)</span>
<span class="k">print</span> <span class="n">centers</span><span class="o">.</span><span class="n">shape</span>
<span class="k">print</span> <span class="s">"smallest particle detected has a radius of </span><span class="si">%g</span><span class="s"> px"</span><span class="o">%</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">min</span><span class="p">())</span>
<span class="n">display_cuts</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">centers</span><span class="p">)</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_stream output_stdout"><pre>(2, 5)
smallest particle detected has a radius of 4.40672 px
</pre></div></div><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyi8DBdoF9JerNLM5P8QqtPvhTzw9aK39BakQZkC9Ut_uydDuCHMEa01hBWreLuDQXWa-5cOb8zRJg7y87avXz2eu2Of_IT_WPhDo-oGHjF3PUUTGqd9KuyVhmS7AZygOrQiMUFTn2cYl3/s1600/Deconvolution_11_1.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyi8DBdoF9JerNLM5P8QqtPvhTzw9aK39BakQZkC9Ut_uydDuCHMEa01hBWreLuDQXWa-5cOb8zRJg7y87avXz2eu2Of_IT_WPhDo-oGHjF3PUUTGqd9KuyVhmS7AZygOrQiMUFTn2cYl3/s1600/Deconvolution_11_1.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>This is a pretty bad job. Only two particle detected correctly. The top and side small particles are not detected.</p><p>Let us try not to remove overlapping.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">finder</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">removeOverlap</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="k">print</span> <span class="n">centers</span><span class="o">.</span><span class="n">shape</span>
<span class="k">print</span> <span class="s">"smallest particle detected has a radius of </span><span class="si">%g</span><span class="s"> px"</span><span class="o">%</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">min</span><span class="p">())</span>
<span class="n">display_cuts</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">centers</span><span class="p">)</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_stream output_stdout"><pre>(4, 5)
smallest particle detected has a radius of 4.40672 px
</pre></div></div><br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX0TMuYBb48ZYaiEBitfmcNhIkFVEfzilGcU0TSORkJBcL5Iv37SDVZoEBjRYBVLoATCy9JaKckXwT720TcduFZMQrpPoFw1Gq8yMnnD4FL-sBv3utdlXn35x9sm-MtZZR-mqyTwx09oqj/s1600/Deconvolution_13_1.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX0TMuYBb48ZYaiEBitfmcNhIkFVEfzilGcU0TSORkJBcL5Iv37SDVZoEBjRYBVLoATCy9JaKckXwT720TcduFZMQrpPoFw1Gq8yMnnD4FL-sBv3utdlXn35x9sm-MtZZR-mqyTwx09oqj/s1600/Deconvolution_13_1.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Now we have all the particles.</p><p>We have two effects at play here that fool the overlap removal: - The radii guessed by the algorithm are too large. - The particles aligned along <span class="math">\(z\)</span> are localised too close together.</p><p>Both effects are due to the elongation in <span class="math">\(z\)</span>.</p></div><div class="text_cell_render border-box-sizing rendered_html"><h2 id="Simple-deconvolution-of-a-confocal-image">Simple deconvolution of a confocal image<a class="anchor-link" href="#Simple-deconvolution-of-a-confocal-image">¶</a></h2></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>The image <span class="math">\(y\)</span> acquired by a microscope can be expressed as</p><p><span class="math">\(y = x \star h + \epsilon,\)</span></p><p>where <span class="math">\(\star\)</span> is the convolution operator, <span class="math">\(x\)</span> is the perfect image, <span class="math">\(h\)</span> is the point spread function (PSF) of the microscope and <span class="math">\(\epsilon\)</span> is the noise independent of both <span class="math">\(x\)</span> and <span class="math">\(h\)</span>. The process of estimating <span class="math">\(x\)</span> from <span class="math">\(y\)</span> and some theoretical or measured expression of <span class="math">\(h\)</span> is called deconvolution. Deconvolution in the presence of noise is a difficult problem. Hopefully here we do not need to reconstruct the original image, but only our first Gaussian blurred version of it. Indeed, after a reasonable amount of blur in three dimensions, the noise can be neglected and we thus obtain:</p><p><span class="math">\(y_0 \approx G_0 \star h,\)</span></p><p>or in Fourier space</p><p><span class="math">\(\mathcal{F}[y_0] = \mathcal{F}[G_0] \times \mathcal{F}[h].\)</span></p><p>Once <span class="math">\(\mathcal{F}[h]\)</span> is known the deconvolution reduces to a simple division in Fourier space.</p></div><div class="text_cell_render border-box-sizing rendered_html"><h3 id="Measuring-the-kernel">Measuring the kernel<a class="anchor-link" href="#Measuring-the-kernel">¶</a></h3></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p><span class="math">\(\mathcal{F}[h]\)</span> should be measured in an isotropic system and in the same conditions (magnification, number of pixels, indices of refraction, etc.) as the experiment of interest.</p><p>Since a 3D image large enough to be isotropic is too big to share in an example, I just use the image of interest. Don't do this at home.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">imiso</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">fromfile</span><span class="p">(</span><span class="s">'../../../multiscale/test_input/Z_elong.raw'</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">uint8</span><span class="p">)</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="mi">55</span><span class="p">,</span><span class="mi">50</span><span class="p">,</span><span class="mi">50</span><span class="p">))</span>
<span class="n">kernel</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">get_deconv_kernel</span><span class="p">(</span><span class="n">imiso</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">kernel</span><span class="p">);</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzpUw2XH0MQHlVPHmjsRi1OEfl2rxhwFJvbwC3J1VqhfHv-LwBg8vNeycL2VnPGE38Pd9JSWnZ3dy2a2GQ4hWIQdpKwv8wF6XGd_gqd6DTecENcjmOP273EVsKN-cCu_MdoescE2HdnGb/s1600/Deconvolution_19_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzpUw2XH0MQHlVPHmjsRi1OEfl2rxhwFJvbwC3J1VqhfHv-LwBg8vNeycL2VnPGE38Pd9JSWnZ3dy2a2GQ4hWIQdpKwv8wF6XGd_gqd6DTecENcjmOP273EVsKN-cCu_MdoescE2HdnGb/s1600/Deconvolution_19_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>The <code>kernel</code> variable here is actually <span class="math">\(1/\mathcal{F}[h]\)</span></p></div><div class="text_cell_render border-box-sizing rendered_html"><h3 id="Kernel-test">Kernel test<a class="anchor-link" href="#Kernel-test">¶</a></h3></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>What not to do: deconvolve the unblurred image.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">imd</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">deconvolve</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">kernel</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imd</span><span class="p">[</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imd</span><span class="p">[:,</span><span class="mi">25</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imd</span><span class="p">[:,:,</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFOclcyHCD01c2EurSPvhirE05DrCxVOlLyWHwn2cxe-VOti9mhP9Id3AoqP56L4A03rVAdd8wFhxOMGx9fuvx3pFBYenvjr_jqtnYszgVMEL8cF4DwwMYCfc7qAUxrpsPjHZvei1gSbD_/s1600/Deconvolution_23_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFOclcyHCD01c2EurSPvhirE05DrCxVOlLyWHwn2cxe-VOti9mhP9Id3AoqP56L4A03rVAdd8wFhxOMGx9fuvx3pFBYenvjr_jqtnYszgVMEL8cF4DwwMYCfc7qAUxrpsPjHZvei1gSbD_/s1600/Deconvolution_23_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Noisy isn't it? Yet we have saturated the color scale between 0 and 255, otherwise artifacts would be even more apparent.</p><p>What the program will actually do: deconvolved the blurred image.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">imb</span> <span class="o">=</span> <span class="n">gaussian_filter</span><span class="p">(</span><span class="n">imf</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">float</span><span class="p">),</span> <span class="mf">1.6</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imb</span><span class="p">[</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imb</span><span class="p">[:,</span><span class="mi">25</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imb</span><span class="p">[:,:,</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTR289otRO2b-Oy9ezsDaESNfzBsByZVe-fXaQJb7DXg5ogXmrI43z783QbVe6vSCnkW8_-z_ZqS9Lo-oJxytykkUTiTFkDdJzmrLXnlF6t23KBOWrfBeA_uJv8l5Zc7OCLf79DkPZnOUD/s1600/Deconvolution_25_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTR289otRO2b-Oy9ezsDaESNfzBsByZVe-fXaQJb7DXg5ogXmrI43z783QbVe6vSCnkW8_-z_ZqS9Lo-oJxytykkUTiTFkDdJzmrLXnlF6t23KBOWrfBeA_uJv8l5Zc7OCLf79DkPZnOUD/s1600/Deconvolution_25_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">imbd</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">deconvolve</span><span class="p">(</span><span class="n">imb</span><span class="p">,</span> <span class="n">kernel</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imbd</span><span class="p">[</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imbd</span><span class="p">[:,</span><span class="mi">25</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">imbd</span><span class="p">[:,:,</span><span class="mi">30</span><span class="p">],</span> <span class="s">'hot'</span><span class="p">,</span><span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span><span class="n">vmax</span><span class="o">=</span><span class="mi">255</span><span class="p">);</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4uQWiI6i9MY6jLfcV-zO1r0IqxpAdsXGhFj_8MtjbCqRIuFopAz486YiQMBsvPwrnsLQyfJZy9VcIP3Y_LpBiJxfmzdSAalLz-RgCtm9bD87023RpE_7JH4gkJGc6FNJjwIGnDCiEJcYf/s1600/Deconvolution_26_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4uQWiI6i9MY6jLfcV-zO1r0IqxpAdsXGhFj_8MtjbCqRIuFopAz486YiQMBsvPwrnsLQyfJZy9VcIP3Y_LpBiJxfmzdSAalLz-RgCtm9bD87023RpE_7JH4gkJGc6FNJjwIGnDCiEJcYf/s1600/Deconvolution_26_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>The way the noise is amplified by deconvolution is obvious when we compare the histograms of the 4 versions of the image.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="p">(</span><span class="n">l</span><span class="p">,</span> <span class="n">im</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="nb">zip</span><span class="p">([</span><span class="s">'raw'</span><span class="p">,</span> <span class="s">'blurred'</span><span class="p">,</span> <span class="s">'deconv'</span><span class="p">,</span> <span class="s">'blur deconv'</span><span class="p">],</span> <span class="p">[</span><span class="n">imf</span><span class="p">,</span> <span class="n">imb</span><span class="p">,</span> <span class="n">imd</span><span class="p">,</span> <span class="n">imbd</span><span class="p">])):</span>
<span class="n">plt</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span>
<span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="o">-</span><span class="mi">129</span><span class="p">,</span><span class="mi">363</span><span class="p">,</span><span class="mi">8</span><span class="p">),</span>
<span class="n">np</span><span class="o">.</span><span class="n">histogram</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="o">-</span><span class="mi">129</span><span class="p">,</span><span class="mi">371</span><span class="p">,</span><span class="mi">8</span><span class="p">))[</span><span class="mi">0</span><span class="p">]</span><span class="o">*</span><span class="mi">10</span><span class="o">**</span><span class="n">i</span><span class="p">,</span>
<span class="n">label</span><span class="o">=</span><span class="n">l</span><span class="o">+</span><span class="s">' (</span><span class="si">%d</span><span class="s">,</span><span class="si">%d</span><span class="s">)'</span><span class="o">%</span><span class="p">(</span><span class="n">im</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">im</span><span class="o">.</span><span class="n">max</span><span class="p">()));</span>
<span class="n">plt</span><span class="o">.</span><span class="n">xlim</span><span class="p">(</span><span class="o">-</span><span class="mi">130</span><span class="p">,</span><span class="mi">360</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">yscale</span><span class="p">(</span><span class="s">'log'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s">'upper right'</span><span class="p">);</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwv6X_SdlpwkN0eZGbQm8Fbocw2c0r0dQiyTl38m54DArS791tUEJ-3Nfgm19qzxJSIr_QrzvWQiRzXE2XjZpV5dQFAo0ei1CmdrZ8t6hfUTpltjwqwwqrfGH5Y7gGAZHDOYpmQc4CbiBS/s1600/Deconvolution_28_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwv6X_SdlpwkN0eZGbQm8Fbocw2c0r0dQiyTl38m54DArS791tUEJ-3Nfgm19qzxJSIr_QrzvWQiRzXE2XjZpV5dQFAo0ei1CmdrZ8t6hfUTpltjwqwwqrfGH5Y7gGAZHDOYpmQc4CbiBS/s1600/Deconvolution_28_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Obviously negative values should be discarded, and will be discarded by the algorithm.</p></div><div class="text_cell_render border-box-sizing rendered_html"><h3 id="Localisation-using-deconvolved-image">Localisation using deconvolved image<a class="anchor-link" href="#Localisation-using-deconvolved-image">¶</a></h3></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>Not removing the overlaping particles, we use the deconvolution kernel.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="nb">reload</span><span class="p">(</span><span class="n">track</span><span class="p">)</span>
<span class="n">centers</span> <span class="o">=</span> <span class="n">finder</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">removeOverlap</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">deconvKernel</span><span class="o">=</span><span class="n">kernel</span><span class="p">)</span>
<span class="k">print</span> <span class="n">centers</span><span class="o">.</span><span class="n">shape</span>
<span class="k">print</span> <span class="s">"smallest particle detected has a radius of </span><span class="si">%g</span><span class="s"> px"</span><span class="o">%</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">min</span><span class="p">())</span>
<span class="n">display_cuts</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">centers</span><span class="p">)</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_stream output_stdout"><pre>(5, 5)
smallest particle detected has a radius of 3.79771 px
</pre></div></div><br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-GQcZk2y7Ewotzhj48-FGD_slfyXNPyt9hmbJvtwo_zvHwnZ2EdpTkduQ8HB3_NdGDAGc46gZugyl0U09PbsHg1TsPZhj5dowyV9_gssovE98B3KwC2unNgfuY9ZRnBixEiIn5bA06X0A/s1600/Deconvolution_32_1.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-GQcZk2y7Ewotzhj48-FGD_slfyXNPyt9hmbJvtwo_zvHwnZ2EdpTkduQ8HB3_NdGDAGc46gZugyl0U09PbsHg1TsPZhj5dowyV9_gssovE98B3KwC2unNgfuY9ZRnBixEiIn5bA06X0A/s1600/Deconvolution_32_1.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>All particles are found and actually they are not overlaping. However we got a spurious detection, probably some noise that got amplified by the deconvolution. It is easily removed by a threshold in intensity.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="k">print</span> <span class="n">centers</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_stream output_stdout"><pre>[[ 16.31334384 44.07373885 21.50444345 3.79770755 -0.37019082]
[ 26.79860906 22.0435863 21.89833819 3.89324706 -15.95536745]
[ 26.92095001 21.83422163 32.72685299 3.85903411 -17.3271687 ]
[ 26.11610631 31.30829898 36.11323148 4.33867807 -21.06731591]
[ 31.77923381 26.78655827 44.05564076 4.03334069 -20.1763175 ]]
</pre></div></div><br />
</div></div><br />
</div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">centers</span><span class="p">[</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o"><-</span><span class="mi">1</span><span class="p">]</span>
<span class="n">display_cuts</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">centers</span><span class="p">)</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lx55XP93kCKOTSBBwP22K6al9Jt2S-AbfSz6tPc-PsaUfj5T3Y3AUDnj8kzTeUjsA_SzDGkHYmJtWdZ6c4ZSNKuPztIv1n1gh8J6wzSE-Q21vpy1KYb1tlvnnCJ6FRr63wNTdQem3eRY/s1600/Deconvolution_35_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lx55XP93kCKOTSBBwP22K6al9Jt2S-AbfSz6tPc-PsaUfj5T3Y3AUDnj8kzTeUjsA_SzDGkHYmJtWdZ6c4ZSNKuPztIv1n1gh8J6wzSE-Q21vpy1KYb1tlvnnCJ6FRr63wNTdQem3eRY/s1600/Deconvolution_35_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>We can also display the results with respect to the blurred and deconvolved version of the image that we can find by introspection.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">display_cuts</span><span class="p">(</span><span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">layersG</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">)</span>
</pre></div></div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_ZyAC-uft1RTJxPFkgIwDWo6MmNG2EGP9k0ZaSxD5zGRJcCu4uF5LqiQu0T6ygUXnzHxy0EbBEiyhSXRE6e1xAcBsS0YIAKhzL3e9ZTyn-eBf1RWXLa54ZIV4RtS2B5_rk11L_O6Z-IwO/s1600/Deconvolution_37_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_ZyAC-uft1RTJxPFkgIwDWo6MmNG2EGP9k0ZaSxD5zGRJcCu4uF5LqiQu0T6ygUXnzHxy0EbBEiyhSXRE6e1xAcBsS0YIAKhzL3e9ZTyn-eBf1RWXLa54ZIV4RtS2B5_rk11L_O6Z-IwO/s1600/Deconvolution_37_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><h2 id="From-scales-to-sizes">From scales to sizes<a class="anchor-link" href="#From-scales-to-sizes">¶</a></h2></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>This is pretty much like in 2D.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="prompt input_prompt">In [17]:<br />
</div><div class="input_area box-flex1"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">colloids.particles</span> <span class="kn">import</span> <span class="n">get_bonds</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">radius2sigma</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">dim</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span>
<span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span> <span class="o">=</span> <span class="n">get_bonds</span><span class="p">(</span><span class="n">positions</span><span class="o">=</span><span class="n">centers</span><span class="p">[:,:</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">radii</span><span class="o">=</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">maxdist</span><span class="o">=</span><span class="mf">3.0</span><span class="p">)</span>
<span class="n">brights1</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">solve_intensities</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span><span class="p">,</span> <span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
<span class="n">radii1</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">global_rescale_intensity</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span><span class="p">,</span> <span class="n">brights1</span><span class="p">)</span>
<span class="n">centers2</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">centers</span><span class="p">)</span>
<span class="n">centers2</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="n">radii1</span>
<span class="n">display_cuts</span><span class="p">(</span><span class="n">imf</span><span class="p">,</span> <span class="n">centers2</span><span class="p">)</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="prompt"></div><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlTG7dfqCEm3wDAhfVz4CDNfmdzNrHO-h2G_V-Elx-R2kuzE1M4pJYUKvAN7luFfwqTUt6mzgkV-VFuyYLA0zRQnUAs8eNp-QFE2oRwYEGlDXrNrRbjsdBIKWoQmzC_m7hoPHSHdal8OnJ/s1600/Deconvolution_40_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlTG7dfqCEm3wDAhfVz4CDNfmdzNrHO-h2G_V-Elx-R2kuzE1M4pJYUKvAN7luFfwqTUt6mzgkV-VFuyYLA0zRQnUAs8eNp-QFE2oRwYEGlDXrNrRbjsdBIKWoQmzC_m7hoPHSHdal8OnJ/s1600/Deconvolution_40_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre></pre></div><br />
</div></div><br />
</div>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-91663828527853063612015-02-22T00:25:00.001+01:002015-03-06T00:54:34.873+01:00Multiscale localisation in 2D: Howto<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"> </script><br />
<style type="text/css">
a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}
h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}
.prompt {display:none}
.highlight .hll { background-color: #49483e }
.highlight { background: #272822; color: #f8f8f2 }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
</style><br />
<br />
<br />
<p>My multiscale tracking algorithm has been out for 3 years, <a href="https://dx.doi.org/10.1039/C2SM27107A">published</a>, on <a href="http://arxiv.org/pdf/1301.7237.pdf">ArXiV</a>. However, its availability at <a href="https://sourceforge.net/p/colloids">Sourceforge</a> has been theoretical, since I never wrote a proper tutorial on how to use the code.</p><br />
<p>Today's post is an attempt is this direction. I will explain how to localise and size particles on a 2D image using the Python implementation of the algorithm. This is also one of my first attempt to use ipython notebooks and to export them on this blog. You can find the original notebook in the sourceforge repository (/trunc/python/colloids/notebooks/).</p><br />
<p>Prerequisites are the python code imported from the repository, in your PYTHONPATH. You will probably need a few other packages (python-bs4, libboost-all-dev, python-numexpr) and a working C++ compiler (GCC or MINGW on Windows). Of course, python 2.?, numpy, ipython are needed. If you don't know what ipython is, and you are interested in my code, then you should learn about it.</p><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>First, import necessary library to load and display images</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">matplotlib</span> <span class="kn">import</span> <span class="n">pyplot</span> <span class="k">as</span> <span class="n">plt</span>
<span class="kn">from</span> <span class="nn">colloids</span> <span class="kn">import</span> <span class="n">track</span>
<span class="o">%</span><span class="k">matplotlib</span> <span class="n">inline</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>We also need to define a function to quickly plot circles of different sizes on a figure</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="k">def</span> <span class="nf">draw_circles</span><span class="p">(</span><span class="n">xs</span><span class="p">,</span> <span class="n">ys</span><span class="p">,</span> <span class="n">rs</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">for</span> <span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">xs</span><span class="p">,</span><span class="n">ys</span><span class="p">,</span><span class="n">rs</span><span class="p">):</span>
<span class="n">circle</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">Circle</span><span class="p">((</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">radius</span><span class="o">=</span><span class="n">r</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">gca</span><span class="p">()</span><span class="o">.</span><span class="n">add_patch</span><span class="p">(</span><span class="n">circle</span><span class="p">)</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Load a picture containing bright particles on a dark background and immediatly display this image in a figure</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">im</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">imread</span><span class="p">(</span><span class="s">'droplets.jpg'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFG6_aSHTzTrz0DdCsXimKH9YWQIBkKuPvW1E6QrCiK83W0EYkO6AF0juEyqIvqZ243925UwRrzT6hxJN7ujbQwG8Me7QfTp-k_jFSiN6H28XSKPXqWiXNfmKQIX3tCUrhzvlW548vNhl3/s1600/Multiscale_6_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFG6_aSHTzTrz0DdCsXimKH9YWQIBkKuPvW1E6QrCiK83W0EYkO6AF0juEyqIvqZ243925UwRrzT6hxJN7ujbQwG8Me7QfTp-k_jFSiN6H28XSKPXqWiXNfmKQIX3tCUrhzvlW548vNhl3/s1600/Multiscale_6_0.png" /></a><br />
<br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Create a finder object of the same shape as the image. This actually creates many sub-finder objects, one for each \Octave\. Octave 1 has the same shape as the image. Octave 2 is twice smaller. Octave 3 is four time smaller than Octave 1, etc. Optionally, you can create Octave 0 that is twice bigger than Octave 1, but it takes a lot of memory and tracking results are bad. So here we set Octave0=False. The maximal scale at which particles are looked for is set by nbOctaves.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">finder</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">MultiscaleBlobFinder</span><span class="p">(</span><span class="n">im</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">Octave0</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">nbOctaves</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
<span class="n">finder</span><span class="err">?</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Feed the image in the tracker with default tracking parameters already does a great job. the output has three columns : <span class="math">\((x,y,r,i)\)</span> where <span class="math">\(r\)</span> is a first approximation of the radius of the particle (see below) and <span class="math">\(i\)</span> is a measure of the brightness of the particle.</p><p>The smallest particle that can be detected with the default parameter <span class="math">\(k=1.6\)</span> in 2D is about 3 pixels in radius. In 3D it would be 4 pixels in radius. To increase this smallest scale you can increase the parameter <span class="math">\(k\)</span>. Decreasing <span class="math">\(k\)</span> below 1.2 is probably not a good idear since you will detect noise as particles. Redo your acquisition with higher resolution instead.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">finder</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="n">k</span><span class="o">=</span><span class="mf">1.6</span><span class="p">)</span>
<span class="k">print</span> <span class="n">centers</span><span class="o">.</span><span class="n">shape</span>
<span class="k">print</span> <span class="s">"smallest particle detected has a radius of </span><span class="si">%g</span><span class="s"> px"</span><span class="o">%</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">min</span><span class="p">())</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">2</span><span class="p">],</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_stream output_stdout"><pre>(305, 4)
smallest particle detected has a radius of 0.00130704 px
</pre></div></div><br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDxfvonklFwe4X3CmOJwmc_o9jbiNQv1DDskKG_7Tiu0DCyQMmOdE3KpHtgf2JMjJ9qgOpvjARnxkBqMIn4NaQsrWV8kmJyWK05PCMjlOj8kLpFRH_Bql76AX73YvLKNO583Whkxh5NdSV/s1600/Multiscale_10_1.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDxfvonklFwe4X3CmOJwmc_o9jbiNQv1DDskKG_7Tiu0DCyQMmOdE3KpHtgf2JMjJ9qgOpvjARnxkBqMIn4NaQsrWV8kmJyWK05PCMjlOj8kLpFRH_Bql76AX73YvLKNO583Whkxh5NdSV/s1600/Multiscale_10_1.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>However some small particles are missing, for example near the large particle at the center. Maybe it is because by default the MultiscaleFinder removes overlapping particles? Let us try to disable this removal.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">finder</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="n">removeOverlap</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">2</span><span class="p">],</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXi42QOmwqez_UeVzQgFhcCju-va8q5AKLxC17JegC6et4n6N7pKBcQoM47CtH2Jk6JXQd6GOqMm-op0hT5R-TrOV3rqsIEc0VAQ8jqNuro9wi0M07-txanelwtZ2KpogxfcwEI0BfQ000/s1600/Multiscale_12_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXi42QOmwqez_UeVzQgFhcCju-va8q5AKLxC17JegC6et4n6N7pKBcQoM47CtH2Jk6JXQd6GOqMm-op0hT5R-TrOV3rqsIEc0VAQ8jqNuro9wi0M07-txanelwtZ2KpogxfcwEI0BfQ000/s1600/Multiscale_12_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Well, we gained only spurious detections.</p><p>We can also try to disable a filter that rejects local minima that are elongated in space.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">finder</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="n">maxedge</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">2</span><span class="p">],</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwwKSyuIkJQMNLRRu4U3UYVnd0BwVqDgEzhuJGCVXinx7vpYFftQV8AVxPEZng_I35Ad0KaC3ceHulhTm0iu4rDbp8V8IbYrFrfER7CDlkHha54zDq607Xv5xTgY-_KTt_-BGDTzg5EzNo/s1600/Multiscale_14_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwwKSyuIkJQMNLRRu4U3UYVnd0BwVqDgEzhuJGCVXinx7vpYFftQV8AVxPEZng_I35Ad0KaC3ceHulhTm0iu4rDbp8V8IbYrFrfER7CDlkHha54zDq607Xv5xTgY-_KTt_-BGDTzg5EzNo/s1600/Multiscale_14_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>For sanity, it is probably better to filter out the particles with a radius smaller than 1 pixel.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">centers</span> <span class="o">=</span> <span class="n">centers</span><span class="p">[</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">></span><span class="mi">1</span><span class="p">]</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><h2 id="Introspection">Introspection<a class="anchor-link" href="#Introspection">¶</a></h2></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>The intermediate steps of the algorithm are accessible. For example one can access the octaves (lines in figure below) and their successively blured versions of the original image.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="c">#get maximum intensity to set color bar</span>
<span class="n">m</span> <span class="o">=</span> <span class="nb">max</span><span class="p">([</span><span class="n">oc</span><span class="o">.</span><span class="n">layersG</span><span class="o">.</span><span class="n">max</span><span class="p">()</span> <span class="k">for</span> <span class="n">oc</span> <span class="ow">in</span> <span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">[</span><span class="mi">1</span><span class="p">:]])</span>
<span class="k">for</span> <span class="n">o</span><span class="p">,</span> <span class="n">oc</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">[</span><span class="mi">1</span><span class="p">:]):</span>
<span class="k">for</span> <span class="n">l</span><span class="p">,</span> <span class="n">lay</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">oc</span><span class="o">.</span><span class="n">layersG</span><span class="p">):</span>
<span class="n">a</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">oc</span><span class="o">.</span><span class="n">layersG</span><span class="p">),</span><span class="nb">len</span><span class="p">(</span><span class="n">oc</span><span class="o">.</span><span class="n">layersG</span><span class="p">)</span><span class="o">*</span><span class="n">o</span> <span class="o">+</span> <span class="n">l</span> <span class="o">+</span><span class="mi">1</span><span class="p">)</span>
<span class="c">#hide ticks for clarity</span>
<span class="n">a</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">get_xaxis</span><span class="p">()</span><span class="o">.</span><span class="n">set_visible</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="n">a</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">get_yaxis</span><span class="p">()</span><span class="o">.</span><span class="n">set_visible</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">lay</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">,</span> <span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">vmax</span><span class="o">=</span><span class="n">m</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD3H1ze5bAO6xkJ4FV4gZYTikjEEFTUhNuBgsOdsS61E1Ize4Kn59gP_-o_eo0DtLJ6ImU9QKDB7M1bNZUZ6af6BjJedRVh6-QWRuJgoPIWvl6fPGv8A9O8_Uz83UzozHMEF3HfL6HCbmn/s1600/Multiscale_21_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD3H1ze5bAO6xkJ4FV4gZYTikjEEFTUhNuBgsOdsS61E1Ize4Kn59gP_-o_eo0DtLJ6ImU9QKDB7M1bNZUZ6af6BjJedRVh6-QWRuJgoPIWvl6fPGv8A9O8_Uz83UzozHMEF3HfL6HCbmn/s1600/Multiscale_21_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>One can also access the difference of Gaussians. Here relevant values are negative, so we inverse the colors and saturate at zero.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="c">#get maximum intensity to set color bar</span>
<span class="n">m</span> <span class="o">=</span> <span class="nb">min</span><span class="p">([</span><span class="n">oc</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">min</span><span class="p">()</span> <span class="k">for</span> <span class="n">oc</span> <span class="ow">in</span> <span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">[</span><span class="mi">1</span><span class="p">:]])</span>
<span class="k">for</span> <span class="n">o</span><span class="p">,</span> <span class="n">oc</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">[</span><span class="mi">1</span><span class="p">:]):</span>
<span class="k">for</span> <span class="n">l</span><span class="p">,</span> <span class="n">lay</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="o">-</span><span class="n">oc</span><span class="o">.</span><span class="n">layers</span><span class="p">):</span>
<span class="n">a</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">finder</span><span class="o">.</span><span class="n">octaves</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">oc</span><span class="o">.</span><span class="n">layers</span><span class="p">),</span><span class="nb">len</span><span class="p">(</span><span class="n">oc</span><span class="o">.</span><span class="n">layers</span><span class="p">)</span><span class="o">*</span><span class="n">o</span> <span class="o">+</span> <span class="n">l</span> <span class="o">+</span><span class="mi">1</span><span class="p">)</span>
<span class="c">#hide ticks for clarity</span>
<span class="n">a</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">get_xaxis</span><span class="p">()</span><span class="o">.</span><span class="n">set_visible</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="n">a</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">get_yaxis</span><span class="p">()</span><span class="o">.</span><span class="n">set_visible</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">lay</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">,</span> <span class="n">vmin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">vmax</span><span class="o">=-</span><span class="n">m</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjePlI79Af-zV3mvH2cs6PEQfuD-D0zYSEvQVF71UGhbEvFAAZExWYJiHnLKvpS4Q7iQs39VTRFKzNgGeDO0tW3-wp2qnEZ4q23P7wJfQs_qHjgRJdmVGFeezk8Xu0eGkXae6NHlekZD8Qi/s1600/Multiscale_23_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjePlI79Af-zV3mvH2cs6PEQfuD-D0zYSEvQVF71UGhbEvFAAZExWYJiHnLKvpS4Q7iQs39VTRFKzNgGeDO0tW3-wp2qnEZ4q23P7wJfQs_qHjgRJdmVGFeezk8Xu0eGkXae6NHlekZD8Qi/s1600/Multiscale_23_0.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Each OctaveFinder looks for local minima (very negative) in the difference of Gaussians space. Local minima in understood relative to space <span class="math">\((x,y)\)</span> and scale <span class="math">\(s\)</span>. The job of the MultiscaleFinder is to coordinate the action of the Octaves to return a coherent result.</p></div><div class="text_cell_render border-box-sizing rendered_html"><h2 id="From-scales-to-sizes">From scales to sizes<a class="anchor-link" href="#From-scales-to-sizes">¶</a></h2></div><br />
<div class="text_cell_render border-box-sizing rendered_html"><p>The multiscale algorithm finds local minima in space and scale <span class="math">\(s\)</span>. How can we convert scales in actual sizes (particle radius <span class="math">\(r\)</span>)? If the particles are far apart, their respective spots do not overlap, so we can use the formula</p><p><span class="math">\(R = s \sqrt{\frac{2d\ln \alpha}{1-\alpha^{-2}}}\)</span></p><p>where <span class="math">\(d\)</span> is the dimensionality of the image (here 2) and <span class="math">\(\alpha=2^{1/n}\)</span> with <span class="math">\(n\)</span> the number of subdivisions in an octave (parameter nbLayers when creating the MultiscaleFinder).</p><p>MultiscaleFinder actually does this conversion when returning its result.</p><p>But what if particles are close together? Then their respective spots overlap and the scale in only indirectly related to the size. We need to take into account the distance between particles and their relative brightnesses. The first step is to revert to scales.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">s</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">radius2sigma</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">dim</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Then we have to find the couples of particles whoes spots probably overlap. The submodule <code>colloids.particles</code> has a function to do this. On a large system, this is the most costly function.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="prompt input_prompt">In [13]:<br />
</div><div class="input_area box-flex1"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">colloids.particles</span> <span class="kn">import</span> <span class="n">get_bonds</span>
<span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span> <span class="o">=</span> <span class="n">get_bonds</span><span class="p">(</span><span class="n">positions</span><span class="o">=</span><span class="n">centers</span><span class="p">[:,:</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">radii</span><span class="o">=</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">],</span> <span class="n">maxdist</span><span class="o">=</span><span class="mf">3.0</span><span class="p">)</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Now we have all the ingredients to run the reconstruction.</p><p>Note: You need boost libraries installed on your system to proceed.</p><pre><code>sudo apt-get install libboost-all-dev</code></pre><p>First, we will obtain the brightness of each particle form the value of the Difference of Gaussians at the place and scale of every particle, e.g. the last column of centers.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="prompt input_prompt">In [14]:<br />
</div><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">brights1</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">solve_intensities</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span><span class="p">,</span> <span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
</pre></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>Second, we use these brightnesses to obtain the new radii.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="prompt input_prompt">In [15]:<br />
</div><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">radii1</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">global_rescale_intensity</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span><span class="p">,</span> <span class="n">brights1</span><span class="p">)</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">radii1</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="prompt"></div><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh04WHpSaS9ksi3RojArqY7IgO7KEvGad08Qn9lRlqdZRUeOmd91UfE1OKeu1Fyk9BKh2QQVlxhbgMcQaKieVzbhlvinDQZNB9OdNbz8FOZSkNcUhh-RQacZC066_I7PHh8t9oUNGV-DdWr/s1600/resized.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh04WHpSaS9ksi3RojArqY7IgO7KEvGad08Qn9lRlqdZRUeOmd91UfE1OKeu1Fyk9BKh2QQVlxhbgMcQaKieVzbhlvinDQZNB9OdNbz8FOZSkNcUhh-RQacZC066_I7PHh8t9oUNGV-DdWr/s1600/resized.png" /></a><br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>The radii were underestimated indeed!</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">histR0</span><span class="p">,</span> <span class="n">bins</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">histogram</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="p">,</span> <span class="n">bins</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">30</span><span class="p">))</span>
<span class="n">histR1</span><span class="p">,</span> <span class="n">bins</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">histogram</span><span class="p">(</span><span class="n">radii1</span><span class="p">,</span> <span class="n">bins</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">30</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">bins</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">histR0</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s">'supposed dilute'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">bins</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">histR1</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s">'corrected for overlap'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">xlabel</span><span class="p">(</span><span class="s">'radius (px)'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">ylabel</span><span class="p">(</span><span class="s">'count'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s">'upper right'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivr7M3L-xk31HCviiF_oMQmO8CvNabF8fYZ3w55eUsSqnuN3oKqzu38m0IAQlJEvWGeFrDle6W5CaUlxVK73hN4Xe9yX7uhdYwYosTCWuFV79hI-rFtIqt92R0EDxJWp_S8YjSSlytctla/s1600/hist.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivr7M3L-xk31HCviiF_oMQmO8CvNabF8fYZ3w55eUsSqnuN3oKqzu38m0IAQlJEvWGeFrDle6W5CaUlxVK73hN4Xe9yX7uhdYwYosTCWuFV79hI-rFtIqt92R0EDxJWp_S8YjSSlytctla/s1600/hist.png" /></a><br />
<br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>It is always possible to iterate first and second steps above.</p></div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="prompt input_prompt">In [17]:<br />
</div><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">brights2</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">solve_intensities</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span><span class="p">,</span> <span class="n">centers</span><span class="p">[:,</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">R0</span><span class="o">=</span><span class="n">radii1</span><span class="p">)</span>
<span class="n">radii2</span> <span class="o">=</span> <span class="n">track</span><span class="o">.</span><span class="n">global_rescale_intensity</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">bonds</span><span class="p">,</span> <span class="n">dists</span><span class="p">,</span> <span class="n">brights</span><span class="p">,</span> <span class="n">R0</span><span class="o">=</span><span class="n">radii1</span><span class="p">)</span>
<span class="n">draw_circles</span><span class="p">(</span><span class="n">centers</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="n">centers</span><span class="p">[:,</span><span class="mi">1</span><span class="p">],</span> <span class="n">radii2</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="s">'none'</span><span class="p">,</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s">'g'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">im</span><span class="p">,</span> <span class="s">'hot'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="prompt"></div><div class="box-flex1 output_subarea output_display_data"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjArE6-aMvrpL6Ku8P1UcQup_2aowZ-HfZG_2iE4mkfQ2JvDMDiP9optUyVeTisQYmlVF5PQIlrBA_-WpTs7yHEDERDU63k49u_tBbp7qMoMgV1zQ4rWx2h7qpo7-LtXkxVMzRvtgzcMobI/s1600/Multiscale_37_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjArE6-aMvrpL6Ku8P1UcQup_2aowZ-HfZG_2iE4mkfQ2JvDMDiP9optUyVeTisQYmlVF5PQIlrBA_-WpTs7yHEDERDU63k49u_tBbp7qMoMgV1zQ4rWx2h7qpo7-LtXkxVMzRvtgzcMobI/s1600/Multiscale_37_0.png" /></a><br />
<br />
</div></div><br />
</div></div><br />
</div><div class="cell border-box-sizing code_cell vbox"><div class="input hbox"><div class="prompt input_prompt">In [18]:<br />
</div><div class="input_area box-flex1"><div class="highlight"><pre><span class="n">histR2</span><span class="p">,</span> <span class="n">bins</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">histogram</span><span class="p">(</span><span class="n">radii2</span><span class="p">,</span> <span class="n">bins</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">30</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">bins</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">histR0</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s">'supposed dilute'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">bins</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">histR1</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s">'corrected for overlap'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">bins</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">histR2</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s">'second iteration'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">xlabel</span><span class="p">(</span><span class="s">'radius (px)'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">ylabel</span><span class="p">(</span><span class="s">'count'</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s">'upper right'</span><span class="p">);</span>
</pre></div><br />
</div></div><br />
<div class="vbox output_wrapper"><div class="output vbox"><br />
<br />
<div class="hbox output_area"><div class="prompt"></div><div class="box-flex1 output_subarea output_display_data"><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5t4pe6tCGW0FGSgPwNWqtPHppmCf9YysqEwstfWCzLVRARCRS220caXedErf88R5hwVUUo13CWbZ3dH3MZxfmQmbiw5MU2GrV_odQ4_qChlgzxvFmAXC4CbPZj41zv8FJQKWW0rB-DghS/s1600/Multiscale_38_0.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5t4pe6tCGW0FGSgPwNWqtPHppmCf9YysqEwstfWCzLVRARCRS220caXedErf88R5hwVUUo13CWbZ3dH3MZxfmQmbiw5MU2GrV_odQ4_qChlgzxvFmAXC4CbPZj41zv8FJQKWW0rB-DghS/s1600/Multiscale_38_0.png" /></a><br />
<br />
</div></div><br />
</div></div><br />
</div><div class="text_cell_render border-box-sizing rendered_html"><p>But most of the times it does not help much.</p></div>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-7354742596078394652014-10-09T14:35:00.000+02:002014-10-09T14:37:02.152+02:00EnDirectDuLabo = RealScientists.frTwo weeks ago I owned the <a href="https://twitter.com/EnDirectDuLabo">Twitter</a> account <a href="http://endirectdulabo.tumblr.com/">@EnDirectDuLabo</a>. For those who know <a href="http://realscientists.org/">RealScientists</a>, it is the French version. For those who don't, it is researchers taking turns to stir a Twitter account and tell what is the everyday life of a real scientist.<br />
<br />
Somehow this is the same ideal I intended for this blog. However Twitter format makes it easier. In 140 characters you can't explain your research deep enough to bother your reader. You have to be clear with your idears, one at the time. Punchlines and soundbites.<br />
<br />
If you read French, here is the storify of my week:<br />
<br />
<div class="storify", lang="FR"><iframe src="//storify.com/EnDirectDuLabo/mathieu-leocmach-chercheur-en-physique-de-la-matie/embed?border=false" width="100%" height=750 frameborder=no allowtransparency=true></iframe><script src="//storify.com/EnDirectDuLabo/mathieu-leocmach-chercheur-en-physique-de-la-matie.js?border=false"></script><noscript>[<a href="//storify.com/EnDirectDuLabo/mathieu-leocmach-chercheur-en-physique-de-la-matie" target="_blank">View the story "Mathieu Leocmach, chercheur en physique de la matière molle" on Storify</a>]</noscript></div>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-86525467607317874352014-08-21T13:59:00.001+02:002014-08-21T17:51:37.560+02:00Fracture in yogurt: publication process and press releases<p>On the research blog <a href="http://metarabbit.wordpress.com/2014/07/15/dealing-with-a-dry-spell/">Meta Rabbit</a>, publication process is described as a race when the distance to run is decided randomly partway through the race. Here is a typical example :<br />
<dl><dt>January 31st</dt>
<dd>Concluding more than a year of research, we submitted a paper to Physical Review Letters. Hopefully, the editor finds it interesting enough to send it to 2 referees (other anonymous researchers knowledgeable about our area of research).</dd>
<dt>April 1st</dt>
<dd>Answer of the referees. One is positive about our paper but the second one has some doubts and questions. We spend the next 3 weeks doing complementary experiments to answer those concerns.</dd>
<dt>April 23rd</dt>
<dd>We send our answer. It is processed by the editor and sent back to the referees</dd>
<dt>June 2nd</dt>
<dd>The referees answered again. We satisfied #2, but #1 is no more satisfied. Indeed, we did not answered him properly the first round, we were overconfident because he displayed a positive opinion.
<dt>June 7th</dt>
<dd>We send back a detailed response (11 pages when the paper is 4 pages). We must not overlook any detail now.</dd>
<dt>June 16th</dt>
<dd>We receive a mail from the editor: our paper is accepted!</dd> </dl><br />
<p>In the next few weeks, the editorial team will format the paper, we will review and correct the proofs and finally the paper is published the 8th of July. But this is not the end: we have to advertise our paper. First, we contact the physics institute in CNRS (French National Centre for Scientific Research). Will they make a press release? A press release is important for advertising scientific results to the general public. Academic paper writing in the art of making boring rigorous something you are excited about. Press release in the reverse process. We describe our research with the less jargon possible to the scientific journalist in CNRS, he uses his writing skills to make it more appealing, we fix some factual mistakes (sexy does not mean wrong) ... and here we are, we have a <a href="http://www.cnrs.fr/inp/spip.php?article2991">press release</a> (in French).</p><br />
<p>And then, we were lucky. One of us tweets his join to the acceptance, and a Philip Ball, a science journalist columnist at Nature Materials, gets it.</p><br />
<blockquote class="twitter-tweet" lang="en"><p>What's not to like? RT Our manuscript on failure of <a href="https://twitter.com/hashtag/yogurt?src=hash">#yogurt</a> under stress has been accepted for publication in <a href="https://twitter.com/hashtag/PRL?src=hash">#PRL</a> <a href="https://twitter.com/APSphysics">@APSphysics</a> <a href="https://twitter.com/univbordeaux">@univbordeaux</a></p>— Philip Ball (@philipcball) <a href="https://twitter.com/philipcball/statuses/478910769531453440">17 Juin 2014</a></blockquote><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script><br />
<br />
<p>The tweet is a bit irreverent, but well, we are dealing with yoghurt, we have to get over it. And Philip Ball contacts us because he wants to write about our paper! So, again, back and forth for factual corrections and at the end he writes a beautiful <a href="http://www.nature.com/nmat/journal/v13/n9/full/nmat4063.html">column</a> about our paper. Go read it, it's yummy.</p>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-81828623131688290252014-05-15T23:43:00.000+02:002014-05-15T23:50:25.080+02:00Strange patterns<p>For more than a year, I am trying to understand that</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx_-3SvzqrYF9uDARQL1O_eihEzxAx-ig8rNl1I4ng-33Rk7r_cYn1lcdbUPXc4EUyDVN6hI2Ov9RIl_KkbSLObmM86YtTcajlFqzSPLbbnBvjDep9eCn6vVNb2Xp3x9HUTnKxh8kI0r3P/s1600/zooms.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" width=500px src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx_-3SvzqrYF9uDARQL1O_eihEzxAx-ig8rNl1I4ng-33Rk7r_cYn1lcdbUPXc4EUyDVN6hI2Ov9RIl_KkbSLObmM86YtTcajlFqzSPLbbnBvjDep9eCn6vVNb2Xp3x9HUTnKxh8kI0r3P/s1600/zooms.jpg" /></a></div><br />
<p>Or more dynamically, this</p><br />
<iframe width="560" height="315" src="//www.youtube.com/embed/KsSRDUxmmbo" frameborder="0" allowfullscreen></iframe><br />
<br />
<p>This is no leopard or fish skin pattern, nor salad dressing-like demixing. It appears when I make a yogurt in a very thin container, actually in a gap of a tenth of a millimetre thick, between two glass plates. Important detail: the glass is made extremely slippery, nothing appears with usually sticky glass.</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqeoZs7fOrlyUiMFhiRFTMVF4D07UsBLViniG2gHwRvlnK6Mh2zqFJpC8XT8tdZcxLT5Jwi2gr3xw5ZwrwPWcfYYcwo63NW2YvEJVwkua8lP55a47IkJa4NzIwFB_DK_8_WFv__W1WdHkZ/s1600/cell.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" width=500px src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqeoZs7fOrlyUiMFhiRFTMVF4D07UsBLViniG2gHwRvlnK6Mh2zqFJpC8XT8tdZcxLT5Jwi2gr3xw5ZwrwPWcfYYcwo63NW2YvEJVwkua8lP55a47IkJa4NzIwFB_DK_8_WFv__W1WdHkZ/s1600/cell.png" /></a></div><br />
<p>The pattern is random but there is a well defined size. I can change the thickness of the cell (from 50 microns to one millimetre) and the pattern will scale up accordingly.</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeskIeHBCJMLGIu1fQgZ3y7BBA936zGRiMwFFps7T3J_ANyIk_knFSCnj3k1xOBOYJKDasdNphKDBZe08qE3jTKHUspKanlGNNSQi43N6zrKtreHZPLPmSUJcY8u-opseM5wfiY9lU8rc-/s1600/lambda_gap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" width=500px src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeskIeHBCJMLGIu1fQgZ3y7BBA936zGRiMwFFps7T3J_ANyIk_knFSCnj3k1xOBOYJKDasdNphKDBZe08qE3jTKHUspKanlGNNSQi43N6zrKtreHZPLPmSUJcY8u-opseM5wfiY9lU8rc-/s640/lambda_gap.png" /></a></div><br />
<p>By the way, there is nothing living in my yogurt, no bacteria. The gelation is induced by slow and homogeneous acidification by chemicals. You can see the process of gel formation at high magnification in the video below. At first, things move around, this is Brownian motion. Then the gel forms and everything stops. Then the pattern appears.</p><br />
<iframe width="560" height="560" src="//www.youtube.com/embed/yUN8F3drNF8" frameborder="0" allowfullscreen></iframe><br />
<br />
<p>It took me a couple of month to understand what these patterns are. I let you guess until next time.</p><br />
Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com07e Arrondissement, Lyon, France45.729656173577979 4.826568429052713345.726885173577976 4.8215259290527133 45.732427173577982 4.8316109290527134tag:blogger.com,1999:blog-1086662714146182140.post-14682226982319283372014-04-27T10:55:00.001+02:002014-04-29T17:45:53.544+02:00Testing rupture models<p>How do materials break ? This question is the starting point of my present post-doc in France. People have good ideas on how metals and crystals break, because their structures are known for a century or two. But when you turn your attention to more messy materials, like composites, concrete, paper, gels, etc. the answers are far less convincing.</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://www.flickr.com/photos/bittbox/2179154410/" title="concrete 8 of bittbox, on Flickr"><img src="https://farm3.staticflickr.com/2315/2179154410_114e01037f.jpg" width="80%" alt="concrete 8"></a></div><br />
<p>Popular (because simple) models of fractures are called <q>fibre bundle models</q>. Imagine a cotton yarn, or a rope made of many interlocked fibres. If you pull on it hard enough and for long enough, a fibre will break. The pulling strength will be shared by all the other fibres, until an other one breaks. The more broken fibres, the less remaining fibres, the more often a new fibre breaks. Sounds like a random action movie scene, isn't it?</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://www.flickr.com/photos/28481088@N00/330752974/" title="Breaking wire rope of tanakawho, on Flickr"><img src="https://farm1.staticflickr.com/147/330752974_5b2553399d.jpg" width="50%" alt="Breaking wire rope"></a></div><br />
<p>A first simple model is to consider that the fibres are independent from each other and each of them has a slightly different breaking threshold. The only way fibres interact with each other is by sharing evenly the load. This model is good at describing how paper breaks. It predicts that over a given load threshold, the material will always break. The stronger you pull, the faster it breaks, conversely if you pull just a minute amount above the threshold it will take a very long time to break. For most of the process, you may even not notice that you are damaging your rope. That's why in the movies it's always when the last guy crossing the rope bridge who falls.</p><br />
<p>A mode refined version of the model says that when a fibre breaks, the load it bear is split among its neighbouring fibres. It makes sense when you consider an actual rope, made of smaller twines, made of even smaller threads, etc. until you get to the individual fibres. What this new model predicts is the absence of threshold load. If you pull on your material long enough, it will break, whatever your strength. Of course, the weaker you are, the longer you'll have to wait. An other interesting prediction is the appearance of fractures, or regions where all the fibres are broken. Can this explain the fractures and cracks observed in many materials? That's on this question that I started my own research.</p><br />
<p>I selected a system that indeed looks like a network of fibres:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfJ1AYw8xATdTkIwLILNnjdgu3Cp5dkAdAogS6vITYYQQYLMbx8P25E2xX6T862817gtgSLakOwfSM4NVEW3lE2pcGJrsu1kQd2Lro8buXwQuOEUmIJfkkvOOR5FLAZFMXHFgT_Bxsqq-w/s1600/TEM_yaourt_5um.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfJ1AYw8xATdTkIwLILNnjdgu3Cp5dkAdAogS6vITYYQQYLMbx8P25E2xX6T862817gtgSLakOwfSM4NVEW3lE2pcGJrsu1kQd2Lro8buXwQuOEUmIJfkkvOOR5FLAZFMXHFgT_Bxsqq-w/s320/TEM_yaourt_5um.jpg" alt="Casein gel seen by Transmission Electron Microscopy from Kaláb 1983"/></a></div>This is a gel obtained by slow acidification of a solution of milk protein (sodium caseinate), or in plain English: a yoghurt. The picture above was made by electron microscopy, and the white fibres you see are one hundred time thinner that a human hair. The black voids are occupied my water that flows throughout the network.</p><br />
<p>Unstirred yoghurt do behave very much like a hard solid, except that it is much weaker. You don't need a powerful machine to fracture it, a spoon is enough.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://www.flickr.com/photos/knitspirit/6715974207/" title="Yaourt à la vanille from KnitSpirit, on Flickr"><img src="https://farm8.staticflickr.com/7034/6715974207_675a44b714.jpg" width="500" height="333" alt="Yaourt à la vanille"></a></div><br />
And once it is broken, the cracks won't heal. It is very different from a liquid or from pastes that you can stir to erase the memory of the system. If you stir a yoghurt you just destroy it further.</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdwy_3w6WzbOz-H4xBBZIfDc811dHPvI22dpQMaSpUpawyhsvQRV9F78TWDpwxSBuIL8MvTH4tThQWSATMjNYVRvo0r8XmjKOwYyYGl0R5pccIuWmCz2CRk4J5FzzQlz0yxuM_2VdtnVkM/s1600/Couette_fractures.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdwy_3w6WzbOz-H4xBBZIfDc811dHPvI22dpQMaSpUpawyhsvQRV9F78TWDpwxSBuIL8MvTH4tThQWSATMjNYVRvo0r8XmjKOwYyYGl0R5pccIuWmCz2CRk4J5FzzQlz0yxuM_2VdtnVkM/s1600/Couette_fractures.png" width="90%" alt="Sketch of a Couette cell an visualisation of the fractures" /></a></div><br />
<p>Now, I don't trust myself to apply a constant force with a spoon, especially if the experiment is set to run for a week. So I make my yoghurt between two concentric cylinders of a machine called a <a href="http://en.wikipedia.org/wiki/Rheometer">rheometer</a>, which is able to rotate the inner cylinder with a constant force until the next power cut. Step by step: I pour the protein solution in the rheometer at rest, the gel forms during 17 hours as the solution acidifies, and only then I apply the force.</p><br />
<p>As you see on the picture above, after some time fractures appear in the yoghurt and grow vertically. By the way, the picture was taken by a standard webcam. This is not rocket science. The picture above shows only the bottom half of the yoghurt, there are fracture also growing from the top. When bottom and top fracture meet, the gel breaks completely.</p><br />
<p>I repeated this experiment many times, varying the applied load and thus the time needed to break the yoghurt completely. At high load, I am limited by the recording frequency of the rheometer, so my minimal breaking time is slightly less that a second. On low load, patience is the limiting factor, as well as evaporation and mold growth. Still I have an experiment that lasted 11 days. That is a factor 10 million between the longest and shortest experiments, enough to prove that there is no meaningful load threshold. That is a first win for the model.</p><br />
<h3>Edit March 29th, 2014</h3><p>A video of the rupture. Nothing seems to append and then ...</p><iframe allowfullscreen="" frameborder="0" height="344" src="//www.youtube.com/embed/L1zj_f9xZUg" width="459"></iframe>Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com1tag:blogger.com,1999:blog-1086662714146182140.post-24292339124185171292013-02-10T23:54:00.000+01:002013-02-10T23:54:18.321+01:00Up-goer five Glass<i>Here is my attempt to explain my thesis using only the <a href="http://splasho.com/upgoer5/phpspellcheck/dictionaries/1000.dicin" target="_blank">ten hundred</a> most used words in English. I used the marvellous</i><i> <a href="http://splasho.com/upgoer5/" target="_blank">Up-Goer Five text editor</a> by <a href="https://twitter.com/TheoSanderson">Theo Sanderson</a> inspired by <a href="http://xkcd.com/386/">XKCD</a>.</i><br />
<br />
When you cool a water-like stuff, you get a hard stuff. In many hard
stuffs, the bits are lining straight. But in other hard stuffs there is
no straight line.<br />
<br />
The hard stuff that make the walls of a can do have straight lines.
Because of those lines you can make the can smaller by pushing down on
it without breaking it into pieces. Window glass has no line, so if you
push it too strong it will break into pieces, but if you push it just a
little bit it is harder that a can, you can't make it smaller by pushing
it. Having no lines makes hard stuffs even harder.
Also, that is because there is no straight line in window glass that the
light can get through, straight lines stop light or make it funny.<br /><br />Sometimes
you want very very hard stuffs, or see-through hard stuffs, so you
don't want lines in it. Sometimes you want hard stuffs that you can
push hard without breaking, or hard stuff that stop light or make it
funny, so you need lines. It is very important to know how to make lines
or not to make lines. <br /><br />The problem is: no one knows how to control the lines. Also, no one knows why stuffs without lines can be hard at all! <br /><br />Water-like
stuffs have no lines and they are not hard. So it is not lines that
decide if a stuff is hard or not. What decides then? People had this
idea: if bits of stuff group together they become hard. If you stick
those groups together, you can make hard stuff. You can group bits of stuff by five, that makes them very hard. You can also makes groups of six which are quite hard. <br /><br />By
the way, if you make groups of six, it is easy to make lines out of it,
so you have made a hard stuff with lines. But if you make groups of
five, you can't make lines, so you have made a hard stuff without lines.<br /><br />Is
this idea right? To know this, I looked at stuffs that are still
water-like but cold enough to become hard. If I cool down a little more,
they become hard stuff without line. These stuffs are in between
water-like stuff and no-line-hard stuff. Actually they are a little bit hard.
People found that some parts of it are slow and some parts are fast. The
colder you get, the larger those fast and slow parts become.<br /><br />What
people think, it that hard parts must be slow. So I looked if there was
groups of five or groups of six, there was, and if they are slow or
fast. I found that both kind of groups are slow, but groups of six are
much slower than groups of five. This is a surprise! Also, I found that
the more I cool down, the more groups of six I see. I don't see more
groups of five. So it is the groups of six that are important to make
the stuff hard, not the groups of five.<br /><br />So, what makes stuffs
without lines hard is not groups that can't make lines. It is groups
that could make lines but there is something in the way. Maybe that is
the groups of five that get in the way.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-82451818940405928932012-03-17T16:04:00.000+01:002012-03-17T16:04:35.284+01:00Count on your neighbourCounting how many <i>stuff</i> you have is important<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://images4.wikia.nocookie.net/__cb20110418080105/disney/images/4/49/ScroogeCountingHisMoney_714.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://images4.wikia.nocookie.net/__cb20110418080105/disney/images/4/49/ScroogeCountingHisMoney_714.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Scrooge counting his money</td></tr>
</tbody></table>
... but boring<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPtubMzqXfEDwB5xpbSziE1gQRUJg0IbxOe9fYThSD2IzFULR543617Ayjbo08wsSlTq5WRt64FR73dNj6tNxWtd3-yjbVBLVtf8WZhW3tOVfGtJSiHwBibN_rvKzezqEaxq6EQ-GgQO0/s320/moutons.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPtubMzqXfEDwB5xpbSziE1gQRUJg0IbxOe9fYThSD2IzFULR543617Ayjbo08wsSlTq5WRt64FR73dNj6tNxWtd3-yjbVBLVtf8WZhW3tOVfGtJSiHwBibN_rvKzezqEaxq6EQ-GgQO0/s320/moutons.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">counting sheeps</td></tr>
</tbody></table>
During last week, I saw a few times one of my fellow lab member printing a picture like this<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYmN3oVl8E6RssvAtfALyPDBhCqjJnqGTshj6QF1sC_ghdo4GV_UcaOd1PbRxKYNWGjnt8uUteDp2NdxVBV52msD7rr69CHTuIO1jqwdWsnaq4-aRZ3X0Fgofi3cSyMbAM204h1lncNcG1/s1600/llt03_0006.tif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYmN3oVl8E6RssvAtfALyPDBhCqjJnqGTshj6QF1sC_ghdo4GV_UcaOd1PbRxKYNWGjnt8uUteDp2NdxVBV52msD7rr69CHTuIO1jqwdWsnaq4-aRZ3X0Fgofi3cSyMbAM204h1lncNcG1/s320/llt03_0006.tif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Phase contrast microscopy picture of nucleation</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
and putting a cross on each white object. He was counting them. The first time I saw this, I thought he had to do it for one or two pictures. But at the end of the week, I asked him what he was doing and if I could help.<br />
<br />
<br />
The above picture is taken when a phase A nucleates into a phase B. This appends for example if you cool a liquid below it's crystallization temperature. A crystal nucleus will appear from time to time and grow. The probability to form a nucleus (nucleation rate) is a very important physical parameter: if nucleation is extremely rare, you will have a single nucleus in you bottle that will grow to form a single crystal before the birth of the next nucleus. This is exactly what you want for example when you make a silicon wafer for microelectronics. If nucleation rate is high, then you will have many nuclei growing at the same time and at the end a material that is made of many different crystals. You may want this in ice creams, because small crystals have a more pleasant texture than big ones.<br />
<br />
<br />
<br />
<br />
The only method to measure the nucleation rate in a given system is to count the number of nuclei function of time. So my colleague was counting ... for the whole week. He had done two dozens of experiments at different temperatures and compositions, and took a series of picture for each (like every couple of second for a few minutes). This makes hundreds if not thousands of pictures to analyze. And his plan was to do it by hand.<br /><br />
Try to count how many nuclei are in the above picture. This is a task that need careful attention: large nuclei have a good contrast, but there are many smaller ones very difficult to tell from the background. That's why my colleague was printing and crossing the counted nuclei.<br />
<br />
As I told you <a href="http://lamson-research.blogspot.com/2011/11/particle-tracking-i-from-analog-to.html" target="_blank">in a previous post</a>, this kind of procedure can be fully automatized. The programming takes time, so if you have only a few pictures to analyze, this may not be a good idea. In addition, this counting is tricky because the objects can have very different sizes and contrasts. However I, sitting 3 steps away, had already developed and tested such a program. The physical signification is different (I am tracking polydisperse colloidal particles) but the technology is the same. So yes, I could help.<br />
<br />
An hour later my colleague had in his computer a script counting the nuclei for him, a picture per second or less, automated to treat a whole time series automatically without human intervention. Setting-up Python and dependencies on his computer took half of the time. We should have communicated earlier, before he had spent a week doing what the script could do in an hour.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM_t-cK1idjJ7xZ9wrTFQ2xkjiPxl9G_R9zbPNHw1ORxiEbqVQ_aXg2NAUo0XqaF5Iaejledp6fP7cIVd8piGIl1NNj8r9UghrwOG4-gPFT5TlQMKOorBNAnEHOcjrIuzuG-ufphiEjE7a/s1600/treated_llt03_0000.tif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM_t-cK1idjJ7xZ9wrTFQ2xkjiPxl9G_R9zbPNHw1ORxiEbqVQ_aXg2NAUo0XqaF5Iaejledp6fP7cIVd8piGIl1NNj8r9UghrwOG4-gPFT5TlQMKOorBNAnEHOcjrIuzuG-ufphiEjE7a/s320/treated_llt03_0000.tif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Result of the localization. Original image (red) superimposed with localized positions (cyan squares)</td></tr>
</tbody></table>
As you can see on the picture above, the result is not 100% perfect, but quite close. For example there are problems when nuclei are fusing and there are also (very few) centers counted multiple times. I think I know how to adapt better my program to this situation, but my colleague told me it was enough precision for him.<br />
<br />
This gives an other motivation to explain (in a future post) how this counting/localizing method is working.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-60484503514710875582012-01-03T05:26:00.000+01:002012-01-03T05:26:35.272+01:00Mikan stacking faultNever leave a crystallographer with a pile of fruits.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-itCIdSFMCCY/TwJh9ULJisI/AAAAAAAAJMs/YhTn-RvEuOA/s1600/DSCF9297.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://2.bp.blogspot.com/-itCIdSFMCCY/TwJh9ULJisI/AAAAAAAAJMs/YhTn-RvEuOA/s320/DSCF9297.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">HCP(left)-FCC(right) stacking fault</td></tr>
</tbody></table>
Even if I do not consider myself a crystallographer, I spent most of my PhD identifying local symmetries in materials. And the pioneers of the land of symmetries in materials are the crystallographers, so I owe them most of my analysis tools ... and the tetris-o-philia.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-zUbP6Vz4dr4/TwJiEBxoEhI/AAAAAAAAJM0/Il0B7NInzU4/s1600/DSCF9298.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://1.bp.blogspot.com/-zUbP6Vz4dr4/TwJiEBxoEhI/AAAAAAAAJM0/Il0B7NInzU4/s320/DSCF9298.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The FCC side, note how the 3rd layer's fruits sit on top of voids in the first layer</td></tr>
</tbody></table>
During new year's vacation in my family in law, my daughter (in the background of the upper picture) started emptying the reserve of mandarin to bring them on the living room's table. This got me started at piling the fruits.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-HqEQeltYRz4/TwJiKubobJI/AAAAAAAAJM8/VYyUbCANvHA/s1600/DSCF9299.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://2.bp.blogspot.com/-HqEQeltYRz4/TwJiKubobJI/AAAAAAAAJM8/VYyUbCANvHA/s320/DSCF9299.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The HCP side. 1st layer and 3rd layers sit on top of each other</td></tr>
</tbody></table>
The pile begins by a layer where the fruits form hexagons. This is the most compact way of packing disks of the same size in 2D, and thus spheres of the same size on the same plane. Real fruits have different sizes, but anyway.<br />
<br />
For the second plane, you have two possibilities that are mirror image of each other, a translation, a rotation of 30 degree, etc. In short, this is not a real choice because you have no reference point.<br />
<br />
The same alternative has richer consequences in the third plane. Depending on your choice, you end whether with<br />
<ul>
<li>3rd layer's fruits sitting on top of 1st layer's fruits</li>
<li>3rd layer's fruits sitting on top of 1st layer's voids</li>
</ul>
Because you have the first layer as a reference, the choice is no more silent. You end with two different crystals: Hexagonal compact (HCP) and Face-centered cubic (FCC).<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-JyztJ3Omm2g/TwJiRWvWWzI/AAAAAAAAJNE/fDpyaLJfsl8/s1600/DSCF9300.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://4.bp.blogspot.com/-JyztJ3Omm2g/TwJiRWvWWzI/AAAAAAAAJNE/fDpyaLJfsl8/s320/DSCF9300.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">FCC is left, HCP right, and the grain boundary in the middle (hole in the 3rd layer)</td></tr>
</tbody></table>
Now let's be messy. I made two different choices of 3rd layer in two different places. The line where the two stacking meet is a stacking fault. It is not possible to pack same-size spheres efficiently on this line. Evidence is the hole you can see on the pictures. <br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-BR2NdjleoXM/TwJiYOK5CxI/AAAAAAAAJNM/QlRoYFlGFmY/s1600/DSCF9301.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://3.bp.blogspot.com/-BR2NdjleoXM/TwJiYOK5CxI/AAAAAAAAJNM/QlRoYFlGFmY/s320/DSCF9301.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">FCC is right, HCP left, and the grain boundary in the middle (hole in the 3rd layer)</td></tr>
</tbody></table>
Finally, I added a fourth layer, with fruits sitting on top of the ones of the 2nd layer. No fault in this fourth layer, I can continue my stack if I want. However the fruits immediately over the fault line have a little more space to rattle. The same holds for the fruits immediately below (2nd layer).<br />
<br />
If you think about the stacking of a crystal of hard spheres, the price paid to have such a stacking fault is the spheres you could not fit in because of the line. In my very small crystal, I could have fit 2 more spheres without the fault. This is a global penalty.<br />
<br />
On the other hand, the space gained to rattle by the spheres neighbouring the fault line increases their (vibrational) entropy and thus decreases their free energy. This is a local gain.<br />
<br />
When you balance the global penalty with the local gain, you end up with quite a lot of stacking lines.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0tag:blogger.com,1999:blog-1086662714146182140.post-69456675075296340482011-12-17T01:16:00.000+01:002011-12-17T01:27:37.018+01:00Unifiying conferenceI am frustrated when I cannot go to an international conference once a year. But at the end of it I am worn out. Usually it lasts a week. This time it was two weeks in a row. I wonder how I am still able to think.<br />
<br />
International scientific conference are at the heart of the research world, at least as important as scientific publications. Without conferences, you would not know who is working in your field. That is where you discover that paper authors are not only names but human beings. Dr. X who is contradicting your results is actually a very friendly guy an the best person to chat to or to go to restaurant with. Pr. Y whose intuitions are always stunningly genial can be a frightening freak, a reckless egocentric or ... a very seducing man/woman.<br />
<br />
There are the personalities you discover and the ones you are eager to meet again. From conferences to conferences the bonds tighten (often despite the scientific disagreements) and from these irregular contacts emerges a community, a human community closely related to the abstract "scientific community".<br />
<br />
But scientific conferences are not only a bunch of old chaps meeting once a year. This is a powerful way to exchange ideas and to be able to dig into what other researchers have discovered. If you have read someone's paper, you are able to ask him/her questions to clarify and discuss his/her work. If not, hearing his/her presentation may make you read the referring article.<br />
<br />
In practice, a conference consists in a series of oral presentations of various lengths. Typically a researcher invited by the organisers will have an hour to expose his/her research in front of everybody, a researcher selected by the organisers will have 30 minutes, and the others will have only a poster presentation. I am at the poster level, so I stuff my results on a A0 that I hang in the dedicated place off the conference hall and during the so called "poster session" time I stand by, ready to explain my work to anybody interested. This also implies some advertising skill beforehand.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.blogger.com/goog_1074845823" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://farm7.staticflickr.com/6110/6429989765_fbdbd96489.jpg" width="226" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://www.mendeley.com/c/4530898965/p/2671171/leocmach-2011-roles-of-icosahedral-and-crystal-like-order-in-hard-spheres-glass-transition/" target="_blank">My poster for Unifying Concepts in Glass Physics 2011</a></td></tr>
</tbody></table>
Except your short time under the spotlight (your talk or your poster session), the conference consists mainly in listening to other's stories. In the past week I have listen to 8-10 talks every day, each representing at least months and more probably years of work condensed in 30 minutes or an hour. The previous week was more like 6 talks a day. Anyway, this is an enormous amount of information, a <i>all you can eat</i> buffet that I will slowly digest from now on.<br />
<br />
I will probably post here in the future some reflexions or discussions that result from this conference.Mathieu Leocmachhttp://www.blogger.com/profile/02908325651376702281noreply@blogger.com0Universite Paris 6 Pierre Et Marie Cur, 11 Rue Pierre et Marie Curie, 75005 Paris, France48.844299300105781 2.343564033508300848.841686800105784 2.3386285335083006 48.846911800105779 2.348499533508301