Skip to content

Commit 640d305

Browse files
v1.0 Fixed bug with power display in curve waveguides
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
1 parent 3cf4722 commit 640d305

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3183
-340
lines changed

beampy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# module
3030
from beampy import examples
3131

32-
__version__ = "0.0.1.4"
32+
__version__ = "1.0"
3333

3434

3535
def help():

beampy/user_interface.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,18 +653,23 @@ def addmpl(self, tab='guide', pow_index=0):
653653
ax1.set_xlabel('z (mm)')
654654
ax1.set_ylabel('Radiant flux (u.a)')
655655

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

662659
if self.topology == 'array':
660+
x_beg = np.zeros((self.nbr_p, self.nbr_z), dtype=int)
661+
x_end = np.zeros((self.nbr_p, self.nbr_z), dtype=int)
662+
P = np.zeros((self.nbr_p, self.nbr_z_disp+1))
663+
663664
for n in range(self.nbr_p):
664665
[x_beg[n, :],
665666
x_end[n, :]] = self.bpm.guide_position(n, self.p)
666667

667668
elif self.topology == 'curved':
669+
x_beg = np.zeros((3, self.nbr_z), dtype=int)
670+
x_end = np.zeros((3, self.nbr_z), dtype=int)
671+
P = np.zeros((3, self.nbr_z_disp+1))
672+
668673
# Choose precision at the end for right guide if can
669674
# and choose safety when guides overlapse
670675
if self.peaks[2, -1] <= self.x[-1]:

docs/html/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 956ffc6ad44730b3bf032dd75d98bcab
3+
config: f59b17170e3fd0facf68b8b965daf0aa
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
15 Bytes
Binary file not shown.

docs/html/.doctrees/beampy.doctree

8.51 KB
Binary file not shown.

docs/html/.doctrees/codes.doctree

373 Bytes
Binary file not shown.
15 Bytes
Binary file not shown.
2.53 KB
Binary file not shown.
-714 Bytes
Binary file not shown.

docs/html/.doctrees/index.doctree

-26 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)