Crosshair

Crosshair plugin

Crosshair is a simple plugin to draw crosshairs labeled with the position of the cross in pixels coordinates, WCS coordinates, or data value at the cross position.

Plugin Type: Local

Crosshair is a local plugin, which means it is associated with a channel. An instance can be opened for each channel.

Usage

Select the appropriate type of output in the “Format” drop-down box in the UI: “xy” for pixel coordinates, “coords” for the WCS coordinates, and “value” for the value at the crosshair position.

If “Drag only” is checked, then the crosshair is only updated when the cursor is clicked or dragged in the window. If unchecked the crosshair is positioned by simply moving the cursor around the channel viewer window.

The “Cuts” tab contains a profile plot for the vertical and horizontal cuts represented by the visible box boundary present when “Quick Cuts” is checked. This plot is updated in real time as the crosshair is moved. When “Quick Cuts” is unchecked, the plot is not updated.

The size of the box is determined by the “radius” parameter.

The “Warn Level” control can be used to set a flux level above which a warning is indicated in the Cuts plot by a yellow line and the background turning yellow. The warning is triggered if any value along either the X or Y cut exceeds the warn level threshold.

The “Alert Level” control is similar, but represented by a red line and the background turning pink. The warning is triggered if any value along either the X or Y cut exceeds the alert level threshold. Alerts take precedence over warnings.

Both the “Warn” and “Alert” features can be turned off by simply setting a blank value. They are turned off by default.

The cuts plot is interactive, but it really only makes sense to use that if “Drag only” is checked. You can press ‘x’ or ‘y’ in the plot window to toggle on and off the autoaxis scaling feature for either axis, and scroll in the plot to zoom in the X axis (hold Ctrl down while scrolling to zoom the Y axis).

Crosshair provides a Pick plugin interaction feature: when the crosshair is over an object you can press ‘r’ in the channel viewer window to have the Pick plugin invoked on that particular location. If a Pick is not open already on that channel, it will be opened first.

User Configuration

It is customizable using ~/.ginga/plugin_Crosshair.cfg, where ~ is your HOME directory:

#
# Crosshair plugin preferences file
#
# Place this in file under ~/.ginga with the name "plugin_Crosshair.cfg"

# color of the crosshair
color = 'green'

# text color of crosshair
text_color = 'skyblue'

# box color indicating cut radius
box_color = 'aquamarine'

# cut plot line colors for X and Y
quick_h_cross_color = '#7570b3'
quick_v_cross_color = '#1b9e77'

# enable quick cuts plots by default
quick_cuts = False

# force drag only by default
drag_only = False

# set a warning level for the warning feature of the cuts plot
warn_level = None

# set an alery level for the alert feature of the cuts plot
alert_level = None

# set initial radius of the cuts box
cuts_radius = 15