|AHELP for CIAO 4.5 ChIPS v1||
Moves the region to a new location.
move_region( [ChipsId,] xval, yval [,mode])
- ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
- xval - new x location or the difference to move in x
- yval - new y location or the difference to move in y
- mode - reposition using absolute (0) or delta (1) values
The move_region command moves the region to a new position. The new location may be specified as an absolute position (default) or as relative offsets from the original location. When the "mode" parameter is set to absolute (0), (xval,yval) will be the origin of the moved region. The origin of a regular region is the center point specified when creating the region. The origin of an irregular region is the first point specified when creating the region.
The following coordinate systems may be used to move a region: PIXEL, WINDOW_NORM, FRAME_NORM, PLOT_NORM, or DATA. The system is specified by setting the coord_sys field of the optional ChipsId structure which may be passed into the move_region routine. If a ChipsId is not provided, the default coordinate system of the region is used.
When a region is moved, it remains in its original coordinate system regardless of what coordinate system was used for the move. The move command translates the specified values to the coordinate system that the region is in before applying them to the region. This means that regions that are originally placed in normalized coordinates and get relocated using data coordinates will not be clipped if they land outside the visible data range. Conversely, regions in data coordinates which are moved using normalized coordinates to beyond the plot area will be clipped.
This command is equivalent to calling the move command with 'chips_region' specified as the object.
Move the current region to the center of the frame in frame normalized coordinates.
chips> id=ChipsId() chips> id.coord_sys=PIXEL chips> move_region(id,-20,0,1)
For a region specified in data coordinates, adjust the position by 20 pixels to the left in the x direction. Do not move it in the y direction.
chips> id=ChipsId() chips> id.region='all' chips> id.coord_sys=DATA chips> move_region(id,40,10,1)
Shift all regions by the same distance in data coordinates.
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.