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/cutsegment.pro

    r121 r125  
    11;+ 
    22; 
    3 ; @file_comments cut p segments into p*n equal parts 
     3; @file_comments  
     4; cut p segments into p*n equal parts 
    45; 
    56; @categories basic work 
     
    1314; @param n {in}{required} the number of pieces we want to cut each segment 
    1415; 
    15 ; @keyword /endpoints see ouputs 
     16; @keyword ENDPOINTS see ouputs 
    1617; 
    17 ; @keyword /onsphere to specify that the points are located on a 
     18; @keyword ONSPHERE to specify that the points are located on a 
    1819;         sphere. In this case, x and y corresponds to longitude and 
    1920;         latitude in degrees. 
    2021; 
    2122; @returns 
    22       default: a 3d array (2,n,p) that gives the coordinates of the 
    23       middle of the cutted segments. 
    24       if /endpoints, a 3d array (2,n+1,p) that gives the 
    25       coordinates of the endpoints of the cutted segments. 
     23- default: a 3d array (2,n,p) that gives the coordinates of the 
     24middle of the cutted segments. 
     25- if /ENDPOINTS, a 3d array (2,n+1,p) that gives the 
     26coordinates of the endpoints of the cutted segments. 
    2627; 
    27 ; @examples  
     28; @examples 
    2829; 
    29 ;  IDL> x0=[2,5] 
    30 ;  IDL> y0=[5,1] 
    31 ;  IDL> x1=[9,3] 
    32 ;  IDL> y1=[1,8] 
    33 ;  IDL> res=cutsegment(x0, y0, x1, y1, 10) 
    34 ;  IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
    35 ;  IDL> oplot, [x0[0], x1[0]], [y0[0], y1[0]] 
    36 ;  IDL> oplot, [res[0,*,0]], [res[1,*,0]], color = 20, psym = 1, thick = 3 
    37 ;  IDL> oplot, [x0[1], x1[1]], [y0[1], y1[1]] 
    38 ;  IDL> oplot, [res[0,*,1]], [res[1,*,1]], color = 40, psym = 1, thick = 3 
     30; IDL> x0=[2,5] 
     31; IDL> y0=[5,1] 
     32; IDL> x1=[9,3] 
     33; IDL> y1=[1,8] 
     34; IDL> res=cutsegment(x0, y0, x1, y1, 10) 
     35; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
     36; IDL> oplot, [x0[0], x1[0]], [y0[0], y1[0]] 
     37; IDL> oplot, [res[0,*,0]], [res[1,*,0]], color = 20, psym = 1, thick = 3 
     38; IDL> oplot, [x0[1], x1[1]], [y0[1], y1[1]] 
     39; IDL> oplot, [res[0,*,1]], [res[1,*,1]], color = 40, psym = 1, thick = 3 
    3940; 
    4041; @history 
     
    4546; 
    4647;- 
    47 FUNCTION cutsegment, x0, y0, x1, y1, n, endpoints = endpoints, onsphere = onsphere 
     48FUNCTION cutsegment, x0, y0, x1, y1, n, ENDPOINTS = endpoints, ONSPHERE = onsphere 
    4849; 
    4950  compile_opt idl2, strictarrsubs 
    5051; 
    5152; number of segment 
    52   nseg = n_elements(x0)  
     53  nseg = n_elements(x0) 
    5354; number of point to find on each segment 
    54   n2find = n+keyword_set(endpoints)  
     55  n2find = n+keyword_set(endpoints) 
    5556; 
    5657  IF keyword_set(onsphere) THEN BEGIN 
Note: See TracChangeset for help on using the changeset viewer.