Intensity Graph
The Intensity Graph displays a 2D array as an image. A color map
assigns a color to the value of each array element. For example, it
could be used to display a video image, temperature pattern or terrain
in an intuitive fashion. The input data must be a numeric 1D array
with elements typed byte, short, int, long or double, in which the
data is arranged row by row so it can be converted to a 2D array. For
example, for 2D data with N rows by M columns, the input data should
like this:
InputData = P11, P12,...P1M, P21, P22, ... P2M, ... PN1, PN2, ...PNM
The resulting image will display the array elements as follows:
P11, P12, ... P1M
P21, P22, ... P2M
...
PN1, PN2, ... PNM
The widget can also output profile data of the image to PVs.
Operations
Drag a rectangle on the graph will zoom in to the rectangle.
Double click will return to unzoomed state.
Special Properties
Graph properties
- Data Height (data_height)
- Number of rows of the input data.
- Data Width (data_width)
- Number of columns of the input data.
- Maximum (maximum)
- The upper limit of the value in the input data array.
- Minimum (minimum)
- The lower limit of the value in the input data array.
- Color Map (color_map)
-
Color map of the graph. Color map is a map of double values and
colors. In the color map dialog, you can either select a predefined
color map or create your own color map. If
Interpolate
is selected, it will interpolate the color map in linear. If
Auto Scale
is selected, it will scale the color map value range to the data
range which is specified by
Maximum
and
Minimum
properties.
- Show Ramp (show_ramp)
- Show the color map ramp.
- Graph Area Height (graph_area_height)
- Height of the graph area which does not include its axes
and color ramp. The widget size will adjust automatically afte this
property is set.
- Graph Area Width (graph_area_Width)
- Width of the graph area which does not include its axes and
color ramp. The widget size will adjust automatically afte this
property is set.
- Horizon Profile X PV (horizon_profile_x_pv_name)
- The output PV to which the horizontal profile data on X
axis will be written.
- Horizon Profile Y PV (horizon_profile_y_pv_name)
- The output PV to which the horizontal profile data on Y
axis will be written.
- Vertical Profile X PV (vertical_profile_x_pv_name)
- The output PV to which the vertical profile data on X axis
will be written.
- Vertical Profile Y PV (vertical_profile_x_pv_name)
- The output PV to which the horizontal profile data on Y
axis will be written.
- Pixel Info PV (pixel_info_pv_name)
-
When the user moves the mouse across the graph or 'clicks' on the
graph, information about the pixel under the cursor is written to
this PV.
The PV will receive a `VTable` with columns
- "X" - Coordinate of pixel on X axis
- "Y" - ... Y axis
- "Value" - Value of image data array at this location
- "Selected" - Did user press mouse button, or simply move
the mouse across the image?
- Crop Left (crop_left)
- Cropped data on left.
- Crop Right (crop_right)
- Cropped data on right.
- Crop Bottom (crop_bottom)
- Cropped data on bottom.
- Crop Top (crop_top)
- Cropped data on top.
Axis Properties
The property id for axis has a prefix of
x_axis_
or
y_axis_
. For example, the property id of
Axis Color
property for X Axis (0) is
x_axis_axis_color
.
- Axis Color (axis_color)
- Color of the axis.
- Axis Title (axis_title)
- Title of the axis.
- Maximum (maximum)
- Upper range of the axis.
- Minimum (minimum)
- Lower range of the axis.
- Scale Font (scale_font)
- Font of the scale.
- Show Minor Ticks (show_minor_ticks)
- Show minor ticks on axis.
- Major Tick Step Hint (major_tick_step_hint)
- The minimum space (in pixels) between major ticks.
- Title Font (title_font)
- Font of the axis title.
- Visible (visible)
- If the axis is visible.
Special Methods
setValue
method accepts 1D double array. Its getValue method
returns double array.
See Also