Skip to content

Commit 876d9b5

Browse files
javirtsJason VirtsJason VirtsJason Virts
authored
Started work on Distance Tool (#3609)
* Started work on Distance Tool * Started work on Distance Tool * Started work on Distance Tool * Continued Work on Distance Toool * Altered Key press logic for distance tool * Implemented a snap feature with 'alt-d' key press * Added Distance Table * Added Data Label & made UI clearer * Added the ability to create multiple lines on the viewer * Added the Distance Tool to the Imviz Docs * Incereased Visibility of data label * Added Changelog Entry * Addressed Comments and changed how the viewer is cleared Pleas ente the commit message for your changes. Lines starting * Fixed label offset distance * Fixed Cubviz Distande Label * Fixed Error in Clear Table for CubeViz * Security Vulnerability Fix * Correct test failures --------- Co-authored-by: Jason Virts <[email protected]> Co-authored-by: Jason Virts <[email protected]> Co-authored-by: Jason Virts <[email protected]>
1 parent f68d93e commit 876d9b5

File tree

6 files changed

+444
-53
lines changed

6 files changed

+444
-53
lines changed

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
New Features
55
------------
66

7+
- The Markers plugin now includes a Distance Tool to interactively measure and log pixel, on-sky, and axis-separated (dx, dy)
8+
distances between points in any viewer. [#3609]
9+
710
- The Plot Options plugin now highlights the tab for the active (top-most) data layer
811
in the selected viewer. [#3514]
912

docs/imviz/plugins.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,35 @@ In Imviz, the table also exposes columns labeled "pixel:unreliable", "world:unre
211211
the bounds of the reference image's WCS (noted in the mouseover display by the information showing
212212
as grayed).
213213

214+
.. _imviz_distance-tool:
215+
216+
Distance Tool
217+
-------------
218+
219+
The Markers plugin also includes a tool for measuring the distance and position angle between
220+
two points in a viewer. This functionality is available whenever the Markers plugin is open.
221+
222+
223+
1. Mouse over the desired start point in a viewer and press the ``d`` key. A ``...`` indicator
224+
will appear in the :guilabel:`Last Measured Distance` field at the bottom of the plugin,
225+
showing that the first point is set.
226+
2. Mouse over the desired end point and press the ``d`` key again.
227+
228+
This will draw a line between the two points. A label showing the distance will appear,
229+
rotated to be parallel with the line, and offset to prevent intersecting the line.
230+
231+
A new table, :guilabel:`Measurements`, will also appear below the main markers table. This
232+
table logs the start and end coordinates (both pixel and world, if available), the on-sky
233+
separation, the pixel distance, and the position angle for each measurement.
234+
235+
**Additional Features:**
236+
237+
* **Snapping**: To measure the distance from or to an existing marker, hold down the ``Alt`` key
238+
(or ``Option`` on Mac) when you press ``d``. The tool will "snap" to the nearest marker
239+
already in the main table.
240+
* **Clearing**: Pressing the ``r`` key will clear all markers from the main table *and* all
241+
distance lines from the viewers.
242+
214243
From the API
215244
------------
216245

0 commit comments

Comments
 (0)