Karma Home Page
Next: 5 Volume Rendering a Up: Karma User Manual Previous: 3 Viewing and Comparing

# 4 Viewing Images and Cubes with the Multibeam

Note that this tool will be replaced with the more powerful <kvis> programme.

The <MultibeamView> programme allows you to view two datasets. This allows you to compare different datasets in a very easy fashion. This programme uses the ImageDisplay widget (section 2.15) to provide the usual interface. Pressing the View button will pop up the View2Datasets widget. This widget provides an advanced control for two datasets (either two-dimensional or three-dimensional). It allows the user to display one dataset or the other, overlay contours of one over the other, show profiles along any axis, and much more. The controls provided are:

- Close this will close the window
- Movie this will pop up the AnimateControl widget (section 2.3), which will allow you to play movies and step through frames. In addition, the following key bindings are defined for the main display window:
  - PgDn go to previous frame
  - PgUp go to next frame
  - Home go to start frame
  - End go to end frame
  On some keyboards, `PgDn` is marked as `Next` and `PgUp` is marked as `Prev`.

- Blink if enabled, dataset 2 is displayed (if the display mode is set to blink), if disabled, dataset 1 is displayed. By repeatedly clicking this, the user can blink between the two datasets. You can also press the ``b'' key in the image window and get the same effect. Note that when blinking between two images with non-linear co-ordinate systems, the linear (data pixel) co-ordinates of the canvas boundary are preserved, not the non-linear world co-ordinates. This is especially noticable when blinking between two images with a different pixel scale
- Profile Mode Menu this allows you to pop up the TracePopup widget (section 2.11) and choose the profile mode. The following modes are available:

  - None will pop down the TracePopup widget

  - Line will show a single profile in the selected direction

  - Box Sum lets you draw a box over the image window (using the middle mouse button, in a similar way as using the left mouse button to zoom) and then the sum of all the profiles in that region is displayed. Box mode only works for 3-dimensional datasets, and will always display a profile along the unseen dimension

  - Box Average is like the box sum mode except that the average of all profiles is displayed rather than the sum

  - Radial will azimuthally average the image plane data and produce a plot of average value versus radius. A gaussian is then fitted to the radial profile and overplotted in red and the FWHM (full width half max) of the gaussian is displayed over the profile. You must click the middle mouse button to define the centre of the object of interest, then, keeping the mouse button down, drag out to define the maximum radius of the profile and release the button to display. The algorithm automatically adjusts the centre position using a centroiding operation, so you don't have to be too careful about picking the centre of your object. More information on the centroidingalgorithm can be found in the Karma User Manual.

    The programme should also work with a photographic negative. The centroiding algorithm is automatically modified to look for a trough rather than a peak

  - Boxed Horiz will produce a horizontal profile which is averaged vertically. The box is drawn the same way as for the box sum mode. The horizontal centroid of the profile is computed and a gaussian is fitted and displayed
  - Boxed Vert will produce a vertical profile which is averaged horizontally. The box is drawn the same way as for the box sum mode. The vertical centroid of the profile is computed and a gaussian is fitted and displayed
- Slice Direction Menu this allows you to choose how you want to slice your cube. You can view XY, XZ or ZY planes
- Profile Axis Menu this allows you to choose along which axis you want the profile to be displayed (valid only for line profile mode)
- Display Mode Menu this allows you to choose how you want to view your two datasets. The following choices are available:

  - Set 1->image view dataset 1 as an image
  - Set 2->image view dataset 2 as an image
  - Set 1->image, Set 2->contour view dataset 1 as an image and overlay dataset 2 as contours
  - Set 1->contour, Set 2->image view dataset 2 as an image and overlay dataset 1 as contours
  - Blink between Set 1 and Set 2 enable blinking between the two datasets
- Link Intensity Scales if this is set then if the intensity scale for either dataset is modified using the Dataclip (section 2.2) widget then the intensity scaling for both datasets is changed. This can be useful when blinking between two images
- Link Frames if this is set then whenever the the current frame number for the image dataset is changed, the frame number for the other dataset is also updated to have the same value. If the two frame dimensions have the same co-ordinate type, then the co-ordinate values are matched, rather than co-ordinate indices. This feature is often used when displaying a movie of both datasets, one as images and one as contours
- Show Frame in Line Profile if this is set the current frame displayed in the main image window is shown as a vertical red line in the profile window. This marker is only drawn if the profile axis is the unseen axis
- Contour Levels this controls the contour levels. Be careful not to hit return after filling in the levels!!! The syntax for the contour levels is as follows:

  - just type the levels you want eg. `0.001 0.002 0.003 0.004`
  - levels with a constant increment: `0.001:0.004+0.001` means that the first level is `0.001`, that this level is incremented with `0.001` until `0.004` is reached. So this example gives the same levels as in the first case
  - levels incremented by a factor: `0.001:0.016*2`. This gives levels `0.001 0.002 0.004 0.008 0.016`
  - levels as percentage of the peak: first character should be %, numbers are taken as percentage, the rest of the syntax is as above, e.g. %10:40+10 gives 10, 20, 30 and 40 % of the maximum of the data

  These options can be mixed, i.e. `-0.03:-0.01+0.01 0.003:0.1+0.02 0.2 0.3` is interpreted correctly.

