Ignore:
Timestamp:
07/06/06 16:10:25 (18 years ago)
Author:
pinsard
Message:

improvements of Interpolation/*.pro header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Interpolation/inrecgrid.pro

    r121 r125  
    11;+ 
    22; 
    3 ; @file_comments given - a list of points, (x,y) position   
    4 ;                - the x and y limits of a rectangular grid 
    5 ;          find in which cell is located each given point. 
     3; @file_comments  
     4, given - a list of points, (x,y) position 
     5;       - the x and y limits of a rectangular grid 
     6; find in which cell is located each given point. 
    67; 
    78; @categories no DO loop, use the wonderfull value_locate function! 
    89; 
    9 ; @param x1d {in}{required}  a 1d array, the x position on the points 
    10 ; @param y1d {in}{required}  a 1d array, the y position on the points 
    11 ; @param left {in}{required} a 1d, monotonically increasing array,  
     10; @param x1d {in}{required} 
     11; a 1d array, the x position on the points 
     12; 
     13; @param y1d {in}{required} 
     14; a 1d array, the y position on the points 
     15; 
     16; @param left {in}{required} 
     17; a 1d, monotonically increasing array, 
    1218; the position of the "left" border of each cell. 
    13 ; @param bottom {in}{required}  a 1d, monotonically increasing array,  
     19; 
     20; @param bottom {in}{required} 
     21; a 1d, monotonically increasing array, 
    1422; the position of the "bottom" border of each cell. 
    1523; 
    16 ; @keyword /output2d to get the output as a 2d array (2,n_elements(x1d)), 
     24; @keyword OUTPUT2D 
     25; to get the output as a 2d array (2,n_elements(x1d)), 
    1726;    with res[0,*] the x index accoring to the 1d array defined by 
    1827;    left and res[1,*] the y index accoring to the 1d array defined by 
    1928;    bottom. 
    2029; 
    21 ; @keyword checkout=[rbgrid,ubgrid] specify the right and upper bondaries of 
     30; @keyword CHECKOUT 
     31; = [rbgrid,ubgrid] specify the right and upper boundaries of 
    2232;    the grid and check if some points are out. 
    2333; 
    24 ; @returns the index on the cell accoring to the 2d array defined by 
    25 ; left and bottom. 
     34; @returns 
     35; the index on the cell accoring to the 2d array defined by left and bottom. 
    2636; 
    27 ; @examples  
     37; @examples 
    2838; 
    29 ;  IDL> a=indgen(5) 
    30 ;  IDL> b=indgen(7) 
    31 ;  IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,b) 
    32 ;  IDL> print, r 
     39; IDL> a=indgen(5) 
     40; IDL> b=indgen(7) 
     41; IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,b) 
     42; IDL> print, r 
    3343;            20          13           7 
    34 ;  IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,a+1,b,b+1,/output2d) 
    35 ;  IDL> print, r 
     44; IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,a+1,b,b+1,/output2d) 
     45; IDL> print, r 
    3646;        0.00000      4.00000 
    3747;        3.00000      2.00000 
    3848;        2.00000      1.00000 
    39 ;   
     49; 
    4050; @history 
    41 ;            S. Masson (smasson\@lodyc.jussieu.fr) 
    42 ;                      July 3rd, 2002 
    43 ;                      October 3rd, 2003: use value_locate 
     51; S. Masson (smasson\@lodyc.jussieu.fr) 
     52; July 3rd, 2002 
     53; October 3rd, 2003: use value_locate 
    4454; 
    4555; @version $Id$ 
    4656; 
    4757;- 
    48  
    49 FUNCTION inrecgrid, x1d, y1d, left, bottom, output2d = output2d, checkout = checkout 
     58FUNCTION inrecgrid, x1d, y1d, left, bottom, OUTPUT2D = output2d, CHECKOUT = checkout 
    5059; 
    5160  compile_opt idl2, strictarrsubs 
     
    7180  out = where(xpos EQ -1 OR ypos EQ -1) 
    7281  IF out[0] NE -1 THEN res[out] = -1 
    73 ;   
     82; 
    7483  RETURN, res 
    7584 
Note: See TracChangeset for help on using the changeset viewer.