Ignore:
Timestamp:
08/09/06 12:12:54 (18 years ago)
Author:
navarro
Message:

english and nicer header (3a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_c.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param MASK 
     9; 
     10;  
     11; @param XF 
     12;  
     13; 
     14; @param YF 
     15;  
     16; 
     17; @param NX 
     18;  
     19; 
     20; @param NY 
     21;  
     22; 
     23; @keyword COAST_COLOR 
     24; The color of the coastline. 
     25; defaut value is 0 => black 
     26; 
     27; @keyword COAST_THICK 
     28; The thick of the trait to trace continents 
     29; By default, it is 1. 
     30; 
     31; @keyword XSEUIL 
     32; To eliminate segments of coasts which are to big (which link points which can  
     33; be close on the sphere but distant on the drawing). We delete all segments  
     34; whose the size surpass the size of the window following X/XSEUIL. By default,  
     35; XSEUIL=5. But it can be to big if we do a big zoom or a little one for some  
     36; projections... We specify it the keyword thanks to this keyword! 
     37; 
     38; @keyword YSEUIL 
     39; See XSEUIL 
     40;  
     41; @keyword _EXTRA 
     42; Used to pass our keywords 
     43 
     44; @returns 
     45;  
     46;  
     47; @uses 
     48;  
     49;  
     50; @restrictions 
     51;  
     52;  
     53; @examples 
     54;  
     55;  
     56; @history 
     57;  
     58;  
     59; @version  
     60;  
     61; @todo  
     62; Seb: remplir le header 
     63; 
     64;- 
     65;--------------------------------------------------------- 
    166PRO drawcoast_c, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, _extra = ex 
    2 ;--------------------------------------------------------- 
    367; 
    468  compile_opt idl2, strictarrsubs 
     
    1074  ENDIF 
    1175;--------------------------------------------------------- 
    12    tempsun = systime(1)         ; pour key_performance 
     76   tempsun = systime(1)         ; For key_performance 
    1377;--------------------------------------------------------- 
    1478; 
    15 ; on trace les segments verticaux: 
     79; We trace vertical segments: 
    1680; 
    1781   if NOT keyword_set(yseuil) then yseuil = 5. < (min([nx, ny])-2) 
    1882   distanceseuil = (!p.position[3]-!p.position[1])/yseuil 
    19 ; liste: liste des points i pourlesquels on va tracer un segment entre 
    20 ; le point i,j-1 et i,j 
    21    tempdeux = systime(1)        ; pour key_performance =2 
     83; list: list of points i for which we will trace a segment between the point i,j-1 and i,j 
     84   tempdeux = systime(1)        ; For key_performance =2 
    2285   liste = where((mask+shift(mask, -1, 0)) EQ 1 $ 
    2386                 AND ((xf-shift(xf, 0, 1))^2+(yf-shift(yf, 0, 1))^2) LE distanceseuil^2) 
    2487   IF liste[0] NE -1 THEN BEGIN 
    25 ; on recupere lx et ly qui sont les indices ds un tableau 2d des 
    26 ; points donnes par liste 
     88; We recuperate lx an dly which are indexes in a 2d array of points given by list 
    2789      ly = liste/nx & lx = temporary(liste)-nx*ly 
    28       indice = where(ly NE 0)   ; on ne prend pas les points concernant 
     90      indice = where(ly NE 0)   ; We do not take points concerning 
    2991      if indice[0] NE -1 then begin 
    30 ; la premiere ligne car ds ce cas le pt j-1 n''est pas definit 
     92; the first line because in this case, the point j-1 is undefined. 
    3193         lx = lx[indice] & ly = ly[temporary(indice)] 
    32 ; boucle sur les points concernes et trace du segment 
    33 ; rq: on utilise plost au lieu de plot car plots est bcp plus rapide. 
     94; Loop on concerned points and drawing of the segment. 
     95; Comment: we use plots instead of plot because plots goes faster. 
    3496         IF testvar(var = key_performance) EQ 2 THEN $ 
    3597          print, 'temps tracecote: determiner liste des points concernes par un trait vertical', systime(1)-tempdeux 
    36          tempdeux = systime(1)  ; pour key_performance =2 
     98         tempdeux = systime(1)  ; For key_performance =2 
    3799         for pt = 0L, n_elements(lx)-1 do BEGIN  
    38100            i = lx[pt] & j = ly[pt] 
     
    45107   ENDIF 
    46108; 
    47 ; pour le trace des segments horizontaux, c''est la meme chose sauf 
    48 ; qu'il faut faire attention si on est periodique:  
     109; For the drawing of horizontal segments , it is the same thing but we have to be careful if it is periodic. 
    49110; 
    50 ; si on est periodique on duplique la premiere colonne et on la met a 
    51 ; la fin. (ceci est fait non pas pour le shift qui est par defaut 
    52 ; periodique mais pour le plots  
    53    tempdeux = systime(1)        ; pour key_performance =2 
     111; If it is periodic, we duplicate the first column and we put it at the end.  
     112; (This is made not for the shift which is periodic by default but for the plots) 
     113   tempdeux = systime(1)        ; For key_performance =2 
    54114   if keyword_set(key_periodic) AND nx EQ jpi then begin 
    55115      mask = [mask, mask[0, *]] 
     
    66126      indice = where(ly NE ny-1 AND lx NE 0) 
    67127      if indice[0] NE -1 then begin 
    68 ; on ne prend pas les points de la  
    69 ; premiere colonne et de la derniere ligne (car on l''a rajoute artificiellement!)) 
     128; We do not take points of the first column and of the last line (because we added artificially) 
    70129         lx = lx[indice] & ly = ly[temporary(indice)] 
    71130         IF testvar(var = key_performance) EQ 2 THEN $ 
    72131          print, 'temps tracecote: determiner liste des points concernes par un trait horizontal', systime(1)-tempdeux 
    73          tempdeux = systime(1)  ; pour key_performance =2 
     132         tempdeux = systime(1)  ; For key_performance =2 
    74133         for pt = 0L, n_elements(lx)-1 do BEGIN  
    75134            i = lx[pt] & j = ly[pt] 
Note: See TracChangeset for help on using the changeset viewer.