Jekyll2021-06-18T15:09:50+02:00https://tschmoderer.github.io/feed.xmlTimothée Schmodererpersonal descriptionTimothée Schmoderertimothee.schmoderer@insa-rouen.frGeogebra ressources2021-05-20T00:00:00+02:002021-05-20T00:00:00+02:00https://tschmoderer.github.io/posts/2021/05/blog-post-4<p>Here are the resources for my paper <strong>Characterization and classification of control system under a conic nonholomic constraint</strong></p> <h3 id="description-of-conic-submanifold-of-the-tangent-bundle">Description of conic submanifold of the tangent bundle</h3> <p>Link to the activity <a href="https://www.geogebra.org/m/tyb4ygpb">click here</a>.</p> <iframe scrolling="no" title="Parametrization of conic section" src="https://www.geogebra.org/material/iframe/id/tyb4ygpb/width/1901/height/884/border/888888/sfsb/true/smb/false/stb/false/stbh/false/ai/false/asb/false/sri/true/rc/false/ld/false/sdz/false/ctl/false" height="400" style="border:0px; width:100%;"> </iframe> <h3 id="canonical-form-of-hyperbolic-systems">Canonical form of hyperbolic systems</h3> <p>Link to the activity <a href="https://www.geogebra.org/m/qs4bdxgu">click here</a>.</p> <iframe scrolling="no" title="Canonical form for hyperbolic systems" src="https://www.geogebra.org/material/iframe/id/qs4bdxgu/width/1920/height/950/border/888888/sfsb/true/smb/false/stb/false/stbh/false/ai/false/asb/false/sri/true/rc/false/ld/false/sdz/false/ctl/false" height="400" style="border:0px; width:100%;"> </iframe>Timothée Schmoderertimothee.schmoderer@insa-rouen.frHere are the resources for my paper Characterization and classification of control system under a conic nonholomic constraintHidden puzzle in my game2021-05-11T00:00:00+02:002021-05-11T00:00:00+02:00https://tschmoderer.github.io/posts/2021/05/blog-post-3<p>On the 11th of May 2021, I played a game of chess on <a href="lichess.org">lichess.org</a> (feel free to challenge ;) ) against <em>gilnei</em> and this position occurred.</p> <iframe width="800" height="371" src="https://lichess.org/study/embed/XXPw4hdr/YJLTBISi#30" frameborder="0"></iframe>Timothée Schmoderertimothee.schmoderer@insa-rouen.frOn the 11th of May 2021, I played a game of chess on lichess.org (feel free to challenge ;) ) against gilnei and this position occurred.SageMath code for the centralizer of so(p,q)2020-02-02T00:00:00+01:002020-02-02T00:00:00+01:00https://tschmoderer.github.io/posts/2020/02/blog-post-2<h1 id="centralizer-of-mathfrakso_pqmathbbr">Centralizer of $\mathfrak{so}_{p,q}(\mathbb{R})$</h1> <p>This notebook describe a <a href="http://www.sagemath.org/index.html">SageMath</a> script designed to compute the centralizer of the real Lie algebra $\mathfrak{so}<em>{p,q}$ considered as a sub-algebra of $\mathfrak{gl}</em>{p+q}(\mathbb{R})$.</p> $C_{\mathfrak{gl}_n}(\mathfrak{so}_{p,q})=\{X\in \mathfrak{gl}_{n}(\mathbb{R}),\ \forall S\in\mathfrak{so}_{p,q}\ \ [X,S] = 0\}$ <p>We drop the notation $\mathbb{R}$ and set $n=p+q$ for simplicity.</p> <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Define dimensions </span><span class="n">p</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span> <span class="n">q</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span> <span class="n">m</span> <span class="o">=</span> <span class="n">p</span> <span class="o">+</span> <span class="n">q</span><span class="p">;</span> <span class="n">d</span> <span class="o">=</span> <span class="p">(</span><span class="n">m</span><span class="o">*</span><span class="p">(</span><span class="n">m</span><span class="o">-</span><span class="mi">1</span><span class="p">))</span><span class="o">/</span><span class="mi">2</span><span class="p">;</span> </code></pre></div></div> <p>Let $E_{i,j}\in\mathfrak{gl}<em>n$ be the matrix whose $(i,j)$ entry is $1$ and all others are $0$. A common basis of $\mathfrak{so}</em>{p,q}$ is given by,</p> $\left\{\begin{array}{cll} A_{i,j} &amp;= E_{i,j} - E_{j,i}\ &amp;:\ 1\leq i&lt; j\leq p, \\ B_{i,j} &amp;= E_{i,j} + E_{j,i}\ &amp;:\ 1\leq i\leq p,\ p+1\leq j\leq m, \\ D_{i,j} &amp;= E_{i,j} - E_{j,i}\ &amp;:\ p+1\leq i&lt; j\leq m. \end{array}\right\}$ <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">S</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># basis for so(p,q) </span><span class="n">k</span> <span class="o">=</span> <span class="mi">1</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">p</span><span class="o">-</span><span class="mi">1</span><span class="p">):</span> <span class="c1"># A_{i,j} = E_{i,j} - E_{j,i} \forall 1 \leq i &lt; j \leq p </span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span> <span class="n">A</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="n">m</span><span class="p">)</span> <span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">S</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">A</span> <span class="o">-</span> <span class="n">A</span><span class="p">.</span><span class="n">transpose</span><span class="p">()</span> <span class="n">k</span> <span class="o">=</span> <span class="n">k</span> <span class="o">+</span> <span class="mi">1</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">m</span><span class="o">-</span><span class="mi">1</span><span class="p">):</span> <span class="c1"># D_{i,j} = E_{i,j} - E_{j,i} \forall p+1 \leq i &lt; j \leq m </span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">m</span><span class="p">):</span> <span class="n">A</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="n">m</span><span class="p">)</span> <span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">S</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">A</span> <span class="o">-</span> <span class="n">A</span><span class="p">.</span><span class="n">transpose</span><span class="p">()</span> <span class="n">k</span> <span class="o">=</span> <span class="n">k</span> <span class="o">+</span> <span class="mi">1</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span> <span class="c1"># B_{i,j} = E_{i,j} + E_{j,i} \forall 1\leq i\leq p, p+1\leq j\leq m </span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">m</span><span class="p">):</span> <span class="n">A</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="n">m</span><span class="p">)</span> <span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">S</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">A</span> <span class="o">+</span> <span class="n">A</span><span class="p">.</span><span class="n">transpose</span><span class="p">()</span> <span class="n">k</span> <span class="o">=</span> <span class="n">k</span> <span class="o">+</span> <span class="mi">1</span> </code></pre></div></div> <p>Let $X$ be an element of the centralizer, then certainly $X$ commutes with every element of the basis.</p> <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Define commutators equations </span><span class="n">x</span> <span class="o">=</span> <span class="n">var</span><span class="p">([</span><span class="s">'x_%d%d'</span> <span class="o">%</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">)</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">)</span> <span class="ow">in</span> <span class="n">cartesian_product</span><span class="p">([</span><span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="n">m</span><span class="o">+</span><span class="mi">1</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="n">m</span><span class="o">+</span><span class="mi">1</span><span class="p">)])]);</span> <span class="n">X</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="n">SR</span><span class="p">,</span> <span class="n">m</span><span class="p">,</span> <span class="n">m</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span> <span class="n">E</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># set of equations </span><span class="n">J</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># set of jacobian </span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">d</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span> <span class="n">E</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">X</span><span class="o">*</span><span class="n">S</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">-</span> <span class="n">S</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">*</span><span class="n">X</span> <span class="n">J</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">jacobian</span><span class="p">(</span><span class="n">E</span><span class="p">[</span><span class="n">k</span><span class="p">].</span><span class="nb">list</span><span class="p">(),</span> <span class="n">x</span><span class="p">)</span> <span class="n">eqns</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># list of equations </span><span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">d</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span> <span class="n">eqns</span> <span class="o">=</span> <span class="n">eqns</span> <span class="o">+</span> <span class="p">[(</span><span class="n">J</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">*</span><span class="n">vector</span><span class="p">(</span><span class="n">SR</span><span class="p">,</span> <span class="n">x</span><span class="p">))[</span><span class="n">n</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span> <span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">m</span><span class="o">*</span><span class="n">m</span><span class="p">)]</span> </code></pre></div></div> <p>We now just solve the equations and substitute the solution in $X$ to get a common representation of the centralizer.</p> <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># solve equations </span><span class="n">sol</span> <span class="o">=</span> <span class="n">solve</span><span class="p">(</span><span class="n">eqns</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span> <span class="k">print</span> <span class="n">X</span><span class="p">.</span><span class="n">subs</span><span class="p">(</span><span class="n">sol</span><span class="p">)</span> </code></pre></div></div> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[r2 0 0 0] [ 0 r2 0 0] [ 0 0 r2 0] [ 0 0 0 r2] </code></pre></div></div> <p>This code is consistent with the following result,</p> <p>$$C_{\mathfrak{gl}_2}(\mathfrak{so}_2) = \left\{\begin{pmatrix}x &amp; y \\ -y&amp;x\end{pmatrix}\ :\ x,y\in\mathbb{R}\right\} = \mathfrak{so}_2\oplus \text{span}\{\text{Id}_2\} \\ C_{\mathfrak{gl}_2}(\mathfrak{so}_{1,1}) = \left\{\begin{pmatrix}x &amp; y \\ y&amp;x\end{pmatrix}\ :\ x,y\in\mathbb{R}\right\} = \mathfrak{so}_{1,1}\oplus \text{span}\{\text{Id}_2\} \\ C_{\mathfrak{gl}_n}(\mathfrak{so}_{p,q}) = \text{span}\{\text{Id}_{n}\}\cong \mathbb{R},\quad n \geq 3.$$ <a href="https://tschmoderer.github.io/files/SageMath/sopq_centralizer.sage">Download script</a></p>Timothée Schmoderertimothee.schmoderer@insa-rouen.frCentralizer of $\mathfrak{so}_{p,q}(\mathbb{R})$MRI Reconstruction in Cambridge2019-06-01T00:00:00+02:002019-06-01T00:00:00+02:00https://tschmoderer.github.io/posts/2019/06/blog-post-1<p>During summer 2019, I was invited in the Department of Applied Mathematics and Theoretical Physics of the University of Cambridge. I worked with <a href="https://sites.google.com/view/noemiedebroux/">Noemie Debroux</a> and <a href="https://angelicaiaviles.wordpress.com/">Angelica I. Aviles-Rivero</a> on MRI reconstruction.</p> <h1 id="the-project">The Project</h1> <p>Due to technical difficulties, MRI data are incomplete, thus to recover a full image of the patient, we have to develop technique to extrapolate from this set of incomplete data. If you try to reconstruct the MRI images by inverse Fourier transform you get this result:</p> <table> <thead> <tr> <th style="text-align: center"><img src="https://tschmoderer.github.io/images/blogs/2019_06_cambridge/reference_cardiac.jpg" alt="Reference frame" /></th> <th style="text-align: center"><img src="https://tschmoderer.github.io/images/blogs/2019_06_cambridge/direct_reco_cardiac.jpg" alt="IFFT frame" /></th> </tr> </thead> <tbody> <tr> <td style="text-align: center"><strong>Reference images</strong></td> <td style="text-align: center"><strong>Inverse Fourier Transform reconstruction</strong></td> </tr> </tbody> </table> <p>This method can be seen as a minimization of the least square problem</p> $E(\mathbf{m}) = \int_0^T \frac{1}{2} \|K\mathbf{m} - f\|_2^2\ dt$ <p>where we have,</p> <ul> <li>$\mathbf{m}$: The Image sequence we want to reconstruct,</li> <li>$K$ : The Fourier undersampling operator,</li> <li>$f$ : The data we possess,</li> </ul> <p>The reconstruction is not that bad (in fact $\text{ssim} = 0.82$) clearly imperfect. We can improve this result by adding prior knowlegde of the data, such as sparse representation.</p> <h2 id="traditional-methods">Traditional methods</h2> <p>We know that MRI images are sparse in the Wavelet domain. Moreover if we assume that MRI images are piecewise constant, traditional variational methods tend to minimize the following energy</p> $E(\mathbf{m}) = \int_0^T \frac{1}{2}\|K\mathbf{m}-f\|_2^2 + \lambda_1\|\nabla \mathbf{m}\|_1+\lambda_2\|\Psi\mathbf{m}\|_1\ dt$ <p>Hence this energy try to minimize the fidelity of the reconstruction with a constraint on the TV norm of each images and the sparsity of the images in the wavelet domain. This method improve the result on only inverse Fourier transform reconstruction.</p> <table> <thead> <tr> <th style="text-align: center"><img src="https://tschmoderer.github.io/images/blogs/2019_06_cambridge/tvl1_cardiac.jpg" alt="TV-L1 frame" /></th> </tr> </thead> <tbody> <tr> <td style="text-align: center">**Reconstruction by TV-L1 method with $\lambda_1=$ and $\lambda_2=$ **</td> </tr> </tbody> </table> <h2 id="improvement">Improvement</h2> <p>We can improve this reconstruction by using the temporal information. In deed, MRI data came from a sequence so there is a correlation between two consecutive reconstructed frames. This correlation is given by the optical flow. Assume we have a method to reconstruct the optical flow (such as TV-L1 method), we propose to minimize the following energy:</p> $E(\mathbf{m}) = \int_0^T \frac{1}{2}\|K\mathbf{m}-f\|_2^2 + \lambda_1\|\nabla \mathbf{m}\|_1+\lambda_2\|\Psi\mathbf{m}\|_1 + \lambda_3\left\| \frac{\partial \mathbf{m}}{\partial t} + \nabla \mathbf{m}\cdot\mathbf{u}\right\|_1\ dt$ <h3 id="algorithm">Algorithm</h3> <p>We can describe the method tho minize this energy. The method is based on Chambolle &amp; Pock <a href="b1639827@urhen.com">Algorithm</a>. The algorithm is a primal dual iteration, let $\mathbf{y}$ be the collection of dual variables.</p> <p>Chambolle Algorithm solve the following saddle point problem with $C=\begin{pmatrix}K \ \nabla \ \Psi \ F\end{pmatrix}^T$ and $F\mathbf{m} = \frac{\partial \mathbf{m}}{\partial t} + \nabla \mathbf{m}\cdot\mathbf{u}$.</p> $\arg\min_{\mathbf{m}}\arg\max_{\mathbf{y}} \left\langle C\mathbf{m},\mathbf{y} \right\rangle - E^{\star}(\mathbf{y})$ <p>The iteration proceed as follow,</p> $y_1^{n+1} = \frac{y_1^n+\sigma K\bar{\mathbf{m}}^n-\sigma f}{2\sigma +1} \\ y_2^{n+1} = \pi_{\lambda_1}(y_2^n+\sigma\nabla\bar{\mathbf{m}}^n)\\ y_3^{n+1} = \pi_{\lambda_2}(y_3^n +\sigma\Psi\bar{\mathbf{m}}^n)\\ y_4^{n+1} = \pi_{\lambda_3}(y_4^n +\sigma F\bar{\mathbf{m}}^n)\\$ <h2 id="our-contribution">Our contribution</h2> <p>The main idea of the project was to combine MRI reconstruction with sparse representation of the optical flow.</p> <h1 id="tourism">Tourism</h1> <p>During this two month, I enjoyed walking in the old street of Cambridge. It was impressive to be in the city where DNA was discover,</p> <table> <thead> <tr> <th style="text-align: center"><img src="https://tschmoderer.github.io/images/blogs/2019_06_cambridge/math_bridge.jpg" alt="Mathematical Bridge" /></th> </tr> </thead> <tbody> <tr> <td style="text-align: center"><strong>Mathematical Bridge</strong></td> </tr> </tbody> </table>Timothée Schmoderertimothee.schmoderer@insa-rouen.frDuring summer 2019, I was invited in the Department of Applied Mathematics and Theoretical Physics of the University of Cambridge. I worked with Noemie Debroux and Angelica I. Aviles-Rivero on MRI reconstruction.