Cursor
- class Nets.Cursor
Position cursors on oscilloscope and take cursor measurements.
- hide()
Hide cursors from screen
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() v33_net.cursor.hide()
- set_a(x=None, y=None)
Set position of cursor a to (x,y)
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() v33_net.cursor.set_a(x=1, y=2)
- Parameters:
x (float) -- x coordinate of cursor a
y (float) -- y coordinate of cursor a
- set_b(x=None, y=None)
Set position of cursor b to (x,y)
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() v33_net.cursor.set_b(x=1, y=2)
- Parameters:
x (float) -- x coordinate of cursor b
y (float) -- y coordinate of cursor b
- get_a()
Get (x,y) coordinates of cursor a
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() (x,y) = v33_net.cursor.get_a() print(f"{x},{y}")
- Returns:
(x,y) coordinate
- Return type:
float
- get_b()
Get (x,y) coordinates of cursor b
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() (x,y) = v33_net.cursor.get_b() print(f"{x},{y}")
- Returns:
(x,y) coordinate
- Return type:
float
- move_a(x_del=None, y_del=None)
Move a cursor by delta x and delta y
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() v33_net.cursor.move_a(x_dex=10, y_del=2)
- Parameters:
x_del (float) -- move x by delta
y_del (float) -- move y by delta
- move_b(x_del=None, y_del=None)
Move b cursor by delta x and delta y
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() v33_net.cursor.move_b(x_dex=10, y_del=2)
- Parameters:
x_del (float) -- move cursor a by delta x
y_del (float) -- move cursor a by delta y
- x_delta()
Get difference between a_x and b_x
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() delta_x = v33_net.cursor.x_delta() print(delta_x)
- Returns:
difference between a_x and b_x
- Return type:
float
- y_delta()
Get difference between a_y and b_y
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() delta_y = v33_net.cursor.y_delta() print(delta_y)
- Returns:
difference between a_y and b_y
- Return type:
float
- inverse_x_delta()
Get difference between invers of a_x and b_x
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() inv_del_x = v33_net.cursor.inverse_x_delta() print(inv_del_x)
- Returns:
difference between inverse of a_x and b_x
- Return type:
float
- a_x()
Get x position of cursor a
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() a_x = v33_net.cursor.a_x() print(a_x)
- Returns:
x position of cursor a
- Return type:
float
- a_y()
Get y position of cursor a
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() a_y = v33_net.cursor.a_y() print(a_y)
- Returns:
y position of cursor a
- Return type:
float
- b_x()
Get x position of cursor b
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() b_x = v33_net.cursor.b_x() print(b_x)
- Returns:
x position of cursor b
- Return type:
float
- b_y()
Get y position of cursor b
from lager.pcb.net import Net, NetType v33_net = Net.get('+3.3V', type=NetType.Analog, setup_function=setup_net, teardown_function=teardown_net) v33_net.enable() b_y = v33_net.cursor.b_y() print(b_y)
- Returns:
y position of cursor b
- Return type:
float