Skip to content

Commit

Permalink
v1.0 Fixed bug with power display in curve waveguides
Browse files Browse the repository at this point in the history
An error occurs when choosing nbr_p < 3 and displaying the power in curved waveguides. The variable nbr_p was not suppose to interfere with curve waveguide.
Also changed the version indicator into a more realistic one
  • Loading branch information
Python-simulation committed Nov 23, 2020
1 parent 3cf4722 commit 640d305
Show file tree
Hide file tree
Showing 70 changed files with 3,183 additions and 340 deletions.
2 changes: 1 addition & 1 deletion beampy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# module
from beampy import examples

__version__ = "0.0.1.4"
__version__ = "1.0"


def help():
Expand Down
11 changes: 8 additions & 3 deletions beampy/user_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,18 +653,23 @@ def addmpl(self, tab='guide', pow_index=0):
ax1.set_xlabel('z (mm)')
ax1.set_ylabel('Radiant flux (u.a)')

x_beg = np.zeros((self.nbr_p, self.nbr_z), dtype=int)
x_end = np.zeros((self.nbr_p, self.nbr_z), dtype=int)
P = np.zeros((self.nbr_p, self.nbr_z_disp+1))
style = list(lines.lineStyles.keys())[0:-3]
style = style + list(lines.lineMarkers.keys())[0:-16]

if self.topology == 'array':
x_beg = np.zeros((self.nbr_p, self.nbr_z), dtype=int)
x_end = np.zeros((self.nbr_p, self.nbr_z), dtype=int)
P = np.zeros((self.nbr_p, self.nbr_z_disp+1))

for n in range(self.nbr_p):
[x_beg[n, :],
x_end[n, :]] = self.bpm.guide_position(n, self.p)

elif self.topology == 'curved':
x_beg = np.zeros((3, self.nbr_z), dtype=int)
x_end = np.zeros((3, self.nbr_z), dtype=int)
P = np.zeros((3, self.nbr_z_disp+1))

# Choose precision at the end for right guide if can
# and choose safety when guides overlapse
if self.peaks[2, -1] <= self.x[-1]:
Expand Down
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 956ffc6ad44730b3bf032dd75d98bcab
config: f59b17170e3fd0facf68b8b965daf0aa
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/html/.doctrees/LICENSE.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/beampy.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/codes.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/contact.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/html/.doctrees/examples.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/interface.doctree
Binary file not shown.
Binary file modified docs/html/.doctrees/results.doctree
Binary file not shown.
44 changes: 27 additions & 17 deletions docs/html/LICENSE.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>MIT License &mdash; beampy 0.0.1.4 documentation</title>
<title>MIT License &mdash; beampy 1.0 documentation</title>



<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />







<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->


<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>




<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Contact" href="contact.html" />
Expand All @@ -51,7 +52,7 @@



<a href="index.html" class="icon icon-home"> beampy
<a href="index.html" class="icon icon-home" alt="Documentation Home"> beampy



Expand All @@ -74,6 +75,7 @@

</div>


<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">


Expand All @@ -94,6 +96,7 @@


</div>

</div>
</nav>

Expand Down Expand Up @@ -132,7 +135,7 @@

<ul class="wy-breadcrumbs">

<li><a href="index.html">Docs</a> &raquo;</li>
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>

<li>MIT License</li>

Expand Down Expand Up @@ -193,11 +196,19 @@ <h1>MIT License<a class="headerlink" href="#mit-license" title="Permalink to thi

<div role="contentinfo">
<p>

&copy; Copyright 2020 Jonathan Peltier and Marcel Soubkovsky

</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.



Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a

<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>

provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

Expand All @@ -209,7 +220,6 @@ <h1>MIT License<a class="headerlink" href="#mit-license" title="Permalink to thi
</div>



<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
Expand Down
6 changes: 5 additions & 1 deletion docs/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -672,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}

div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}

div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
Expand Down
2 changes: 1 addition & 1 deletion docs/html/_static/css/badge_only.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/html/_static/css/fonts/Roboto-Slab-Bold.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 640d305

Please sign in to comment.