% @(#)rebin_rota.hlq 17.1.1.1 (ESO-IPG) 01/25/02 17:43:52 %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %.COPYRIGHT (c) 1990 European Southern Observatory %.IDENT rebin_rota.hlq %.AUTHOR KB, IPG/ESO %.KEYWORDS MIDAS, help files, REBIN/ROTATE %.PURPOSE On-line help file for the command: REBIN/ROTATE %.VERSION 1.0 03-JUNE-1986 : Creation, KB %---------------------------------------------------------------- \se SECTION./ROTA \es\co REBIN/ROTATE 04-MAY-1994 KB \oc\su REBIN/ROTATE in out [rot_specs] [ref_frame] [ref_flag] rotate + rebin an image \us\pu Purpose: Rotate a 2-dim image by given angle around rotation point and rebin with new stepsizes. \up\sy Syntax: REBIN/ROTATE in out [rot_specs] [ref_frame] [ref_flag] \ys\pa in = name of input frame \ap\pa out = name of output frame (will be created by this command) \ap\pa rot_specs = angle,rotx,roty,scalx,scaly (a) or KEYWORD (b) \\ angle = rotation angle in degrees (positive angle leads to counterclockwise rotation); \\ rotx,roty = coordinates of point around which the image will be rotated, or C for using coordinates of center pixel as "rotation point"; \\ scalx,scaly = scaling factors in x and y, the stepsizes of the output frame will be: stepsize of input frame * scaling factor; \\ if no reference frame is given (see following par.), the start of the result frame will be set so, that the coordinates of this "rotation point" will remain the same in the resulting image; \\ if rot-specs = string KEYWORD then the transformation matrix for the rotation is taken from the keyword TRANSFRM which should have been filled by the Midas command ALIGN/IMAGE before; \\ defaulted to 45.,C,C,1.,1. (i.e. option (a)) \ap\pa ref_frame = name of optional 2-dim reference frame; \\ if a reference frame is given, the start and stepsize for the output frame will be aligned with the reference frame (that means that scalx,scaly of parameter 'rot_specs' will be overruled by the stepsize of the reference frame); \\ This is also valid, if option (b) is used. \ap\pa ref_flag = YES or NO - if set to YES the output frame will have the exact start values, step size and no. of pixels be as in the reference frame (only applicable if reference frame given and useful for the KEYWORD option (b)); \\ defaulted to NO \ap\sa See also: ROTATE/CLOCK, ROTATE/COUNTERCLOCK, ALIGN/IMAGE, REBIN/LINEAR \as\no Note: If no reference frame is given, the output frame will be the smallest rectangle containing the rotated image, otherwise it has the size of the reference frame. \\ All pixels in the output frame which are outside the rotated image are set to a user defined Nullvalue (2. element of keyword NULL). \\ The input image is first rotated and then the pixels of the result frame are sampled with the stepsize defined by saclx,scaly \\ If ref_flag is not set to YES, the result frame might look as if it were not aligned with the reference frame (especially, when there was only a very small rotation angle). But if you e.g. divide these two frames, you see that the objects you used for the ALIGN/IMAGE command are aligned correctly. \on\exs Examples: \ex REBIN/ROTA conejo tortuga 23.4,22.,31. Rotate image `conejo.bdf' by 23.4 degrees around point with coords. (22.0,31.0) - this is not necessarily a pixel of the image; \\ result will be stored in frame `tortuga.bdf' \xe\ex REBIN/ROTA conejo tortuga 23.4,C,31.,1.5,1.5 Rotate around point with x-coord. = coord. of x-center pixel and y-coord. = 31.0. Rebin output image `tortuga.bdf' with stepsize which is 1.5 * stepsize of `conejo.bdf'. \xe\ex REBIN/ROTA conejo tortuga 23.4,C,31.,1.5,1.5 ballena As above, but the size of the output frame is determined by the size of the reference frame `ballena.bdf' and the scaling values are taken as the ratio of the stepsize of `ballena.bdf' and `conejo.bdf' (i.e. the scale values 1.5,1.5 are overriden!). \xe\ex REBIN/ROTA conejo tortuga KEYWORD ballena yes Rotate image `conejo.bdf' and use keyword TRANSFRM (which was setup before via the ALIGN/IMA command) to get rotation angle, sample offsets and scaling factors. \\ Image `tortuga.bdf' will have the start coords., step sizes and no. of pixels as image `ballena.bdf'. \xe \sxe