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

    r121 r125  
    11;+ 
    2 ; @file_comments click on a map and find in which cell the click was 
     2; @file_comments  
     3; click on a map and find in which cell the click was 
    34; 
    45; @categories finding where is a point on a grid 
     
    910;     points). 
    1011; 
    11 ; @keyword /DRAWCELL to draw the cell in which we clicked 
     12; @keyword DRAWCELL to draw the cell in which we clicked 
    1213; 
    1314; @keyword COLOR  the color used to draw the cells (Clicking one more 
    1415;     time in the same cell will draw the cell with the white color) 
    1516; 
    16 ; @keyword /ORIGINAL to get the position of the cell regarding the original 
     17; @keyword ORIGINAL to get the position of the cell regarding the original 
    1718;     grid (with no key_shift, ixminmesh, iyminmesh...) 
    1819; 
    19 ; @keyword /IJ see outpus 
     20; @keyword IJ see outpus 
    2021; 
    2122; @keyword _EXTRA to pass extra keywords to inquad and plot (when /drawcell) 
     
    2526;     is in memory in the variable of the common. If /ij keyword is 
    2627;     activated give 2D array (2, n) which are the i,j position of the 
    27 ;     n selected cells.  
     28;     n selected cells. 
    2829; 
    2930; @uses common.pro 
    3031; 
    31 ; @examples  
     32; @examples 
    3233; 
    33 ;   IDL> res = clickincell() 
     34; IDL> res = clickincell() 
    3435;     Click with the left button to select a cell. Clicking one more 
    3536;     time in the same cell remove the cell from the selection. 
    36 ;     Click on the right button to quit.   
     37;     Click on the right button to quit. 
    3738; 
    38 ;   IDL> plt, findgen(jpi,jpj),/nodata,map=[90,0,0],/ortho 
    39 ;   IDL> print, clickincell(/draw,color=150,/xy) 
     39; IDL> plt, findgen(jpi,jpj),/nodata,map=[90,0,0],/ortho 
     40; IDL> print, clickincell(/draw,color=150,/xy) 
    4041; 
    4142; @history 
     
    4445; 
    4546; @version $Id$ 
    46 ; 
    4747; 
    4848;- 
     
    117117          cellnum = [cellnum, cell] 
    118118          selected = [selected, 1] 
    119           already = n_elements(selected)-1  
     119          already = n_elements(selected)-1 
    120120        ENDIF ELSE selected[already] = 1-selected[already] 
    121121        IF keyword_set(drawcell) THEN BEGIN 
     
    129129      2:                        ; middle button 
    130130      ELSE: 
    131     ENDCASE     
     131    ENDCASE 
    132132; get mousse position on the reference map 
    133133outwhile: 
     
    136136; 
    137137  good = where(selected NE 0) 
    138   IF good[0] EQ -1 THEN RETURN, -1  
     138  IF good[0] EQ -1 THEN RETURN, -1 
    139139; 
    140140  cellnum = cellnum[good] 
     
    183183  ENDIF 
    184184; 
    185   ncell = n_elements(xx)  
     185  ncell = n_elements(xx) 
    186186  IF keyword_set(ij) THEN $ 
    187187    RETURN, [reform(xx, 1, ncell, /over) $ 
    188              , reform(yy, 1, ncell, /over)]  
     188             , reform(yy, 1, ncell, /over)] 
    189189; 
    190190  IF keyword_set(original) THEN RETURN, xx+jpiglo*yy $ 
    191   ELSE RETURN, xx+jpi*yy  
    192 END  
     191  ELSE RETURN, xx+jpi*yy 
     192END 
Note: See TracChangeset for help on using the changeset viewer.