Coryab/code #13

Merged
coryab merged 6 commits from coryab/code into develop 2023-10-24 20:43:28 +00:00
35 changed files with 2280 additions and 424 deletions
Showing only changes of commit 36ee519964 - Show all commits

View File

@ -0,0 +1,216 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/animate_100_particles.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('animate__100__particles_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">animate_100_particles.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Animate 100 particles.
<a href="#details">More...</a></p>
<p><a href="animate__100__particles_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a88563d050144188c2c625a1063f9b4f8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html#a88563d050144188c2c625a1063f9b4f8">animate_100_particles.get_data</a> (files)</td></tr>
<tr class="separator:a88563d050144188c2c625a1063f9b4f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b3fbca78794cb9cd04d6059d8b63624"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html#a8b3fbca78794cb9cd04d6059d8b63624">animate_100_particles.update</a> (num, lines, arr)</td></tr>
<tr class="separator:a8b3fbca78794cb9cd04d6059d8b63624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5a461adc32af6d9bc9475cd6be309ca"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html#ab5a461adc32af6d9bc9475cd6be309ca">animate_100_particles.animate</a> ()</td></tr>
<tr class="separator:ab5a461adc32af6d9bc9475cd6be309ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Animate 100 particles. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000012">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ab5a461adc32af6d9bc9475cd6be309ca" name="ab5a461adc32af6d9bc9475cd6be309ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5a461adc32af6d9bc9475cd6be309ca">&#9670;&#160;</a></span>animate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def animate_100_particles.animate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="animate__100__particles_8py_source.html#l00041">41</a> of file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div>
</div>
<a id="a88563d050144188c2c625a1063f9b4f8" name="a88563d050144188c2c625a1063f9b4f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88563d050144188c2c625a1063f9b4f8">&#9670;&#160;</a></span>get_data()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def animate_100_particles.get_data </td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>files</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="animate__100__particles_8py_source.html#l00018">18</a> of file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div>
</div>
<a id="a8b3fbca78794cb9cd04d6059d8b63624" name="a8b3fbca78794cb9cd04d6059d8b63624"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b3fbca78794cb9cd04d6059d8b63624">&#9670;&#160;</a></span>update()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def animate_100_particles.update </td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>num</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>lines</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>arr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="animate__100__particles_8py_source.html#l00035">35</a> of file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,83 +101,84 @@ $(document).ready(function(){initNavTree('animate__100__particles_8py_source.htm
<div class="headertitle"><div class="title">animate_100_particles.py</div></div> <div class="headertitle"><div class="title">animate_100_particles.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="animate__100__particles_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div> <div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">from</span> matplotlib <span class="keyword">import</span> animation</div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">from</span> mpl_toolkits.mplot3d <span class="keyword">import</span> Axes3D</div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">from</span> matplotlib <span class="keyword">import</span> animation</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">from</span> mpl_toolkits.mplot3d <span class="keyword">import</span> Axes3D</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">def </span>get_data(files):</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> res = []</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keywordflow">for</span> file <span class="keywordflow">in</span> files:</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">def </span>get_data(files):</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> arr = [[], [], []]</div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> res = []</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">with</span> open(file, encoding=<span class="stringliteral">&quot;utf8&quot;</span>) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">for</span> file <span class="keywordflow">in</span> files:</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> lines = f.readlines()</div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> arr = [[], [], []]</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">with</span> open(file, encoding=<span class="stringliteral">&quot;utf8&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> lines = f.readlines()</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> xi, yi, zi = map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> arr[0].append(xi)</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> arr[1].append(yi)</div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> xi, yi, zi = map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> arr[2].append(zi)</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> arr[0].append(xi)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> res.append(arr)</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> arr[1].append(yi)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> arr[2].append(zi)</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordflow">return</span> np.array(res)</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> res.append(arr)</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">return</span> np.array(res)</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">def </span>update(num, lines, arr):</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">for</span> line, a <span class="keywordflow">in</span> zip(lines, arr):</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> line.set_data(a[:2, num - 1 : num])</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> line.set_3d_properties(a[2, num])</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>animate():</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> plt.style.use(<span class="stringliteral">&quot;dark_background&quot;</span>)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> fig = plt.figure()</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ax = fig.add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> arr = get_data([f<span class="stringliteral">&quot;output/simulate_100_particles/particle_{i}_r.txt&quot;</span> <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(100)])</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">def </span>update(num, lines, arr):</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">for</span> line, a <span class="keywordflow">in</span> zip(lines, arr):</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> arr = arr[:, :, ::10]</div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> line.set_data(a[:2, num - 1 : num])</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> line.set_3d_properties(a[2, num])</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> N = len(arr[0][0])</div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> lines = [ax.plot(*a[:, 1], <span class="stringliteral">&quot;o&quot;</span>)[0] <span class="keywordflow">for</span> a <span class="keywordflow">in</span> arr]</div> <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keyword">def </span>animate():</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div> <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> plt.style.use(<span class="stringliteral">&quot;dark_background&quot;</span>)</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> ax.set_title(<span class="stringliteral">&quot;100 particles inside a Penning trap&quot;</span>)</div> <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> fig = plt.figure()</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> plt.figtext(</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> ax = fig.add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> 0.5,</div> <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> 0.01,</div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> arr = get_data([f<span class="stringliteral">&quot;output/simulate_100_particles/particle_{i}_r.txt&quot;</span> <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(100)])</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;100 randomly generated particles &quot;</span></div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="stringliteral">&quot;evolving over a time of 50 microseconds.&quot;</span>,</div> <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> arr = arr[:, :, ::40]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> fontsize=12,</div> <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> horizontalalignment=<span class="stringliteral">&quot;center&quot;</span>,</div> <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> N = len(arr[0][0])</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> )</div> <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div> <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> lines = [ax.plot(*a[:, 1], <span class="stringliteral">&quot;o&quot;</span>)[0] <span class="keywordflow">for</span> a <span class="keywordflow">in</span> arr]</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ax.set_xlim3d([-500.0, 500.0])</div> <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> ax.set_xlabel(<span class="stringliteral">&quot;X (micrometers)&quot;</span>)</div> <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> ax.set_title(<span class="stringliteral">&quot;100 particles inside a Penning trap&quot;</span>)</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div> <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> plt.figtext(</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> ax.set_ylim3d([-500.0, 500.0])</div> <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> 0.5,</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> ax.set_ylabel(<span class="stringliteral">&quot;Y (micrometers)&quot;</span>)</div> <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> 0.01,</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div> <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="stringliteral">&quot;100 randomly generated particles &quot;</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> ax.set_zlim3d([-500.0, 500.0])</div> <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="stringliteral">&quot;evolving over a time of 50 microseconds.&quot;</span>,</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> ax.set_zlabel(<span class="stringliteral">&quot;Z (micrometers)&quot;</span>)</div> <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> fontsize=12,</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div> <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> horizontalalignment=<span class="stringliteral">&quot;center&quot;</span>,</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> ani = animation.FuncAnimation(</div> <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> )</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> fig, update, N, fargs=(lines, arr), interval=1, blit=<span class="keyword">False</span></div> <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> )</div> <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> ax.set_xlim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div> <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ax.set_xlabel(<span class="stringliteral">&quot;X (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="comment"># ani.save(&quot;../images/100_particles.gif&quot;, writer=animation.FFMpegFileWriter(fps=50))</span></div> <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> plt.show()</div> <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> ax.set_ylim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div> <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> ax.set_ylabel(<span class="stringliteral">&quot;Y (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div> <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ax.set_zlim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> animate()</div> <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> ax.set_zlabel(<span class="stringliteral">&quot;Z (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> ani = animation.FuncAnimation(</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> fig, update, N, fargs=(lines, arr), interval=1, blit=<span class="keyword">False</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> )</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> ani.save(<span class="stringliteral">&quot;../images/100_particles.gif&quot;</span>, writer=animation.FFMpegFileWriter(fps=50))</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> animate()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>animate_100_particles.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

View File

@ -102,6 +102,8 @@ $(document).ready(function(){initNavTree('bug.html',''); initResizable(); });
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="textblock"><dl class="reflist"> <div class="textblock"><dl class="reflist">
<dt>File <a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a> </dt>
<dd><a class="anchor" id="_bug000012"></a>No known bugs </dd>
<dt>File <a class="el" href="constants_8hpp.html">constants.hpp</a> </dt> <dt>File <a class="el" href="constants_8hpp.html">constants.hpp</a> </dt>
<dd><a class="anchor" id="_bug000001"></a>No known bugs </dd> <dd><a class="anchor" id="_bug000001"></a>No known bugs </dd>
<dt>File <a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a> </dt> <dt>File <a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a> </dt>
@ -116,6 +118,18 @@ $(document).ready(function(){initNavTree('bug.html',''); initResizable(); });
<dd><a class="anchor" id="_bug000009"></a>No known bugs </dd> <dd><a class="anchor" id="_bug000009"></a>No known bugs </dd>
<dt>File <a class="el" href="PenningTrap_8hpp.html">PenningTrap.hpp</a> </dt> <dt>File <a class="el" href="PenningTrap_8hpp.html">PenningTrap.hpp</a> </dt>
<dd><a class="anchor" id="_bug000003"></a>No known bugs </dd> <dd><a class="anchor" id="_bug000003"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a> </dt>
<dd><a class="anchor" id="_bug000013"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__3d_8py.html">plot_3d.py</a> </dt>
<dd><a class="anchor" id="_bug000014"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a> </dt>
<dd><a class="anchor" id="_bug000015"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a> </dt>
<dd><a class="anchor" id="_bug000016"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a> </dt>
<dd><a class="anchor" id="_bug000017"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a> </dt>
<dd><a class="anchor" id="_bug000018"></a>No known bugs </dd>
<dt>File <a class="el" href="test__suite_8cpp.html">test_suite.cpp</a> </dt> <dt>File <a class="el" href="test__suite_8cpp.html">test_suite.cpp</a> </dt>
<dd><a class="anchor" id="_bug000010"></a>No known bugs </dd> <dd><a class="anchor" id="_bug000010"></a>No known bugs </dd>
<dt>File <a class="el" href="typedefs_8hpp.html">typedefs.hpp</a> </dt> <dt>File <a class="el" href="typedefs_8hpp.html">typedefs.hpp</a> </dt>

View File

@ -104,19 +104,26 @@ $(document).ready(function(){initNavTree('dir_634e799a3947388232110823971192a8.h
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr> Files</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>animate_100_particles.py</b> <a href="animate__100__particles_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a> <a href="animate__100__particles_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:animate__100__particles_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Animate 100 particles. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_2_particles.py</b> <a href="plot__2__particles_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a> <a href="plot__2__particles_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__2__particles_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot 2 particles with and without particle interactions in the xy-plane. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_3d.py</b> <a href="plot__3d_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__3d_8py.html">plot_3d.py</a> <a href="plot__3d_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__3d_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot 2 particles with and without particle interactions in 3D. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_particles_left.py</b> <a href="plot__particles__left_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a> <a href="plot__particles__left_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__particles__left_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot how many particles are left after 500 microseconds using different angular frequencies. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_phase_space.py</b> <a href="plot__phase__space_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a> <a href="plot__phase__space_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__phase__space_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot the phase space for 2 particles in the x and z direction, with and without particle interactions. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_relative_error.py</b> <a href="plot__relative__error_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a> <a href="plot__relative__error_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__relative__error_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot the relative error for forward Euler and RK4 method. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_single_particle.py</b> <a href="plot__single__particle_8py_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a> <a href="plot__single__particle_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__single__particle_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot the approximation and analytical solution for one particle in the z axis. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
</div><!-- contents --> </div><!-- contents -->

View File

@ -1,10 +1,10 @@
var dir_634e799a3947388232110823971192a8 = var dir_634e799a3947388232110823971192a8 =
[ [
[ "animate_100_particles.py", "animate__100__particles_8py_source.html", null ], [ "animate_100_particles.py", "animate__100__particles_8py.html", null ],
[ "plot_2_particles.py", "plot__2__particles_8py_source.html", null ], [ "plot_2_particles.py", "plot__2__particles_8py.html", null ],
[ "plot_3d.py", "plot__3d_8py_source.html", null ], [ "plot_3d.py", "plot__3d_8py.html", null ],
[ "plot_particles_left.py", "plot__particles__left_8py_source.html", null ], [ "plot_particles_left.py", "plot__particles__left_8py.html", null ],
[ "plot_phase_space.py", "plot__phase__space_8py_source.html", null ], [ "plot_phase_space.py", "plot__phase__space_8py.html", null ],
[ "plot_relative_error.py", "plot__relative__error_8py_source.html", null ], [ "plot_relative_error.py", "plot__relative__error_8py.html", null ],
[ "plot_single_particle.py", "plot__single__particle_8py_source.html", null ] [ "plot_single_particle.py", "plot__single__particle_8py.html", null ]
]; ];

View File

@ -102,6 +102,11 @@ $(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.h
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr> Files</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a> <a href="frequency__narrow__sweeps__long_8cpp_source.html">[code]</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a> <a href="frequency__narrow__sweeps__long_8cpp_source.html">[code]</a></td></tr>

View File

@ -1,5 +1,6 @@
var dir_68267d1309a1af8e8297ef4c3efbcdba = var dir_68267d1309a1af8e8297ef4c3efbcdba =
[ [
[ "scripts", "dir_634e799a3947388232110823971192a8.html", "dir_634e799a3947388232110823971192a8" ],
[ "frequency_narrow_sweeps_long.cpp", "frequency__narrow__sweeps__long_8cpp.html", "frequency__narrow__sweeps__long_8cpp" ], [ "frequency_narrow_sweeps_long.cpp", "frequency__narrow__sweeps__long_8cpp.html", "frequency__narrow__sweeps__long_8cpp" ],
[ "main.cpp", "main_8cpp.html", "main_8cpp" ], [ "main.cpp", "main_8cpp.html", "main_8cpp" ],
[ "Particle.cpp", "Particle_8cpp.html", null ], [ "Particle.cpp", "Particle_8cpp.html", null ],

View File

@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory"> <div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory"> <div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr> <tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr>
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="constants_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="constants_8hpp.html" target="_self">constants.hpp</a></td><td class="desc">Library of constants </td></tr> <tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="constants_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="constants_8hpp.html" target="_self">constants.hpp</a></td><td class="desc">Library of constants </td></tr>
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8hpp.html" target="_self">Particle.hpp</a></td><td class="desc">A class that holds the properties of a particle </td></tr> <tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8hpp.html" target="_self">Particle.hpp</a></td><td class="desc">A class that holds the properties of a particle </td></tr>
@ -110,12 +110,20 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="typedefs_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="typedefs_8hpp.html" target="_self">typedefs.hpp</a></td><td class="desc">Useful typedefs for cleaner code </td></tr> <tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="typedefs_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="typedefs_8hpp.html" target="_self">typedefs.hpp</a></td><td class="desc">Useful typedefs for cleaner code </td></tr>
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8hpp.html" target="_self">utils.hpp</a></td><td class="desc">Function prototypes and macros that are useful </td></tr> <tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8hpp.html" target="_self">utils.hpp</a></td><td class="desc">Function prototypes and macros that are useful </td></tr>
<tr id="row_1_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">&#9660;</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')">&#160;</span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr> <tr id="row_1_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">&#9660;</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')">&#160;</span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr>
<tr id="row_1_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="frequency__narrow__sweeps__long_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="frequency__narrow__sweeps__long_8cpp.html" target="_self">frequency_narrow_sweeps_long.cpp</a></td><td class="desc">Sweep of the frequencies from 1.1 to 1.7 using a small time step </td></tr> <tr id="row_1_0_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_1_0_" class="arrow" onclick="toggleFolder('1_0_')">&#9660;</span><span id="img_1_0_" class="iconfopen" onclick="toggleFolder('1_0_')">&#160;</span><a class="el" href="dir_634e799a3947388232110823971192a8.html" target="_self">scripts</a></td><td class="desc"></td></tr>
<tr id="row_1_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="main_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">The main program for this project </td></tr> <tr id="row_1_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="animate__100__particles_8py_source.html"><span class="icondoc"></span></a><a class="el" href="animate__100__particles_8py.html" target="_self">animate_100_particles.py</a></td><td class="desc">Animate 100 particles </td></tr>
<tr id="row_1_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8cpp.html" target="_self">Particle.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> class </td></tr> <tr id="row_1_0_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__2__particles_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__2__particles_8py.html" target="_self">plot_2_particles.py</a></td><td class="desc">Plot 2 particles with and without particle interactions in the xy-plane </td></tr>
<tr id="row_1_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="PenningTrap_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="PenningTrap_8cpp.html" target="_self">PenningTrap.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class </td></tr> <tr id="row_1_0_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__3d_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__3d_8py.html" target="_self">plot_3d.py</a></td><td class="desc">Plot 2 particles with and without particle interactions in 3D </td></tr>
<tr id="row_1_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="test__suite_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">The test suite for the project </td></tr> <tr id="row_1_0_3_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__particles__left_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__particles__left_8py.html" target="_self">plot_particles_left.py</a></td><td class="desc">Plot how many particles are left after 500 microseconds using different angular frequencies </td></tr>
<tr id="row_1_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr> <tr id="row_1_0_4_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__phase__space_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__phase__space_8py.html" target="_self">plot_phase_space.py</a></td><td class="desc">Plot the phase space for 2 particles in the x and z direction, with and without particle interactions </td></tr>
<tr id="row_1_0_5_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__relative__error_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__relative__error_8py.html" target="_self">plot_relative_error.py</a></td><td class="desc">Plot the relative error for forward Euler and RK4 method </td></tr>
<tr id="row_1_0_6_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__single__particle_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__single__particle_8py.html" target="_self">plot_single_particle.py</a></td><td class="desc">Plot the approximation and analytical solution for one particle in the z axis </td></tr>
<tr id="row_1_1_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="frequency__narrow__sweeps__long_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="frequency__narrow__sweeps__long_8cpp.html" target="_self">frequency_narrow_sweeps_long.cpp</a></td><td class="desc">Sweep of the frequencies from 1.1 to 1.7 using a small time step </td></tr>
<tr id="row_1_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="main_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">The main program for this project </td></tr>
<tr id="row_1_3_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8cpp.html" target="_self">Particle.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> class </td></tr>
<tr id="row_1_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="PenningTrap_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="PenningTrap_8cpp.html" target="_self">PenningTrap.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class </td></tr>
<tr id="row_1_5_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="test__suite_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">The test suite for the project </td></tr>
<tr id="row_1_6_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr>
</table> </table>
</div><!-- directory --> </div><!-- directory -->
</div><!-- contents --> </div><!-- contents -->

177
docs/namespaceplot__3d.html Normal file
View File

@ -0,0 +1,177 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: plot_3d Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('namespaceplot__3d.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_3d Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot__3d.html#adb8902df55180f4ad62fb3799bc5c5a8">main</a> ()</td></tr>
<tr class="separator:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a7026cb07859df7ff6b3fb60453573467"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot__3d.html#a7026cb07859df7ff6b3fb60453573467">params</a></td></tr>
<tr class="separator:a7026cb07859df7ff6b3fb60453573467"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><pre class="fragment"> @package plot_3d</pre> </div><h2 class="groupheader">Function Documentation</h2>
<a id="adb8902df55180f4ad62fb3799bc5c5a8" name="adb8902df55180f4ad62fb3799bc5c5a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb8902df55180f4ad62fb3799bc5c5a8">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_3d.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00022">22</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a7026cb07859df7ff6b3fb60453573467" name="a7026cb07859df7ff6b3fb60453573467"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7026cb07859df7ff6b3fb60453573467">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_3d.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><span class="lineno"> 10</span> <span class="stringliteral">&quot;figure.autolayout&quot;</span>: <span class="keyword">True</span></div>
<div class="line"><span class="lineno"> 11</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00009">9</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespaceplot__3d.html">plot_3d</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

118
docs/namespaces.html Normal file
View File

@ -0,0 +1,118 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: Namespace List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('namespaces.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Namespace List</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all documented namespaces with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceplot__3d.html" target="_self">plot_3d</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

4
docs/namespaces_dup.js Normal file
View File

@ -0,0 +1,4 @@
var namespaces_dup =
[
[ "plot_3d", "namespaceplot__3d.html", null ]
];

View File

@ -1,13 +1,15 @@
var NAVTREEINDEX0 = var NAVTREEINDEX0 =
{ {
"Particle_8cpp.html":[7,0,1,2], "Particle_8cpp.html":[7,0,1,3],
"Particle_8cpp_source.html":[7,0,1,2], "Particle_8cpp_source.html":[7,0,1,3],
"Particle_8hpp.html":[7,0,0,1], "Particle_8hpp.html":[7,0,0,1],
"Particle_8hpp_source.html":[7,0,0,1], "Particle_8hpp_source.html":[7,0,0,1],
"PenningTrap_8cpp.html":[7,0,1,3], "PenningTrap_8cpp.html":[7,0,1,4],
"PenningTrap_8cpp_source.html":[7,0,1,3], "PenningTrap_8cpp_source.html":[7,0,1,4],
"PenningTrap_8hpp.html":[7,0,0,2], "PenningTrap_8hpp.html":[7,0,0,2],
"PenningTrap_8hpp_source.html":[7,0,0,2], "PenningTrap_8hpp_source.html":[7,0,0,2],
"animate__100__particles_8py.html":[7,0,1,0,0],
"animate__100__particles_8py_source.html":[7,0,1,0,0],
"annotated.html":[6,0], "annotated.html":[6,0],
"bug.html":[5], "bug.html":[5],
"classParticle.html":[6,0,0], "classParticle.html":[6,0,0],
@ -61,13 +63,14 @@ var NAVTREEINDEX0 =
"constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb":[7,0,0,0,4], "constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb":[7,0,0,0,4],
"constants_8hpp.html#af7602a3a314957137ad1cd719aa23789":[7,0,0,0,0], "constants_8hpp.html#af7602a3a314957137ad1cd719aa23789":[7,0,0,0,0],
"constants_8hpp_source.html":[7,0,0,0], "constants_8hpp_source.html":[7,0,0,0],
"dir_634e799a3947388232110823971192a8.html":[7,0,1,0],
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[7,0,1], "dir_68267d1309a1af8e8297ef4c3efbcdba.html":[7,0,1],
"dir_d44c64559bbebec7f509842c48db8b23.html":[7,0,0], "dir_d44c64559bbebec7f509842c48db8b23.html":[7,0,0],
"files.html":[7,0], "files.html":[7,0],
"frequency__narrow__sweeps__long_8cpp.html":[7,0,1,0], "frequency__narrow__sweeps__long_8cpp.html":[7,0,1,1],
"frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea":[7,0,1,0,0], "frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea":[7,0,1,1,0],
"frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb":[7,0,1,0,1], "frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb":[7,0,1,1,1],
"frequency__narrow__sweeps__long_8cpp_source.html":[7,0,1,0], "frequency__narrow__sweeps__long_8cpp_source.html":[7,0,1,1],
"functions.html":[6,2,0], "functions.html":[6,2,0],
"functions_func.html":[6,2,1], "functions_func.html":[6,2,1],
"functions_rela.html":[6,2,3], "functions_rela.html":[6,2,3],
@ -93,22 +96,34 @@ var NAVTREEINDEX0 =
"index.html#autotoc_md7":[2,0], "index.html#autotoc_md7":[2,0],
"index.html#autotoc_md8":[2,1], "index.html#autotoc_md8":[2,1],
"index.html#autotoc_md9":[2,1,0], "index.html#autotoc_md9":[2,1,0],
"main_8cpp.html":[7,0,1,1], "main_8cpp.html":[7,0,1,2],
"main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513":[7,0,1,1,4], "main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513":[7,0,1,2,4],
"main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30":[7,0,1,1,8], "main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30":[7,0,1,2,8],
"main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea":[7,0,1,1,1], "main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea":[7,0,1,2,1],
"main_8cpp.html#a6b38b477c18e2f4268779751a88edab1":[7,0,1,1,3], "main_8cpp.html#a6b38b477c18e2f4268779751a88edab1":[7,0,1,2,3],
"main_8cpp.html#a783789519f97c6430081171cacb0ffb1":[7,0,1,1,7], "main_8cpp.html#a783789519f97c6430081171cacb0ffb1":[7,0,1,2,7],
"main_8cpp.html#a8d92fb2ad085065fbd14718647551657":[7,0,1,1,0], "main_8cpp.html#a8d92fb2ad085065fbd14718647551657":[7,0,1,2,0],
"main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6":[7,0,1,1,5], "main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6":[7,0,1,2,5],
"main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb":[7,0,1,1,2], "main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb":[7,0,1,2,2],
"main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2":[7,0,1,1,6], "main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2":[7,0,1,2,6],
"main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7":[7,0,1,1,9], "main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7":[7,0,1,2,9],
"main_8cpp_source.html":[7,0,1,1], "main_8cpp_source.html":[7,0,1,2],
"pages.html":[], "pages.html":[],
"plot__2__particles_8py.html":[7,0,1,0,1],
"plot__2__particles_8py_source.html":[7,0,1,0,1],
"plot__3d_8py.html":[7,0,1,0,2],
"plot__3d_8py_source.html":[7,0,1,0,2],
"plot__particles__left_8py.html":[7,0,1,0,3],
"plot__particles__left_8py_source.html":[7,0,1,0,3],
"plot__phase__space_8py.html":[7,0,1,0,4],
"plot__phase__space_8py_source.html":[7,0,1,0,4],
"plot__relative__error_8py.html":[7,0,1,0,5],
"plot__relative__error_8py_source.html":[7,0,1,0,5],
"plot__single__particle_8py.html":[7,0,1,0,6],
"plot__single__particle_8py_source.html":[7,0,1,0,6],
"structsimulation.html":[6,0,3], "structsimulation.html":[6,0,3],
"test__suite_8cpp.html":[7,0,1,4], "test__suite_8cpp.html":[7,0,1,5],
"test__suite_8cpp_source.html":[7,0,1,4], "test__suite_8cpp_source.html":[7,0,1,5],
"typedefs_8hpp.html":[7,0,0,3], "typedefs_8hpp.html":[7,0,0,3],
"typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22":[7,0,0,3,3], "typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22":[7,0,0,3,3],
"typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea":[7,0,0,3,5], "typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea":[7,0,0,3,5],
@ -116,13 +131,13 @@ var NAVTREEINDEX0 =
"typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6":[7,0,0,3,4], "typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6":[7,0,0,3,4],
"typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af":[7,0,0,3,1], "typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af":[7,0,0,3,1],
"typedefs_8hpp_source.html":[7,0,0,3], "typedefs_8hpp_source.html":[7,0,0,3],
"utils_8cpp.html":[7,0,1,5], "utils_8cpp.html":[7,0,1,6],
"utils_8cpp.html#a58565270b643b24e3132f38c653e0199":[7,0,1,5,3], "utils_8cpp.html#a58565270b643b24e3132f38c653e0199":[7,0,1,6,3],
"utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2":[7,0,1,5,0], "utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2":[7,0,1,6,0],
"utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[7,0,1,5,4], "utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[7,0,1,6,4],
"utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de":[7,0,1,5,2], "utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de":[7,0,1,6,2],
"utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b":[7,0,1,5,1], "utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b":[7,0,1,6,1],
"utils_8cpp_source.html":[7,0,1,5], "utils_8cpp_source.html":[7,0,1,6],
"utils_8hpp.html":[7,0,0,4], "utils_8hpp.html":[7,0,0,4],
"utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38":[7,0,0,4,4], "utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38":[7,0,0,4,4],
"utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168":[7,0,0,4,0], "utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168":[7,0,0,4,0],

View File

@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_2_particles.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__2__particles_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_2_particles.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot 2 particles with and without particle interactions in the xy-plane.
<a href="#details">More...</a></p>
<p><a href="plot__2__particles_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8863a67cb3a33d1a522efae56b05d37d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__2__particles_8py.html#a8863a67cb3a33d1a522efae56b05d37d">plot_2_particles.main</a> ()</td></tr>
<tr class="separator:a8863a67cb3a33d1a522efae56b05d37d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a65096b5c625338aed999b0be51846e3a"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__2__particles_8py.html#a65096b5c625338aed999b0be51846e3a">plot_2_particles.params</a></td></tr>
<tr class="separator:a65096b5c625338aed999b0be51846e3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot 2 particles with and without particle interactions in the xy-plane. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000013">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__2__particles_8py_source.html">plot_2_particles.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a8863a67cb3a33d1a522efae56b05d37d" name="a8863a67cb3a33d1a522efae56b05d37d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8863a67cb3a33d1a522efae56b05d37d">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_2_particles.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__2__particles_8py_source.html#l00030">30</a> of file <a class="el" href="plot__2__particles_8py_source.html">plot_2_particles.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a65096b5c625338aed999b0be51846e3a" name="a65096b5c625338aed999b0be51846e3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65096b5c625338aed999b0be51846e3a">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_2_particles.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__2__particles_8py_source.html#l00018">18</a> of file <a class="el" href="plot__2__particles_8py_source.html">plot_2_particles.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,51 +101,77 @@ $(document).ready(function(){initNavTree('plot__2__particles_8py_source.html',''
<div class="headertitle"><div class="title">plot_2_particles.py</div></div> <div class="headertitle"><div class="title">plot_2_particles.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="plot__2__particles_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> files = [</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_0_r.txt&quot;</span>,</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_1_r.txt&quot;</span>,</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>sns.set_theme()</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_0_r.txt&quot;</span>,</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>params = {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_1_r.txt&quot;</span></div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> ]</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> labels = [</div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;particle 1 no interaction&quot;</span>,</div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;particle 2 no interaction&quot;</span>,</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">&quot;particle 1 with interaction&quot;</span>,</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">&quot;particle 2 with interaction&quot;</span>,</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> ]</div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> colors = [</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;salmon&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> ]</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> lines = f.readlines()</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> plt.plot(r[:,0], r[:,1], label=label, color=color)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> plt.xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> plt.ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> directories = {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> plt.title(<span class="stringliteral">r&quot;2 particles with and without interactions.&quot;</span>)</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="comment"># plt.legend()</span></div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="comment"># plt.show()</span></div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> }</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> plt.savefig(<span class="stringliteral">&quot;../latex/images/plot_2_particles_xy.pdf&quot;</span>)</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> files = [</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="stringliteral">&quot;particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> ]</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> main()</div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> outputs = [</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="stringliteral">&quot;../latex/images/simulate_2_particles_no_interaction_xy.pdf&quot;</span>,</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">&quot;../latex/images/simulate_2_particles_interaction_xy.pdf&quot;</span>,</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> ]</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> labels = [</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">r&quot;$p_1$&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">r&quot;$p_2$&quot;</span>,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">r&quot;$\hat{p}_1$&quot;</span>,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">r&quot;$\hat{p}_2$&quot;</span>,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> colors = [</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="stringliteral">&quot;darkred&quot;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> ]</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> start_pos = set()</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">for</span> dir, output <span class="keywordflow">in</span> zip(directories, outputs):</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> lines = f.readlines()</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> ax.plot(r[:,0], r[:,1], label=label, color=color)</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> start_pos.add((r[0,0],r[0,1]))</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">for</span> pos <span class="keywordflow">in</span> start_pos:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ax.plot(*pos, <span class="stringliteral">&quot;o&quot;</span>, color=<span class="stringliteral">&quot;black&quot;</span>)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> ax.set_xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> ax.set_ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ax.axis(<span class="stringliteral">&quot;equal&quot;</span>)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> fig.savefig(output, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>plot_2_particles.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

190
docs/plot__3d_8py.html Normal file
View File

@ -0,0 +1,190 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_3d.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__3d_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_3d.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot 2 particles with and without particle interactions in 3D.
<a href="#details">More...</a></p>
<p><a href="plot__3d_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__3d_8py.html#adb8902df55180f4ad62fb3799bc5c5a8">plot_3d.main</a> ()</td></tr>
<tr class="separator:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a7026cb07859df7ff6b3fb60453573467"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__3d_8py.html#a7026cb07859df7ff6b3fb60453573467">plot_3d.params</a></td></tr>
<tr class="separator:a7026cb07859df7ff6b3fb60453573467"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot 2 particles with and without particle interactions in 3D. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000014">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="adb8902df55180f4ad62fb3799bc5c5a8" name="adb8902df55180f4ad62fb3799bc5c5a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb8902df55180f4ad62fb3799bc5c5a8">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_3d.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00030">30</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a7026cb07859df7ff6b3fb60453573467" name="a7026cb07859df7ff6b3fb60453573467"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7026cb07859df7ff6b3fb60453573467">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_3d.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><span class="lineno"> 10</span> <span class="stringliteral">&quot;figure.autolayout&quot;</span>: <span class="keyword">True</span></div>
<div class="line"><span class="lineno"> 11</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00017">17</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__3d_8py.html">plot_3d.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,52 +101,70 @@ $(document).ready(function(){initNavTree('plot__3d_8py_source.html',''); initRes
<div class="headertitle"><div class="title">plot_3d.py</div></div> <div class="headertitle"><div class="title">plot_3d.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="plot__3d_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div> <div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> files = [</div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_0_r.txt&quot;</span>,</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_1_r.txt&quot;</span>,</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>sns.set_theme()</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_0_r.txt&quot;</span>,</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>params = {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_1_r.txt&quot;</span></div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> ]</div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> labels = [</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;particle 1 no interaction&quot;</span>,</div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;particle 2 no interaction&quot;</span>,</div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">&quot;particle 1 with interaction&quot;</span>,</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">&quot;particle 2 with interaction&quot;</span>,</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> ]</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> colors = [</div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;figure.autolayout&quot;</span>: <span class="keyword">True</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;deepskyblue&quot;</span>,</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;darkred&quot;</span></div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> ]</div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> files = [</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> ax = plt.figure().add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> lines = f.readlines()</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_1_r.txt&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> t = np.linspace(0, 50, len(lines))</div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> ]</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> labels = [</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> ax.plot(r[:,0], r[:,1], r[:,2], label=label, color=color)</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">r&quot;$p_1$&quot;</span>,</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="stringliteral">r&quot;$p_2$&quot;</span>,</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> ax.set_xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="stringliteral">r&quot;$\hat{p}_1$&quot;</span>,</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> ax.set_ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">r&quot;$\hat{p}_2$&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ax.set_zlabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> ]</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> plt.title(<span class="stringliteral">r&quot;2 particles with and without interactions.&quot;</span>)</div> <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> colors = [</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> plt.legend()</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">&quot;mediumaquamarine&quot;</span>,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> plt.savefig(<span class="stringliteral">&quot;../latex/images/3d_plot.pdf&quot;</span>)</div> <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;darkred&quot;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> main()</div> <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> ax = plt.figure().add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> lines = f.readlines()</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> ax.plot(r[:,0], r[:,1], r[:,2], label=label, color=color)</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> ax.set_xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> ax.set_ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> ax.set_zlabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> ax.view_init(10,-35)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> plt.legend()</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> plt.savefig(<span class="stringliteral">&quot;../latex/images/3d_plot.pdf&quot;</span>)</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>plot_3d.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__3d_8py.html">plot_3d.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_particles_left.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__particles__left_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_particles_left.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot how many particles are left after 500 microseconds using different angular frequencies.
<a href="#details">More...</a></p>
<p><a href="plot__particles__left_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abec6efa92c9e476e2e3a403dac12ea1c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__particles__left_8py.html#abec6efa92c9e476e2e3a403dac12ea1c">plot_particles_left.main</a> ()</td></tr>
<tr class="separator:abec6efa92c9e476e2e3a403dac12ea1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:aad2ff4255461cc187b87065843d0b391"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__particles__left_8py.html#aad2ff4255461cc187b87065843d0b391">plot_particles_left.params</a></td></tr>
<tr class="separator:aad2ff4255461cc187b87065843d0b391"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot how many particles are left after 500 microseconds using different angular frequencies. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000015">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__particles__left_8py_source.html">plot_particles_left.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="abec6efa92c9e476e2e3a403dac12ea1c" name="abec6efa92c9e476e2e3a403dac12ea1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abec6efa92c9e476e2e3a403dac12ea1c">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_particles_left.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__particles__left_8py_source.html#l00029">29</a> of file <a class="el" href="plot__particles__left_8py_source.html">plot_particles_left.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="aad2ff4255461cc187b87065843d0b391" name="aad2ff4255461cc187b87065843d0b391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad2ff4255461cc187b87065843d0b391">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_particles_left.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__particles__left_8py_source.html#l00017">17</a> of file <a class="el" href="plot__particles__left_8py_source.html">plot_particles_left.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,80 +101,83 @@ $(document).ready(function(){initNavTree('plot__particles__left_8py_source.html'
<div class="headertitle"><div class="title">plot_particles_left.py</div></div> <div class="headertitle"><div class="title">plot_particles_left.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="plot__particles__left_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span>sns.set_theme()</div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span>params = {</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>sns.set_theme()</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>params = {</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>}</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span>plt.rcParams.update(params)</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">def </span>main():</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> colors = [</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;deepskyblue&quot;</span>,</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> colors = [</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="stringliteral">&quot;mediumseagreen&quot;</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;tomato&quot;</span>,</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;darkred&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;mediumaquamarine&quot;</span>,</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;darkgoldenrod&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;mediumseagreen&quot;</span></div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> ]</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> ]</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> files = [</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> files = [</div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="stringliteral">&quot;output/time_dependent_potential/wide_sweep.txt&quot;</span>,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">&quot;output/time_dependent_potential/wide_sweep.txt&quot;</span>,</div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep.txt&quot;</span>,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep.txt&quot;</span>,</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_fine.txt&quot;</span>,</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_interactions.txt&quot;</span>,</div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_interactions.txt&quot;</span>,</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> ]</div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_interactions_fine.txt&quot;</span>,</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> outputs = [</div> <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> ]</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;../latex/images/wide_sweep.pdf&quot;</span>,</div> <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> outputs = [</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;../latex/images/narrow_sweep.pdf&quot;</span>,</div> <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">&quot;../latex/images/particles_left_wide_sweep.pdf&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="stringliteral">&quot;../latex/images/narrow_sweep_interactions.pdf&quot;</span>,</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep.pdf&quot;</span>,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> ]</div> <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep_fine.pdf&quot;</span>,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">for</span> file, output <span class="keywordflow">in</span> zip(files, outputs):</div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep_interactions.pdf&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep_interactions_fine.pdf&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> lines = f.readlines()</div> <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> x = []</div> <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">for</span> file, output <span class="keywordflow">in</span> zip(files, outputs):</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> y1 = []</div> <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> y2 = []</div> <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> lines = f.readlines()</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> y3 = []</div> <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> x = []</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div> <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> y1 = []</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> l = line.strip().split(<span class="stringliteral">&quot;,&quot;</span>)</div> <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> y2 = []</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> x.append(float(l[0]))</div> <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> y3 = []</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> y1.append(float(l[1]))</div> <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> y2.append(float(l[2]))</div> <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> l = line.strip().split(<span class="stringliteral">&quot;,&quot;</span>)</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> y3.append(float(l[3]))</div> <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> x.append(float(l[0]))</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div> <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> y1.append(float(l[1]))</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> fig, ax = plt.subplots()</div> <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> y2.append(float(l[2]))</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> ax.plot(x, y1, label=<span class="stringliteral">r&quot;$f_{1} = 0.1$&quot;</span>, color=colors[0])</div> <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> y3.append(float(l[3]))</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> ax.plot(x, y2, label=<span class="stringliteral">r&quot;$f_{2} = 0.4$&quot;</span>, color=colors[2])</div> <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ax.plot(x, y3, label=<span class="stringliteral">r&quot;$f_{3} = 0.7$&quot;</span>, color=colors[4])</div> <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div> <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> ax.plot(x, y1, label=<span class="stringliteral">r&quot;$f_{1} = 0.1$&quot;</span>, color=colors[0])</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> ax.set_xlabel(<span class="stringliteral">r&quot;Frequency $\omega_V$ (MHz)&quot;</span>)</div> <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ax.plot(x, y2, label=<span class="stringliteral">r&quot;$f_{2} = 0.4$&quot;</span>, color=colors[1])</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment"># ax.set_xlim((0, 2.8))</span></div> <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> ax.plot(x, y3, label=<span class="stringliteral">r&quot;$f_{3} = 0.7$&quot;</span>, color=colors[2])</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> ax.set_ylabel(<span class="stringliteral">r&quot;Fraction of particles left&quot;</span>)</div> <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment"># ax.set_ylim((-0.1, 1.1))</span></div> <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> ax.set_xlabel(<span class="stringliteral">r&quot;Angular frequency $\omega_V$ (MHz)&quot;</span>)</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="comment"># plt.title(r&quot;The fraction of particles left in the Penning trap &quot;</span></div> <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment"># ax.set_xlim((0, 2.8))</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment"># &quot;after 500 microseconds for different amplitudes and frequencies&quot;)</span></div> <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ax.set_ylabel(<span class="stringliteral">r&quot;Fraction of particles left&quot;</span>)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div> <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment"># ax.set_ylim((-0.1, 1.1))</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div> <div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment"># plt.title(r&quot;The fraction of particles left in the Penning trap &quot;</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div> <div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment"># &quot;after 500 microseconds for different amplitudes and frequencies&quot;)</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment"># plt.show()</span></div> <div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> fig.savefig(output, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div> <div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div> <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> main()</div> <div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> fig.savefig(output, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>plot_particles_left.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_phase_space.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__phase__space_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_phase_space.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot the phase space for 2 particles in the x and z direction, with and without particle interactions.
<a href="#details">More...</a></p>
<p><a href="plot__phase__space_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa92530b83695dcb6ca6adff74e5088dd"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__phase__space_8py.html#aa92530b83695dcb6ca6adff74e5088dd">plot_phase_space.main</a> ()</td></tr>
<tr class="separator:aa92530b83695dcb6ca6adff74e5088dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ac5425fde52c92b301d6815f3492b713e"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__phase__space_8py.html#ac5425fde52c92b301d6815f3492b713e">plot_phase_space.params</a></td></tr>
<tr class="separator:ac5425fde52c92b301d6815f3492b713e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot the phase space for 2 particles in the x and z direction, with and without particle interactions. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000016">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__phase__space_8py_source.html">plot_phase_space.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="aa92530b83695dcb6ca6adff74e5088dd" name="aa92530b83695dcb6ca6adff74e5088dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa92530b83695dcb6ca6adff74e5088dd">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_phase_space.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__phase__space_8py_source.html#l00031">31</a> of file <a class="el" href="plot__phase__space_8py_source.html">plot_phase_space.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ac5425fde52c92b301d6815f3492b713e" name="ac5425fde52c92b301d6815f3492b713e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5425fde52c92b301d6815f3492b713e">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_phase_space.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>,</div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__phase__space_8py_source.html#l00018">18</a> of file <a class="el" href="plot__phase__space_8py_source.html">plot_phase_space.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,65 +101,88 @@ $(document).ready(function(){initNavTree('plot__phase__space_8py_source.html',''
<div class="headertitle"><div class="title">plot_phase_space.py</div></div> <div class="headertitle"><div class="title">plot_phase_space.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="plot__phase__space_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> directories = {</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/&quot;</span>,</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/&quot;</span>,</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>sns.set_theme()</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> }</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>params = {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> titles = {</div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="stringliteral">&quot;particles without interaction&quot;</span>,</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>,</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">&quot;particles with interaction&quot;</span></div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> }</div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> files = [</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">&quot;particle_0_r.txt&quot;</span>,</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">&quot;particle_0_v.txt&quot;</span>,</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="stringliteral">&quot;particle_1_r.txt&quot;</span>,</div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="stringliteral">&quot;particle_1_v.txt&quot;</span>,</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> ]</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> labels = [</div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">r&quot;particle 1 r&quot;</span>,</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">r&quot;particle 1 v&quot;</span>,</div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">r&quot;particle 2 r&quot;</span>,</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> directories = [</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">r&quot;particle 2 v&quot;</span>,</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> ]</div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> colors = [</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> ]</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> files = [</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">&quot;deepskyblue&quot;</span>,</div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;particle_0&quot;</span>,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;particle_1&quot;</span>,</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">&quot;tomato&quot;</span>,</div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> ]</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> ]</div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> labels = [<span class="stringliteral">r&quot;$p_1$&quot;</span>, <span class="stringliteral">r&quot;$p_2$&quot;</span>]</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> fig1, axs1 = plt.subplots(2,1)</div> <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> output = [</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> fig2, axs2 = plt.subplots(2,1)</div> <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="stringliteral">&quot;../latex/images/phase_space_no_interaction&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">for</span> i, (dir, title) <span class="keywordflow">in</span> enumerate(zip(directories, titles)):</div> <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">&quot;../latex/images/phase_space_interaction&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> ]</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> colors = [</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> lines = f.readlines()</div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> t = np.linspace(0, 50, len(lines))</div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;darkred&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div> <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> axs1[i].plot(t, r[:,0], label=label, color=color)</div> <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> axs2[i].plot(t, r[:,2], label=label, color=color)</div> <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">for</span> i, dir <span class="keywordflow">in</span> enumerate(directories):</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div> <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> fig1, axs1 = plt.subplots(sharex=<span class="keyword">True</span>)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> axs1[i].set(xlabel=<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>, ylabel = <span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> fig2, axs2 = plt.subplots(sharex=<span class="keyword">True</span>)</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div> <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">for</span> j, (file, label, color) <span class="keywordflow">in</span> enumerate(zip(files, labels, colors)):</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> axs1[i].legend()</div> <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> r = []</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> axs1[i].set_title(title)</div> <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> v = []</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div> <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">with</span> open(dir + file + <span class="stringliteral">&quot;_r.txt&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="comment"># plt.show()</span></div> <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> lines = f.readlines()</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> fig1.savefig(<span class="stringliteral">&quot;../latex/images/phase_space_2_particles_x.pdf&quot;</span>)</div> <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> r = np.array(</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> fig2.savefig(<span class="stringliteral">&quot;../latex/images/phase_space_2_particles_z.pdf&quot;</span>)</div> <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> [list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines]</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div> <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> )</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div> <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">with</span> open(dir + file + <span class="stringliteral">&quot;_v.txt&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> main()</div> <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> lines = f.readlines()</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> v = np.array(</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> [list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines]</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> )</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> axs1.plot(r[:, 0], v[:, 0], label=label, color=color)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> axs1.plot(r[0,0], v[0,0], <span class="stringliteral">&quot;ko&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> axs2.plot(r[:, 2], v[:, 2], label=label, color=color)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> axs2.plot(r[0,2], v[0,2], <span class="stringliteral">&quot;ko&quot;</span>)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> axs1.axis(<span class="stringliteral">&quot;equal&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> axs2.axis(<span class="stringliteral">&quot;equal&quot;</span>)</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> axs1.set(xlabel=<span class="stringliteral">r&quot;$x (\mu m)$&quot;</span>, ylabel=<span class="stringliteral">r&quot;$v_x (\mu m / \mu s)$&quot;</span>)</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> axs2.set(xlabel=<span class="stringliteral">r&quot;$z (\mu m)$&quot;</span>, ylabel=<span class="stringliteral">r&quot;$v_z (\mu m / \mu s)$&quot;</span>)</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> axs1.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> axs2.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> fig1.savefig(f<span class="stringliteral">&quot;{output[i]}_x.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> fig2.savefig(f<span class="stringliteral">&quot;{output[i]}_z.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>plot_phase_space.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_relative_error.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__relative__error_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_relative_error.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot the relative error for forward Euler and RK4 method.
<a href="#details">More...</a></p>
<p><a href="plot__relative__error_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a615fd09c73966d40320e768bed20683c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__relative__error_8py.html#a615fd09c73966d40320e768bed20683c">plot_relative_error.main</a> ()</td></tr>
<tr class="separator:a615fd09c73966d40320e768bed20683c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a5cc494411e5ca543673367a938f5f160"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__relative__error_8py.html#a5cc494411e5ca543673367a938f5f160">plot_relative_error.params</a></td></tr>
<tr class="separator:a5cc494411e5ca543673367a938f5f160"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot the relative error for forward Euler and RK4 method. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000017">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__relative__error_8py_source.html">plot_relative_error.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a615fd09c73966d40320e768bed20683c" name="a615fd09c73966d40320e768bed20683c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a615fd09c73966d40320e768bed20683c">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_relative_error.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__relative__error_8py_source.html#l00029">29</a> of file <a class="el" href="plot__relative__error_8py_source.html">plot_relative_error.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a5cc494411e5ca543673367a938f5f160" name="a5cc494411e5ca543673367a938f5f160"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cc494411e5ca543673367a938f5f160">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_relative_error.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__relative__error_8py_source.html#l00017">17</a> of file <a class="el" href="plot__relative__error_8py_source.html">plot_relative_error.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,63 +101,86 @@ $(document).ready(function(){initNavTree('plot__relative__error_8py_source.html'
<div class="headertitle"><div class="title">plot_relative_error.py</div></div> <div class="headertitle"><div class="title">plot_relative_error.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="plot__relative__error_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div> <div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> directories = [</div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/relative_error/RK4/&quot;</span>,</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/relative_error/euler/&quot;</span>,</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>sns.set_theme()</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> ]</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>params = {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> files = [</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="stringliteral">&quot;4000_steps.txt&quot;</span>,</div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">&quot;8000_steps.txt&quot;</span>,</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;16000_steps.txt&quot;</span>,</div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;32000_steps.txt&quot;</span>,</div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> ]</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> labels = [</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="stringliteral">r&quot;4000 steps&quot;</span>,</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="stringliteral">r&quot;8000 steps&quot;</span>,</div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">r&quot;16000 steps&quot;</span>,</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">r&quot;32000 steps&quot;</span>,</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> ]</div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> titles = [</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> directories = [</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;Relative error for the RK4 method&quot;</span>,</div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="stringliteral">&quot;output/relative_error/RK4/&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;Relative error for the forward Euler method&quot;</span></div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;output/relative_error/euler/&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> ]</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ]</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> methods = [</div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> files = [</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;rk4&quot;</span>,</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="stringliteral">&quot;4000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">&quot;euler&quot;</span></div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="stringliteral">&quot;8000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> ]</div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;16000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> fig1, axs1 = plt.subplots(2,1)</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;32000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">for</span> i, (dir, title) <span class="keywordflow">in</span> enumerate(list(zip(directories, titles))):</div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> ]</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> max_err = []</div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> labels = [</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">for</span> label, file <span class="keywordflow">in</span> zip(labels, files):</div> <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">r&quot;$n_1$&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="stringliteral">r&quot;$n_2$&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> lines = f.readlines()</div> <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">r&quot;$n_3$&quot;</span>,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> t = np.linspace(0, 50, len(lines))</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">r&quot;$n_4$&quot;</span>,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> r = np.array([float(line.strip()) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div> <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> ]</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> max_err.append(max(r))</div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> titles = [</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> axs1[i].plot(t, r, label=label)</div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;(a)&quot;</span>,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div> <div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="stringliteral">&quot;(b)&quot;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> axs1[i].set(xlabel=<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>, ylabel = <span class="stringliteral">r&quot;relative_error $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> ]</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> axs1[i].legend()</div> <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> methods = [</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> axs1[i].set_title(title)</div> <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div> <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="stringliteral">&quot;euler&quot;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> conv_rate = 1/3 * sum([np.log2(max_err[i+1]/max_err[i])/np.log2(.5) <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(3)])</div> <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ]</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> print(f<span class="stringliteral">&quot;{methods[i]}: {conv_rate}&quot;</span>)</div> <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> colors = [</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div> <div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> fig1.savefig(<span class="stringliteral">&quot;../latex/images/phase_space_2_particles_x.pdf&quot;</span>)</div> <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="stringliteral">&quot;darkred&quot;</span>,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div> <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="stringliteral">&quot;darkgoldenrod&quot;</span>,</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div> <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="stringliteral">&quot;steelblue&quot;</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> ]</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> main()</div> <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> fig1, axs1 = plt.subplots(2,1)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">for</span> i, (dir, title) <span class="keywordflow">in</span> enumerate(list(zip(directories, titles))):</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> max_err = []</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">for</span> label, file, color <span class="keywordflow">in</span> zip(labels, files, colors):</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> lines = f.readlines()</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> r = np.array([float(line.strip()) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> max_err.append(max(r))</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> axs1[i].plot(t, r, label=label, color=color)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> axs1[i].set(xlabel=<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>, ylabel = <span class="stringliteral">r&quot;relative error $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> axs1[i].legend()</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> axs1[i].set_title(title)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> conv_rate = 1/3 * sum([np.log2(max_err[i+1]/max_err[i])/np.log2(.5) <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(3)])</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> print(f<span class="stringliteral">&quot;{methods[i]}: {conv_rate}&quot;</span>)</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> plt.tight_layout()</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> fig1.savefig(<span class="stringliteral">&quot;../latex/images/relative_error.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>plot_relative_error.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,211 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_single_particle.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__single__particle_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_single_particle.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot the approximation and analytical solution for one particle in the z axis.
<a href="#details">More...</a></p>
<p><a href="plot__single__particle_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a502c69553dc8b55651b3f0d6d06686ee"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html#a502c69553dc8b55651b3f0d6d06686ee">plot_single_particle.z</a> (t)</td></tr>
<tr class="separator:a502c69553dc8b55651b3f0d6d06686ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0261bc484d15ef01c27420592fadc00"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html#ab0261bc484d15ef01c27420592fadc00">plot_single_particle.main</a> ()</td></tr>
<tr class="separator:ab0261bc484d15ef01c27420592fadc00"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a631948da2ca2a1f0df71e9ce6b328d71"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html#a631948da2ca2a1f0df71e9ce6b328d71">plot_single_particle.params</a></td></tr>
<tr class="separator:a631948da2ca2a1f0df71e9ce6b328d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot the approximation and analytical solution for one particle in the z axis. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000018">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ab0261bc484d15ef01c27420592fadc00" name="ab0261bc484d15ef01c27420592fadc00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0261bc484d15ef01c27420592fadc00">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_single_particle.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__single__particle_8py_source.html#l00037">37</a> of file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div>
</div>
<a id="a502c69553dc8b55651b3f0d6d06686ee" name="a502c69553dc8b55651b3f0d6d06686ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a502c69553dc8b55651b3f0d6d06686ee">&#9670;&#160;</a></span>z()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_single_particle.z </td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>t</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__single__particle_8py_source.html#l00030">30</a> of file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a631948da2ca2a1f0df71e9ce6b328d71" name="a631948da2ca2a1f0df71e9ce6b328d71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a631948da2ca2a1f0df71e9ce6b328d71">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_single_particle.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__single__particle_8py_source.html#l00018">18</a> of file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@ -101,42 +101,61 @@ $(document).ready(function(){initNavTree('plot__single__particle_8py_source.html
<div class="headertitle"><div class="title">plot_single_particle.py</div></div> <div class="headertitle"><div class="title">plot_single_particle.py</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div> <a href="plot__single__particle_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>z(t):</div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> V_0 = 25.*9.64852558 * 10**4</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> m = 40.</div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> d = 500.</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>sns.set_theme()</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> w_z = np.sqrt((2.*V_0)/(m*d*d))</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>params = {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keywordflow">return</span> 20.*np.cos(w_z*t)</div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">def </span>main():</div> <div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> filename = <span class="stringliteral">&quot;output/simulate_single_particle/particle_0_r.txt&quot;</span></div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> r = t = []</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">with</span> open(filename) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> lines = f.readlines()</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> t = np.linspace(0, 50, len(lines))</div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div> <div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> plt.plot(t, r[:, 2], label=<span class="stringliteral">&quot;approximation&quot;</span>)</div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> plt.plot(t, z(t), label=<span class="stringliteral">&quot;analytical&quot;</span>)</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>z(t):</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> plt.xlabel(<span class="stringliteral">r&quot;time $(\mu s)$&quot;</span>)</div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> V_0 = 25.*9.64852558 * 10**4</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> plt.ylabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> m = 40.</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> plt.title(<span class="stringliteral">r&quot;Movement of a single particle in the x direction&quot;</span>)</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> d = 500.</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> plt.legend()</div> <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> w_z = np.sqrt((2.*V_0)/(m*d*d))</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="comment"># plt.savefig(&quot;../latex/images/single_particle.pdf&quot;)</span></div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">return</span> 20.*np.cos(w_z*t)</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> plt.show()</div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div> <div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> filename = <span class="stringliteral">&quot;output/simulate_single_particle/particle_0_r.txt&quot;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div> <div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> r = t = []</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> main()</div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">with</span> open(filename) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> lines = f.readlines()</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> ax.plot(t, r[:, 2], label=<span class="stringliteral">&quot;approximation&quot;</span>, color=<span class="stringliteral">&quot;mediumseagreen&quot;</span>)</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> ax.plot(t, z(t), label=<span class="stringliteral">&quot;analytical&quot;</span>, color=<span class="stringliteral">&quot;black&quot;</span>, linestyle=<span class="stringliteral">&quot;dotted&quot;</span>)</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ax.set_xlabel(<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>)</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> ax.set_xlim((-5, 55))</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> ax.set_ylabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> ax.set_ylim((-25, 25))</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment"># plt.title(r&quot;Movement of a single particle in the x direction&quot;)</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> fig.savefig(<span class="stringliteral">&quot;../latex/images/single_particle.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><b>plot_single_particle.py</b></li> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul> </ul>
</div> </div>

View File

@ -2,5 +2,6 @@ var searchData=
[ [
['add_5fparticle_0',['add_particle',['../classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8',1,'PenningTrap']]], ['add_5fparticle_0',['add_particle',['../classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8',1,'PenningTrap']]],
['analytical_5fsolution_5fparticle_5f1_1',['analytical_solution_particle_1',['../main_8cpp.html#a8d92fb2ad085065fbd14718647551657',1,'main.cpp']]], ['analytical_5fsolution_5fparticle_5f1_1',['analytical_solution_particle_1',['../main_8cpp.html#a8d92fb2ad085065fbd14718647551657',1,'main.cpp']]],
['assert_2',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]] ['animate_5f100_5fparticles_2epy_2',['animate_100_particles.py',['../animate__100__particles_8py.html',1,'']]],
['assert_3',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]]
]; ];

View File

@ -2,17 +2,23 @@ var searchData=
[ [
['p1_0',['p1',['../main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30',1,'main.cpp']]], ['p1_0',['p1',['../main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30',1,'main.cpp']]],
['p2_1',['p2',['../main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7',1,'main.cpp']]], ['p2_1',['p2',['../main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7',1,'main.cpp']]],
['particle_2',['Particle',['../classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4',1,'Particle::Particle()'],['../classParticle.html',1,'Particle']]], ['particle_2',['Particle',['../classParticle.html',1,'Particle'],['../classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4',1,'Particle::Particle()']]],
['particle_2ecpp_3',['Particle.cpp',['../Particle_8cpp.html',1,'']]], ['particle_2ecpp_3',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['particle_2ehpp_4',['Particle.hpp',['../Particle_8hpp.html',1,'']]], ['particle_2ehpp_4',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['particles_5',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]], ['particles_5',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]],
['penning_20trap_20simulation_6',['Penning trap simulation',['../index.html',1,'']]], ['penning_20trap_20simulation_6',['Penning trap simulation',['../index.html',1,'']]],
['penningtrap_7',['PenningTrap',['../classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f',1,'PenningTrap::PenningTrap(uint i, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f',1,'PenningTrap::PenningTrap(std::vector&lt; Particle &gt; particles, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8',1,'PenningTrap::PenningTrap(double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle::PenningTrap()'],['../classPenningTrap.html',1,'PenningTrap']]], ['penningtrap_7',['PenningTrap',['../classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f',1,'PenningTrap::PenningTrap()'],['../classPenningTrap.html',1,'PenningTrap'],['../classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f',1,'PenningTrap::PenningTrap(uint i, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8',1,'PenningTrap::PenningTrap(double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle::PenningTrap()']]],
['penningtrap_2ecpp_8',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]], ['penningtrap_2ecpp_8',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_9',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]], ['penningtrap_2ehpp_9',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]],
['penningtraptest_10',['PenningTrapTest',['../classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae',1,'PenningTrap::PenningTrapTest()'],['../classPenningTrapTest.html',1,'PenningTrapTest']]], ['penningtraptest_10',['PenningTrapTest',['../classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae',1,'PenningTrap::PenningTrapTest()'],['../classPenningTrapTest.html',1,'PenningTrapTest']]],
['perturbation_11',['perturbation',['../classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5',1,'PenningTrap']]], ['perturbation_11',['perturbation',['../classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5',1,'PenningTrap']]],
['potential_5fresonance_5fnarrow_5fsweep_12',['potential_resonance_narrow_sweep',['../frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;main.cpp']]], ['plot_5f2_5fparticles_2epy_12',['plot_2_particles.py',['../plot__2__particles_8py.html',1,'']]],
['potential_5fresonance_5fnarrow_5fsweep_5finteraction_13',['potential_resonance_narrow_sweep_interaction',['../frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;main.cpp']]], ['plot_5f3d_2epy_13',['plot_3d.py',['../plot__3d_8py.html',1,'']]],
['potential_5fresonance_5fwide_5fsweep_14',['potential_resonance_wide_sweep',['../main_8cpp.html#a6b38b477c18e2f4268779751a88edab1',1,'main.cpp']]] ['plot_5fparticles_5fleft_2epy_14',['plot_particles_left.py',['../plot__particles__left_8py.html',1,'']]],
['plot_5fphase_5fspace_2epy_15',['plot_phase_space.py',['../plot__phase__space_8py.html',1,'']]],
['plot_5frelative_5ferror_2epy_16',['plot_relative_error.py',['../plot__relative__error_8py.html',1,'']]],
['plot_5fsingle_5fparticle_2epy_17',['plot_single_particle.py',['../plot__single__particle_8py.html',1,'']]],
['potential_5fresonance_5fnarrow_5fsweep_18',['potential_resonance_narrow_sweep',['../frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;main.cpp']]],
['potential_5fresonance_5fnarrow_5fsweep_5finteraction_19',['potential_resonance_narrow_sweep_interaction',['../frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;main.cpp']]],
['potential_5fresonance_5fwide_5fsweep_20',['potential_resonance_wide_sweep',['../main_8cpp.html#a6b38b477c18e2f4268779751a88edab1',1,'main.cpp']]]
]; ];

View File

@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]] ['animate_5f100_5fparticles_2epy_0',['animate_100_particles.py',['../animate__100__particles_8py.html',1,'']]]
]; ];

View File

@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['frequency_5fnarrow_5fsweeps_5flong_2ecpp_0',['frequency_narrow_sweeps_long.cpp',['../frequency__narrow__sweeps__long_8cpp.html',1,'']]] ['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
]; ];

View File

@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]] ['frequency_5fnarrow_5fsweeps_5flong_2ecpp_0',['frequency_narrow_sweeps_long.cpp',['../frequency__narrow__sweeps__long_8cpp.html',1,'']]]
]; ];

View File

@ -1,7 +1,4 @@
var searchData= var searchData=
[ [
['particle_2ecpp_0',['Particle.cpp',['../Particle_8cpp.html',1,'']]], ['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]]
['particle_2ehpp_1',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['penningtrap_2ecpp_2',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_3',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]]
]; ];

View File

@ -1,5 +1,13 @@
var searchData= var searchData=
[ [
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]], ['particle_2ecpp_0',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['typedefs_2ehpp_1',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]] ['particle_2ehpp_1',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['penningtrap_2ecpp_2',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_3',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]],
['plot_5f2_5fparticles_2epy_4',['plot_2_particles.py',['../plot__2__particles_8py.html',1,'']]],
['plot_5f3d_2epy_5',['plot_3d.py',['../plot__3d_8py.html',1,'']]],
['plot_5fparticles_5fleft_2epy_6',['plot_particles_left.py',['../plot__particles__left_8py.html',1,'']]],
['plot_5fphase_5fspace_2epy_7',['plot_phase_space.py',['../plot__phase__space_8py.html',1,'']]],
['plot_5frelative_5ferror_2epy_8',['plot_relative_error.py',['../plot__relative__error_8py.html',1,'']]],
['plot_5fsingle_5fparticle_2epy_9',['plot_single_particle.py',['../plot__single__particle_8py.html',1,'']]]
]; ];

View File

@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]], ['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]] ['typedefs_2ehpp_1',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
]; ];

5
docs/search/files_6.js Normal file
View File

@ -0,0 +1,5 @@
var searchData=
[
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
];

View File

@ -0,0 +1,4 @@
var searchData=
[
['plot_5f3d_0',['plot_3d',['../namespaceplot__3d.html',1,'']]]
];

View File

@ -2,7 +2,7 @@ var indexSectionsWithContent =
{ {
0: "_abcdefkmpqrstuvw", 0: "_abcdefkmpqrstuvw",
1: "ps", 1: "ps",
2: "cfmptu", 2: "acfmptu",
3: "acefmprstvw", 3: "acefmprstvw",
4: "bdkmpqrtv", 4: "bdkmpqrtv",
5: "sv", 5: "sv",