- Contour Colour specifies the colour the contours should be drawn in
- Apply Levels this will apply the contour levels and colour
- Reset Levels will reset the contour levels to the default
- Auto Apply if this is on, then if you load a new dataset over one that is currently being displayed as contours, the old contour levels are automatically applied. The reason this is off by default is because the contour levels for one dataset may be incorrect for another. An inappropriate set of contours can take a long time to display, so mistakes are costly
- Axis Labelling Title this allows you to change the title placed above the image when axis labelling is enabled. Normally, the title is automatically generated
- -ve Contour Width this controls the width of negative contours
- +ve Contour Width this controls the width of positive contours
- Auto Title if enabled, the axis labelling title is automatically generated. Whenever this is disabled, the string specified by Axis Labelling Title is used instead
- Show Beam if enabled, the dataset headers are searched for ``BPA'', ``BMAJ'' and ``BMIN'' FITS-style keywords. If these keywords are present, a representation of the telescope beam is overlaid on the image
- Show Beam Name if enabled, the name of the dataset for each beam is placed near the beam representation
- Set 1 Beam Xpos controls the horizontal position of the the beam for dataset 1
- Set 1 Beam Ypos controls the vertical position of the the beam for dataset 1
- Set 2 Beam Xpos controls the horizontal position of the the beam for dataset 2
- Set 2 Beam Ypos controls the vertical position of the the beam for dataset 2

In addition, if you click the left mouse button in the display window without moving it in between the press and release, the image will pan across. If you click the middle mouse button, the image will zoom in 2x (the new centre of the image will be the place where you clicked). Click the right mouse button to zoom out 2x. If the profile mode is ``box'' then you can't use the middle mouse button to zoom.

Pressing the `c` key in the display window will compute and display a scatter plot of intensity values in one image versus intensity values in the other image. This is useful for seeing if there is a correlation between the values in the two images. You can use the left mouse button to define a sub-image (similarly to zooming in) from which the scatter plot is computed.

A screen snapshot is available here.

# Command-line Options

The following command-line options are supported by <MultibeamView>:

- `-set1 <filename>` this will load the dataset `filename` as set 1

# 4.2 Special Movies

If you want to play a movie that was made using the Hot Gas Substances or the Hot Gas Continuous shaders of the xray volume rendering tool, you should compress this movie from 24-bit to 8-bit. Movies made with the other algorithms do not require compression and can be played directly. The compression of 24-bit movies is done with the command:

``conv_24to8 -com w -max <max num of colours> - <inmovie>``

The switch -com w tells the program that it should compress such that it has the same colourmap for all the images. In principle you could leave out this switch, but that is not recommended. Your movie will look awful.

The switch -max <max num of colours> gives the maximum number of colours the final movie can have. The recommended value to use is -max 200. Do not give a higher number than 220.

Please note the space between the name of the movie and the minus-sign.

You do not have control over the name of the output file. The string `conv_24to8_` is prepended to the name of the input file:

``conv_24to8 -c w -m 200 - ugc12441_movie``

produces a file `conv_24to8_ugc12441_movie.kf` (!) with the compressed movie.

# 4.3 Multiple Contour Images

The <MultibeamView> programme has special-purpose code to display two datasets, one as images and the other as contours. If you wish to display multiple images or cubes, you should use the <kvis> programme.

# Intensity-Intensity Scatter Plots

Earlier in this chapter (4) is a brief description of how you can use the `c` key to compute and display an intensity-intensity scatter plot of two images. You may also use this facility to display a scatter plot of two channels from the same cube. Simply load the same cube in twice (i.e. using the `Set1` and `Set2` file browser buttons), and select the two channels, one from each cube. You will need to ensure that the Link Frames toggle is disabled.

If the Link Frames toggle is enabled, then the scatter plot is computed using the two frames which have corresponding co-ordinates for the frame dimensions. This is usually the desired setting when generating scatter plots from frames of two different cubes.

Note that when computing a scatter plot from two images with a different co-ordinate grid, the pixels from the unseen image correspond to pixels with the same world co-ordinates in the visible image. Thus, there is no need to regrid either of the images.

Karma Home Page
Next: 5 Volume Rendering a Up: Karma User Manual Previous: 3 Viewing and Comparing