DS9

CXC Science Data Systems

Block, Bin, Zoom and Pan

In DS9, the main image can be zoomed in and out to get a magnified view of a small area or a wide view of a large area of the image. The user can also 'block' the image; 'block by 4' means 'take each 4x4 pixel in the original image and replace it by a single pixel in the new image. The value in the binned pixel can be specified to be either the sum of the original pixel values (appropriate in, e.g., an image where the pixel values are photon counts) or their average (approriate in an image where the pixel values are flux per square arcsecond, etc.).

For event list files, one can also 'bin' the image. This is similar to block but operates on the table colummns used to make the image.

By default, a 1024 x 1024 subset (buffer) of the loaded image is displayed, centered on the image center. The user can change the binning of the image, can change the buffer size, and can zoom in and out.

Block factor

Command:block open
Menu:Analysis - Block - Block Parameters
Description:Open the block parameter dialog.

Command:block close
Menu:Analysis - Block - Block Parameters - Close
Description:Close the block parameter dialog.


Block Parameters dialog


Command:block [N] (or block to [N])
Menu:Analysis - Block - Block N
Description:Block by N, where N = 1, 2, 4, 8, 16 or 32, rebins the image so that eachpixel in the new displayed image is an NxN group of pixels in the source image.

Command:block [N] [M]
Menu:Analysis- Block - Block Parameters - Apply
Description:Does the same thing as block [N], but allows different block factors in X and Y.

Command:block in|out
Menu:Analysis- Block - Block In/Out
Description:Increases or decreases the current blocking level by one factor of 2.

Command:block to fit
Menu:Analysis- Block - Block Fit
Description:Blocks the image to a level where the entire image fits in the display area.

Bin factor

Binning is only available for table data such as event lists, where the image is made on the fly from a 2D histogram of event coordinate values.

Command:bin open
Menu:Bin - Binning Parameters
Description:Open the binning parameters menu.


Binning Parameters dialog


Command:bin close
Menu:Bin - Binning Parameters - Close
Description:Close the binning parameters menu.

Command:bin factor [value]
Menu:Bin - Bin [value]
Description:Rebin so the binned pixel size is [value] times the original.Supported steps in the menu are N = 1, 2, 4, 8, 16, 32, 64, 128, 256. Arbitrary floating point values(including values less than 1) are supported in the Bin - Binning Parameters dialog.Causes the displayed imageto be rebinned by that factor compared to the original image. The original resolutionis retained in memory, it's just the display that changes.

Command:bin in|out
Menu:Bin - In|Out
Description:Set the binning to one step less or more than the current binning level.So if the current bin factor is 8, 'Bin - In' sets the bin factor to 4 and 'Bin - Out' sets it to 16.

Command:bin to fit
Menu:Bin - Fit
Description:Will select a binning factor that ensures the whole image is displayed.

Command:bin factor [N] [M]
Menu:Bin - Binning Parameters - Bin
Description:Bin the image by N x Mwith N and M entered as arbitrary values.

Command:bin about [x] [y]
Menu:Bin - Binning Parameters - Bin Center - Apply
Description:Select the physical coordinates of the bin center.By default, binning uses the center of the image.

Command:bin about center
Menu:Bin - Binning Parameters - Bin Center - center of data
Description:Bin about the center of the image.

Because the pixels in an image made from an event list may originate from histograms of a real-valued position coordinate, binning can be done by a real-valued factor. It is otherwise the same as blocking of a true image.

The buffer size options are M x M where M = 128, 256, 512, 1024, 2048, 4096, 8192.

Command:bin buffersize [value]
Menu:Bin - M x M
Description:Set the size of the binning buffer.

Command:bin function average|sum
Menu:Bin - Average|Sum
Description:Specify whether binned pixel values are theaverage or the sum of individual pixels. (Also Bin- Binning Parameters - Method).

Zooming and Buffer size

The zoom function displays the value of the pixel closest to the location being rendered. So zoom by 1/4 (zooming out) will only display 1 out of 16 pixels in the original image, while zoom by 4 (zooming in) will display the same pixel 16 times.

Note that if you have opened an event file with X and Y columns that have a large range (e.g 0.5 to 8192.5), by default only a 1024 x 1024 central subset is displayed. Binning by 2 displays a 1024 x 1024 image corresponding to the central 2048 x 2048 subset of the original image. However, zooming out by 2 (i.e. zoom = 1/2) still displays only the original 1024 x 1024, with whitespace around it; a change in zoom factor does not change the loaded subset. Selecting Bin - 2048 x 2048 with zoom set to 1/2 will display the central 2048 x 2048 at full resolution.

To summarize: changing the bin factor will change which subset of the event file is used. Changing the zoom factor will not - you need to change the buffer size as well.

Command:mode zoom
Menu:Edit - Zoom
Description:In Zoom mode, clicking the left button will zoom the image in, without moving the current imagelocation. Shift-clicking the left button will zoom back out. Middle button scroll,if available, will also control the zoom.You can also use the Zoom menu and in particular the Zoom - Pan Zoom Rotate Parametersdialog.

