In this manual we will use the following terms to describe operations with the mouse:
Mouse operations are also modified by the keyboard buttons Shift, and Ctrl. Shift-click means to press and hold the Shift key while clicking with left mouse button, Shift-right-click is the same using the right mouse button, etc. Some mouse-controlled operations in Ginga are initiated by a key stroke. In these cases the key is pressed and released (not held), and then the mouse is used to control the operation. Such operations are either terminated by releasing the mouse button (if the operation employs a drag), clicking on the image or pressing the Esc key (if not a drag operation).
There are several ways to load a file into Ginga:
The display object used throughout most of the Ginga panels has built-in support for zooming and panning. The Ginga Quick Reference has the complete listing of default keyboard and mouse bindings. Briefly, the scroll wheel of the mouse can be used to zoom in and out, along with the “+” and “-” keys. The backquote key will fit the image to the window. Digit keys (1, 2, etc) will zoom in to the corresponding zoom level, while holding Shift and pressing a zoom key zooms out to the corresponding level.
When zoomed in, panning is enabled. Panning takes two forms. Free panning allows scrolling around the entire image by mapping the entire image boundaries to the window boundaries. For example, moving the mouse to the upper right-hand corner of the window will pan to the upper right hand corner of the image, etc. There are two ways to initiate a free pan: Scroll-dragging (pressing the mouse scroll wheel and dragging) or press and release “q” and then Left-drag. Proportional panning or “drag panning” pans the image in direct proportion to the distance the mouse is moved; a common idiom is dragging the image canvas in the direction you want to move it under the window. To utilize a proportional pan, Ctrl-drag the canvas. The Pan plugin (usually embedded under the Info tab) shows the outline of the current pan position as a rectangle on a small version of the whole image. Dragging this outline will also pan the image in the main window. You can also click anywhere in the Pan window to set the pan position.
Panning in Ginga is based on an (X, Y) coordinate known as the pan position. The pan position determines what Ginga will try to keep in the middle of the window as the image is zoomed. When zoomed out, one can Shift-click on a particular point in the image (or press the “p” key while hovering over a spot), setting the pan position. Zooming afterward will keep the pan position in the center of the window.
Ginga has an auto zoom feature to automatically fit newly loaded images to the window, similar to what happens when the backquote key is pressed. See section Zoom Preferences for details.
When visualizing pixel data with an arbitrary pixel value range, the range is mapped into a bytescaled range spanning from black to white based on the low and high cut levels defined in the view object. These cut levels can be set manually by the user or automatically based on a selection of algorithms.
There are several ways to manually set the cut levels:
Ginga can algorithmically estimate and set the cut levels–a so called “auto (cut) levels”. To activate the auto levels:
The auto cut levels feature is controlled by several factors in the preferences, including the choice of algorithm and some parameters to the algorithm. See section Auto Cuts Preferences for details. Ginga can also automatically set the cut levels for new images displayed in the view. See section New Image Preferences for details.
TBD
Ginga provides several controls for transforming the image. The image can be flipped in the X axis (“horizontally”), Y axis (“vertically”), have the X and Y axes swapped, or any combination thereof. These operations can be done by the graphical controls in the Transform Preferences or by keyboard shortcuts:
The image can also be rotated in arbitrary amounts. The amount can be specified precisely in Transform Preferences or you can do an interactive rotate operation by pressing “r” in the image and then dragging the mouse horizontally left or right to set the angle. Press “R” (Shift+R) to restore the angle to 0 (unrotated).
Note
It is less computationally-intensive to rotate the image using the simple transforms (flip, swap) than by the rotation feature. Rotation may slow down some viewing operations.