Skip to content

Commit

Permalink
fix: wrong method name used if relative=True in ScanParser.get_spec_s…
Browse files Browse the repository at this point in the history
…can_motor_vals
  • Loading branch information
keara-soloway committed Feb 23, 2024
1 parent 5688eb4 commit 1a6a7f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CHAP/utils/scanparsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,17 @@ def get_spec_scan_motor_vals(self, relative=False):
fast_mot_vals = np.linspace(m1_start, m1_end, m1_npt)
slow_mot_vals = np.linspace(m2_start, m2_end, m2_npt)
if relative:
fast_mot_vals += self.get_positioner_value(
fast_mot_vals += self.get_spec_positioner_value(
self.spec_scan_motor_mnes[0])
slow_mot_vals += self.get_positioner_value(
slow_mot_vals += self.get_spec_positioner_value(
self.spec_scan_motor_mnes[1])
return (fast_mot_vals, slow_mot_vals)
if self.spec_macro in ('flyscan', 'ascan', 'flydscan', 'dscan'):
mot_vals = np.linspace(float(self.spec_args[1]),
float(self.spec_args[2]),
int(self.spec_args[3])+1)
if relative:
mot_vals += self.get_positioner_value(
mot_vals += self.get_spec_positioner_value(
self.spec_scan_motor_mnes[0])
return (mot_vals,)
if self.spec_macro in ('tseries', 'loopscan'):
Expand Down Expand Up @@ -807,7 +807,7 @@ def get_spec_scan_motor_vals(self, relative=False):
float(self.spec_args[2]),
int(self.spec_args[3])+1)
if relative:
mot_vals += self.get_positioner_value(
mot_vals += self.get_spec_positioner_value(
self.spec_scan_motor_mnes[0])
return (mot_vals,)
if self.spec_macro in ('tseries', 'loopscan'):
Expand Down

0 comments on commit 1a6a7f3

Please sign in to comment.