Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/chips/ahelp/blink_frames.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 ChIPS v1

blink_frames

Context: frames

Synopsis

Blink between two frames; stop blink mode.

Syntax

blink_frames(id, frame_id)
blink_frames(id, frame_id, duration)

stop_blink()

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item.
frame_id The name of the second frame to blink to.
duration The time that each frame is displayed, in seconds. The default value is 3.0.

The blink_frames command blinks between two frames at a set interval. The stop_blink command ends the blink mode. These commands are part of the advanced ChIPS module; refer to "ahelp chips" for information. To load the module:

from pychips.advanced import *

The frames must be in the same ChIPS window. One of the frames to be blinked is specified in a Chips_id structure; the second is specified as the second argument to the call. Alternately, the window which contains the two frames to blink may be specified. An optional third argument sets the blink rate in seconds.

Blinking is ended by issuing the stop_blink command.

The window display is set to "single" during the blink period, then returned to "placed" (if applicable) when blinking ends. This means the frames will fill the ChIPS window while they are blinked, regardless of their actual dimensions.

Example 1

chips> (x1, y1) = ([1,2,4,6], [2,4.4,2.8,3])
chips> add_curve(x1, y1, "line.color=green symbol.color=yellow")
chips> add_frame()
chips> (x2,y2) = ([10,20,30,40,50,60,70,80], [23,25,27,25,22,19,18,21])
chips> add_curve(x2, y2, "line.color=coral")
chips> id = ChipsId()
chips> id.frame = "frm1"
chips> blink_frames(id, "frm2")
chips> stop_blink()
chips> blink_frames(id, "frm2", 0.25)

Create a window containg three frames with a curve in each of them. A ChipsId is created with the frame id "frm1". The blink_frames command is called with that structure and the frame_id "frm2", blinking the two frames at the default rate of 3 s. The blinking is stopped, then restarted with a blink rate of 0.25 s.

Example 2

chips> add_frame(.1, .1, .5, .5)
chips> (x1, y1) = ([1,2,4,6], [2,4.4,2.8,3])
chips> add_curve(x1, y1, "line.color=green symbol.color=yellow")
chips> add_frame(.5, .5, .9, .9)
chips> (x2,y2) = ([10,20,30,40,50,60,70,80], [23,25,27,25,22,19,18,21])
chips> add_curve(x2, y2, "line.color=coral")
chips> id = ChipsId()
chips> id.frame = "frm1"
chips> blink_frames(id, "frm2", 0.25)
chips> stop_blink()

Create two frames whose dimensions are smaller than the window and place a curve in each frame. The two frames are blinked with a blink rate of 0.25 s. During the blinking, each frame is enlarged to fill the window. When the blinking is stopped, the display reverts to the original frame display mode.

Example 3

chips> (x1, y1) = ([1,2,4,6], [2,4.4,2.8,3])
chips> add_curve(x1, y1, "line.color=green symbol.color=yellow")
chips> add_frame()
chips> (x2,y2) = ([10,20,30,40,50,60,70,80], [23,25,27,25,22,19,18,21])
chips> add_curve(x2, y2, "line.color=coral")
chips> add_window()
chips> id = ChipsId()
chips> id.window = "win1"
chips> id.frame = "frm1"
chips> blink_frames(id, "frm2", 1.0)

In this example, the ChipsId is used to specify both the window and one of the frames which should be used in the blink. The blink_frames command affects frames "frm1" and "frm2" in window "win1"; the blink rate is set at 1 s.

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

frames
add_frame, arrange_frames, current_frame, delete_frame, display_frame, get_frame, hide_frame, move_frame, next_frame, reposition_frame, set_frame, tile, view_placed_frame, view_single_frame
utilities
erase, get_object_count

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.