From f48fbadb936aa7fc36720331df2f858914f6d15e Mon Sep 17 00:00:00 2001 From: Benjamin Weare <92488183+benweare@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:56:36 +0000 Subject: [PATCH 1/4] Update model.py updated "paralell" to "parallel" --- src/temgymbasic/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/temgymbasic/model.py b/src/temgymbasic/model.py index 3a88c82..736c814 100644 --- a/src/temgymbasic/model.py +++ b/src/temgymbasic/model.py @@ -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 @@ -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 @@ -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) @@ -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' From d4b085cb4ff94faf8f00d410089ffe3722b62543 Mon Sep 17 00:00:00 2001 From: Benjamin Weare <92488183+benweare@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:59:49 +0000 Subject: [PATCH 2/4] changed "paralell" to "parallel" --- src/temgymbasic/functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/temgymbasic/functions.py b/src/temgymbasic/functions.py index 1b1435e..69c84f0 100644 --- a/src/temgymbasic/functions.py +++ b/src/temgymbasic/functions.py @@ -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 ---------- From 89a9b904d5ccb603349e40204b3ba24dbc756ff9 Mon Sep 17 00:00:00 2001 From: Benjamin Weare <92488183+benweare@users.noreply.github.com> Date: Wed, 26 Feb 2025 20:02:18 +0000 Subject: [PATCH 3/4] changed "paralell" to "parallel" --- src/temgymbasic/gui.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/temgymbasic/gui.py b/src/temgymbasic/gui.py index 3bd04ee..8b55d1f 100644 --- a/src/temgymbasic/gui.py +++ b/src/temgymbasic/gui.py @@ -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 @@ -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) @@ -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) @@ -733,10 +733,10 @@ 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( @@ -744,12 +744,12 @@ def __init__(self, num_rays, beam_type, gun_beam_semi_angle, beam_tilt_x, beam_t 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) @@ -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) @@ -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(): From 2241afec7d0ee1594f2fded60c593f98bcbdeddf Mon Sep 17 00:00:00 2001 From: Benjamin Weare <92488183+benweare@users.noreply.github.com> Date: Wed, 26 Feb 2025 20:03:07 +0000 Subject: [PATCH 4/4] changed "paralell" to "parallel" --- src/temgymbasic/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/temgymbasic/run.py b/src/temgymbasic/run.py index ceea2a0..f0bd7f8 100644 --- a/src/temgymbasic/run.py +++ b/src/temgymbasic/run.py @@ -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)