Command:pan|rotate|orient|zoom open
Menu:Zoom - Pan Zoom Rotate Parameters
Description:Opens a dialog which allows you to modify and reset the zoom and pan parameters.


Pan Zoom Rotate parameter dialog


Command:pan|rotate|orient|zoom close
Menu:Zoom - Pan Zoom Rotate Parameters - Close
Description:Close the rotate/zoom/pan parameters dialog

Command:zoom [n]
Menu:Zoom - [n]
Description: (n = 1/32, 1/16, 1/8, 1/4, 1/2, 1, 2, 4, 6, 8, 16, 32). Zoom to given factor.

Command:zoom [n][m]
Menu:Zoom - Pan Zoom Rotate Parameters - Zoom
Description:Zoom different amoutns in x and y

Command:zoom in|out
Menu:Zoom - In|Out
Description:changes the zoom factor by one step in either direction. KEYBOARD SHORTCUT: z (in), Z (out)

Command:zoom to fit
Menu:Zoom - Fit
Description:attempts to pick a zoom factor in which the entire image subset is displayed.

Orientation and Rotation

Command:orient none
Menu:Zoom - None
Description:displays the image with the X, Y axes in their usual orientation.

Command:orient x|y|xy
Menu:Zoom - Invert X|Y|XY
Description:Inverts one or both of the axes.

Command:-
Menu:Edit - Rotate
Description:In Rotate mode, holding and dragging the left button allows you to rotate the image in the frame.

Command:rotate to [M]
Menu:Zoom - M degrees
Description:Menu option is M = 0, 90, 180 or 270, or an arbitary value in the dialog, rotates the image by the given amount.

Pan

Clicking with the middle button changes the displayed center location.

Command:mode pan
Menu:Edit - Pan
Description:In Pan mode, left button has the same action as middle button. Clicking on a location will move that location in theimage to the center of the frame.Dragging has no effect.For some reason I always expect that clicking at a point in the image/frame would move the imagecenter to that frame location, rather than vice versa. It doesn't.

Command:-
Menu:Zoom - Pan Zoom Rotate parameters
Description:Allows you to modify and reset the zoom andpan parameters.

Command:-
Menu:Edit - Preferences - Pan Zoom - Click to Center
Description:In this, the default mode, the new center of the display region will be the location clicked.

Command:-
Menu:Edit - Preferences - Pan Zoom - Drag to Center
Description:Alternative pan mode

Command:-
Menu:Edit - Preferences - Pan Zoom - Pan then Zoom
Description:Alternative pan mode

Command:-
Menu:Edit - Preferences - Pan Zoom - Mouse Wheel Zoom - Enable
Description:If this is selected (on by default),scrolling the middle button, if supported, will zoom the image in and out by a factor.

Command:-
Menu:Edit - Preferences - Pan Zoom - Mouse Wheel Zoom - Factor
Description:Sets the zoom factor for mouse wheel zoom.

Command:-
Menu:Edit - Preferences - Bin - Mouse Wheel Bin - Enable
Description:Enables binning with the mouse wheel

Command:-
Menu:Edit - Preferences - Bin - Mouse Wheel Bin - Factor
Description:Sets the mouse wheel binning factor; the default factor is 1.2

Command:-
Menu:Edit - Pan
Description:Sets the mode to Pan mode, in which the user can drag the location of the display center around in the image(i.e. shift the location on which the visible subset of the image is centered).

Command:-
Menu:Zoom - Center Image
Description:Resets the display center to be the image center.

Command:align yes|no
Menu:Zoom - Align
Description:Puts north at top.

Command:wcs align yes|no
Menu:Zoom - Align
Description:Same as 'align'

Command:pan to [x] [y] [coordsys]
Menu:-
Description:Pan to coordinates x,y. Examples:pan to 200 200 imagepan to 400 400 physicalpan to 13:29:55 47:11:50 wcs fk5

Command:pan [x] [y] [coordsys]
Menu:-
Description:Pan by relative amount x,y. Examples:pan 200 200 imagepan 400 400 physical

Crop

Command:mode crop
Menu:Edit - Crop
Description:In Crop mode, click and drag the left button to define a rectangle with one cornerat the starting position and with edges aligned with the image axes. On releasing theleft button, the image is cropped to be just the data within that rectangle.

Command:crop open|close
Menu:Zoom - Crop Parameters
Description:Opens the crop parameters dialog. Allows you to edit the rectangle parametersand has a 'Reset' button to undo the crop.


Crop Parameters dialog


Command:crop [x] [y] [w] [h] [coordsys] [skyframe] degrees|arcmin|arcsec
Menu:Zoom - Crop parameters
Description:Allows you to edit the rectangle parameters and crop the data. Examples:crop 40 30 10 20 physicalcrop +104:51:06.915 +68:33:40.761 8.14 22.00 wcs galactic arcsec

Command:crop reset
Menu:Zoom - Crop Parameters - Reset
Description:Reset the image, removing the crop