This routine creates 2D arrays containing regularly spaced values that can be used as the coordinates of a grid of pixels. x1 will contain the x position of the centre of each pixel (so all of the x1 values in a given column will be identical), and x2 will contain the y position of the centre of each pixel (so all of the x2 values in a given row will be identical).
By default, the pixels are assumed to be square. You could create a grid of rectangular pixels by rescaling either x1 or x2 after creating them. You could rescale both to create an oversampled grid.
See also the header below, which has been extracted from the source code for this routine.
; NAME: ; SHAPELETS_MAKE_XARR ; ; CATEGORY: ; Shapelets. ; ; PURPOSE: ; Make arrays containing the values of the x (x1) and y (x2) coordinates. ; of a grid. This is convenient for evaluating 2D functions (e.g. shapelet ; basis functions) on a grid. ; ; INPUTS: ; n - Integer array [n1,n2]. Array dimensions (number of pixels). ; ; OPTIONAL INPUTS: ; x0 - Floating point array [xc1,xc2]. Pixel coordinate of the [0.0,0.0] ; origin. Default: the centre of the array. ; ; KEYWORD PARAMETERS: ; None. ; ; OUTPUTS: ; x1 - Floating point [n1*n2] array containing x values (all of the values ; in any particular column will be identical). ; x2 - Floating point [n1*n2] array containing y values (all of the values ; in any particular row will be identical). ; ; MODIFICATION HISTORY: ; Dec 01 - Debugged by R. Massey ; Jul 99 - Written by A. Refregier
View the full source code for this routine, return to the shapelets web page, or return to the code help menu.
|Last modified on 2nd Mar 2009 by Richard Massey.|