Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/temgymbasic/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def make_test_sample(size=256):

# FIXME resolve code duplication between circular_beam() and point_beam()
def circular_beam(r, outer_radius):
'''Generates a circular paralell initial beam
'''Generates a circular parallel initial beam

Parameters
----------
Expand Down
24 changes: 12 additions & 12 deletions src/temgymbasic/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ def __init__(self, num_rays, beam_type, gun_beam_semi_angle, beam_tilt_x, beam_t
num_rays : int
Number of rays in the model
beam_type : str
Type of initial beam: Axial, paralell of point.
Type of initial beam: Axial, parallel of point.
gun_beam_semi_angle : float
Semi angle of the beam
beam_tilt_x : float
Expand Down Expand Up @@ -696,7 +696,7 @@ def __init__(self, num_rays, beam_type, gun_beam_semi_angle, beam_tilt_x, beam_t

self.beamanglelabel = QLabel(str(round(gun_beam_semi_angle, 2)))
self.beamanglelabel.setMinimumWidth(80)
self.modelbeamanglelabel = QLabel('Axial/Paralell Beam Semi Angle')
self.modelbeamanglelabel = QLabel('Axial/parallel Beam Semi Angle')

hbox = QHBoxLayout()
hbox.addWidget(self.beamangleslider)
Expand All @@ -717,7 +717,7 @@ def __init__(self, num_rays, beam_type, gun_beam_semi_angle, beam_tilt_x, beam_t

self.beamwidthlabel = QLabel('0')
self.beamwidthlabel.setMinimumWidth(80)
self.modelbeamwidthlabel = QLabel('Paralell Beam Width')
self.modelbeamwidthlabel = QLabel('parallel Beam Width')

hbox = QHBoxLayout()
hbox.addWidget(self.beamwidthslider)
Expand All @@ -733,23 +733,23 @@ def __init__(self, num_rays, beam_type, gun_beam_semi_angle, beam_tilt_x, beam_t

self.checkBoxPoint = QCheckBox("Point Beam")

self.checkBoxParalell = QCheckBox("Paralell Beam")
self.checkBoxParallel = QCheckBox("parallel Beam")

self.checkBoxParalell.stateChanged.connect(
partial(self.uncheck, self.checkBoxParalell))
self.checkBoxParallel.stateChanged.connect(
partial(self.uncheck, self.checkBoxParallel))
self.checkBoxPoint.stateChanged.connect(
partial(self.uncheck, self.checkBoxPoint))
self.checkBoxAxial.stateChanged.connect(
partial(self.uncheck, self.checkBoxAxial))

hbox.addWidget(self.checkBoxAxial)
hbox.addWidget(self.checkBoxPoint)
hbox.addWidget(self.checkBoxParalell)
hbox.addWidget(self.checkBoxParallel)

if beam_type == 'axial':
self.checkBoxAxial.setChecked(True)
elif beam_type == 'paralell':
self.checkBoxParalell.setChecked(True)
elif beam_type == 'parallel':
self.checkBoxParallel.setChecked(True)
elif beam_type == 'point':
self.checkBoxPoint.setChecked(True)

Expand Down Expand Up @@ -818,11 +818,11 @@ def uncheck(self, btn):
if btn == self.checkBoxAxial:

# making other check box to uncheck
self.checkBoxParalell.setChecked(False)
self.checkBoxParallel.setChecked(False)
self.checkBoxPoint.setChecked(False)

# if second check box is selected
elif btn == self.checkBoxParalell:
elif btn == self.checkBoxParallel:

# making other check box to uncheck
self.checkBoxAxial.setChecked(False)
Expand All @@ -833,7 +833,7 @@ def uncheck(self, btn):

# making other check box to uncheck
self.checkBoxAxial.setChecked(False)
self.checkBoxParalell.setChecked(False)
self.checkBoxParallel.setChecked(False)


class ApertureGui():
Expand Down
10 changes: 5 additions & 5 deletions src/temgymbasic/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, components, beam_z=1, num_rays=16, beam_type='point',
Choose the type of beam:
-'point' beam creates a set of rays that start from a single point and
spread out like a cone.
-'paralell' beam creates a set of rays that start from the same position, but
-'parallel' beam creates a set of rays that start from the same position, but
each have the same angle.
- 'axial' creates a beam which is only visible on the x and y axis.
- 'x_axial' creates a beam which is only visible on the x-axis. This is only used
Expand All @@ -40,7 +40,7 @@ def __init__(self, components, beam_z=1, num_rays=16, beam_type='point',
beam_tilt_y : int, optional
Set the tilt of the beam in the y direction, by default 0
beam_radius : float, optional
Set the width of the beam - only matters if "paralell" beam type is selected
Set the width of the beam - only matters if "parallel" beam type is selected
detector_size : float, optional
Set the size of the detector, by default 0.5
detector_pixels : int, optional
Expand Down Expand Up @@ -181,7 +181,7 @@ def generate_rays(self):

self.r[:, 4, :] = np.ones(self.num_rays)

if self.beam_type == 'paralell':
if self.beam_type == 'parallel':
self.r, self.spot_indices = circular_beam(self.r, self.beam_radius)
elif self.beam_type == 'point':
self.r, self.spot_indices = point_beam(self.r, self.gun_beam_semi_angle)
Expand Down Expand Up @@ -285,8 +285,8 @@ def update_parameters_from_gui(self):

if self.gui.checkBoxAxial.isChecked():
self.beam_type = 'axial'
if self.gui.checkBoxParalell.isChecked():
self.beam_type = 'paralell'
if self.gui.checkBoxparallel.isChecked():
self.beam_type = ''
if self.gui.checkBoxPoint.isChecked():
self.beam_type = 'point'

Expand Down
2 changes: 1 addition & 1 deletion src/temgymbasic/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def connectSignals(self):
if self.model.experiment != None:
self.model.experiment_gui.scanpixelsslider.valueChanged.connect(self.update)

self.model.gui.checkBoxParalell.stateChanged.connect(self.update)
self.model.gui.checkBoxParallel.stateChanged.connect(self.update)
self.model.gui.checkBoxPoint.stateChanged.connect(self.update)
self.model.gui.checkBoxAxial.stateChanged.connect(self.update)
self.model.gui.beamangleslider.valueChanged.connect(self.update)
Expand Down