scan¶
Define building blocks of scanning trajectories and related functions.
Each trajectory returns position as a function of time and some other parameters.
-
tike.scan.
avgspeed
(time, x, y=None, z=None)[source]¶ Return the average speed along trajectory x, y, z if covered in time.
-
tike.scan.
billiard
(Ax, Ay, fx, fy, px, py, t, N)[source]¶ Return the trajectory of a frictionless ball in a rectangular table.
#continuous #2d It’s a lissajous using triangle functions.
-
tike.scan.
diagonal
(A, B, fx, fy, px, py, t)[source]¶ Return the value of a diagonal function at time t.
#discontinuous #2d The diagonal is centered on the origin.
- Parameters
A, B (float) – The horizontal and vertical amplitudes of the function
fx, fy (float) – The temporal frequencies of the function
px, py (float) – The phase shifts of the x and y components of the function
t (np.array) – Time steps to evaluate the function.
-
tike.scan.
distance
(x, y=None, z=None)[source]¶ Return the total distance travelled along the trajectory x, y, z.
-
tike.scan.
hexagonal
(t, D, f, row)[source]¶ Hexagonal gridded step scan of circles with diameter, D.
#discontinuous #2d
- Parameters
t (np.array) – Time steps to evaluate the function.
D (float) – The diameter of the circles.
f (float) – How often to we move to the next circle.
row (int) – The number of positions in each row
-
tike.scan.
lengths
(x, y=None, z=None)[source]¶ Return the absolute displacements between points defined by x, y, z.
-
tike.scan.
lissajous
(A, B, fx, fy, px, py, t)[source]¶ Return the value of a lissajous function at time t.
#continuous #2d The lissajous is centered on the origin. The lissajous is periodic if and only if the fx / fy is rational. The overall period is the least common multiple of the two periods.
- Parameters
t (np.array) – Time steps to evaluate the function.
A, B (float) – The horizontal and vertical amplitudes of the function
fx, fy (float) – The temporal frequencies of the function
px, py (float) – The phase shifts of the x and y components of the function
-
tike.scan.
raster
(A, B, f, x0, y0, t)[source]¶ Return the value of a raster function at time t.
#discontinuous #2d The raster starts at (x0, y0) and moves initially in the positive directions.
- Parameters
t (np.array) – Time steps to evaluate the function.
A (float) – The horizontal length of lines
B (float) – The vertical space between lines
f (float) – The number of raster lines per second
x0, y0 (float) – Starting positions of the raster
-
tike.scan.
sawtooth
(A, f, p, t)[source]¶ Return the value of a sawtooth function at time t.
#discontinuous #1d
- Parameters
t (np.array) – Time steps to evaluate the function.
A (float) – The amplitude of the function.
f (float) – The temporal frequency of the function.
p (float [radians]) – The phase shift of the function.
-
tike.scan.
scan3
(A, B, fx, fy, fz, px, py, time, hz)[source]¶ Return a 3D combination of lissajous and sawtooth trajectories.
-
tike.scan.
scantimes
(t0, t1, f=60)[source]¶ Return times in the range [t0, t1) at the given frequency (f).
-
tike.scan.
sinusoid
(A, f, p, t)[source]¶ Return the value of a sine function at time t.
#continuous #1D
- Parameters
t (np.array) – Time steps to evaluate the function.
A (float) – The amplitude of the function.
f (float) – The temporal frequency of the function.
p (float [radians]) – The phase shift of the function.
-
tike.scan.
spiral
(r1, t1, v, t)[source]¶ Return a spiral of constant linear velcity at time t.
#continuous #2d The spiral is centered on the origin and spins clockwise.
- Parameters
t (np.array) – Time steps to evaluate the function.
r1 (float) – The radius at time t1.
t1 (float) – The time at which the spiral reaches r1.
v (float) – The linear velocity of the trajectory
References
A. Bazaei, M. Maroufi and S. O. R. Moheimani, “Tracking of constant-linear-velocity spiral trajectories by approximate internal model control,” 2017 IEEE Conference on Control Technology and Applications (CCTA), Mauna Lani, HI, 2017, pp. 129-134. doi: 10.1109/CCTA.2017.8062452
-
tike.scan.
square
(A, f, p, t)[source]¶ Return the value of a square function at time t.
#discontinuous #1d
- Parameters
t (np.array) – Time steps to evaluate the function.
A (float) – The amplitude of the function.
f (float) – The temporal frequency of the function.
p (float [radians]) – The phase shift of the function.
-
tike.scan.
staircase
(A, f, p, t)[source]¶ Return the value of a staircase function at time t.
#discontinuous #1d
- Parameters
t (np.array) – Time steps to evaluate the function.
A (float) – The amplitude of the function.
f (float) – The temporal frequency of the function.
p (float [radians]) – The phase shift of the function.
-
tike.scan.
triangle
(A, f, p, t)[source]¶ Return the value of a triangle function at time t.
#continuous #1d
- Parameters
t (np.array) – Time steps to evaluate the function.
A (float) – The amplitude of the function.
f (float) – The temporal frequency of the function.
p (float [radians]) – The phase shift of the function.