pypeit.core.gui.edge_inspector module
Implements a matplotlib GUI to inspect and interact with the slit edge tracing.
- class pypeit.core.gui.edge_inspector.EdgeInspectorGUI(edges)[source]
Bases:
object
matplotlib-based GUI to analyze/manipulate edge traces.
- Parameters:
edges (
EdgeTraceSet
) – Edge tracing to inspect/edit. Note this object is edited directly!
- add_left(pos)[source]
Add a new left trace nearest the cursor spatial (x) position.
This is an event call-back function that must accept an array-like object giving the pointer coordinates.
- Parameters:
pos (array-like) – List with x and y position of the cursor at the time of the window event.
- add_right(pos)[source]
Add a new right trace nearest the cursor spatial (x) position.
This is an event call-back function that must accept an array-like object giving the pointer coordinates.
- Parameters:
pos (array-like) – List with x and y position of the cursor at the time of the window event.
- delete(pos)[source]
Delete the trace nearest the cursor spatial (x) position.
This is an event call-back function that must accept an array-like object giving the pointer coordinates.
- Parameters:
pos (array-like) – List with x and y position of the cursor at the time of the window event.
- move(pos)[source]
Move the trace nearest the cursor spatial (x) position to the cursor’s location.
This is an event call-back function that must accept an array-like object giving the pointer coordinates.
- Parameters:
pos (array-like) – List with x and y position of the cursor at the time of the window event.
- nearest_trace(spat)[source]
Find the trace nearest to the spatial position of the cursor.
- Parameters:
spat (
float
) – The spatial (x) position of the cursor
- undo(*args)[source]
Undo all operations since the last time the
edges
object was updated.The function call includes
*args
because it is used as an event call-back function that must support arguments passed by the event. But all of these arguments are ignored.
- update_traces(*args)[source]
Update the underlying trace data and edges object.
Changes to the traces are kept by the internals until we’re ready to “update” the edges object. This performs the update and replots the trace data.
All arguments to this function are accepted but ignored. The reason is because this is the function passed to matplotlib.widgets.Button.on_clicked, but this function does not need any of the input from the
Button
event.