Changeset 133 for trunk/SRC/Utilities


Ignore:
Timestamp:
07/07/06 11:57:27 (18 years ago)
Author:
navarro
Message:

english and nicer header (1)

Location:
trunk/SRC/Utilities
Files:
11 moved

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Utilities/fitintobox.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:fitintobox 
    6 ; 
    7 ; PURPOSE: check that the input array has size and dimensions 
     5; 
     6; @file_comments  
     7; Check that the input array has size and dimensions 
    88; compatible with the domain that was defined with the previous call 
    99; of domdef. 
    1010; 
    11 ; CATEGORY: domain compatibility 
    12 ; 
    13 ; CALLING SEQUENCE:  
    14 ;     res = fitintobox(field[, nx, ny, nz, firstx, firsty, firstz  
    15 ;                                        ,  lastx,  lasty,  lastz]) 
    16 ;  
    17 ; INPUTS: 
    18 ;     field: an array or a structure that can be read by the function 
    19 ;     litchamp.pro 
    20 ;  
    21 ;     nx, ny, nz, firstx, firsty, firstz,  lastx,  lasty,  lastz: 
    22 ;     optional parameters. If not given they will be define with a 
    23 ;     call to the procedure grille.pro 
    24 ;      
    25 ; KEYWORD PARAMETERS: none 
    26 ; 
    27 ; OUTPUTS: an array with dimensions matching the domain 
    28 ;          or -1 if there is an error... 
    29 ; 
    30 ; COMMON BLOCKS: cm_4mesh and cm_4cal 
    31 ; 
    32 ; SIDE EFFECTS: 
    33 ; 
    34 ; RESTRICTIONS: 
    35 ; 
    36 ; EXAMPLE: 
    37 ; 
    38 ;   IDL> help, fitintobox(findgen(jpi,jpj)) 
    39 ;   <Expression>    FLOAT     = Array[41, 3] 
    40 ;   IDL> help, fitintobox(findgen(jpi,jpj,78)) 
    41 ;   Error:  
    42 ;   the array dimensions [180,148,78] are incompatible 
    43 ;   with the the domain dimensions  
    44 ;   [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 
    45 ;   <Expression>    INT       =       -1 
    46 ; 
    47 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    48 ;                     10 juin 2000. 
    49 ; June 2005: S. Masson rewrite all. 
     11; @categories domain compatibility 
     12;  
     13; @param sz {in}{required}  
     14;  
     15; @param nx {in}{required} 
     16; 
     17; @param ny {in}{required} 
     18; 
     19; @param nz {in}{required} 
     20; 
     21; @param jpi {in}{required} 
     22; 
     23; @param jpj {in}{required} 
     24; 
     25; @param jpk {in}{required} 
     26;  
     27; @param jpt {in}{required} 
     28; 
     29; @returns -1 
     30; 
     31; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     32;          10 juin 2000. 
     33;          June 2005: S. Masson rewrite all. 
     34; 
     35; @version $Id$ 
     36; 
     37; @hidden 
     38; 
    5039;- 
    5140;------------------------------------------------------------ 
     
    6756  RETURN, report(['Error: ' $ 
    6857                  , 'the array dimensions ' + tostr(sz) + ' are incompatible' $ 
    69                   , 'with the the domain dimensions ' $ 
     58                  , 'with the the domain dimensions ' $                 
    7059                  , '[jpi/nx, jpj/ny, jpk/nz, jpt] = [' $ 
    7160                  + strtrim(jpi, 1) + '/' + strtrim(nx, 1) $ 
     
    7463                  + ', ' + strtrim(jpt, 1) + ']'], /simple) 
    7564END 
     65; 
     66;+ 
     67; 
     68; @categories domain compatibility 
     69; 
     70; @param field {in}{required} an array or a structure that can be read by the function                 
     71;     litchamp.pro 
     72;  
     73; @param nx {in}{optional}{default=define by grille.pro} 
     74; 
     75; @param ny {in}{optional}{default=define by grille.pro} 
     76; 
     77; @param nz {in}{optional}{default=define by grille.pro} 
     78; 
     79; @param firstx {in}{optional}{default=define by grille.pro} 
     80; 
     81; @param firsty {in}{optional}{default=define by grille.pro} 
     82; 
     83; @param firstz {in}{optional}{default=define by grille.pro} 
     84; 
     85; @param lastx {in}{optional}{default=define by grille.pro} 
     86; 
     87; @param lasty {in}{optional}{default=define by grille.pro} 
     88; 
     89; @param lastz {in}{optional}{default=define by grille.pro} 
     90; 
     91; @keyword WDEPTH To specify that we are at W level 
     92; 
     93; @returns an array with dimensions matching the domain 
     94;          or -1 if there is an error... 
     95; 
     96; @uses cm_4mesh 
     97; @uses cm_4cal 
     98; 
     99; @examples IDL> help, fitintobox(findgen(jpi,jpj)) 
     100;           <Expression>    FLOAT     = Array[41, 3] 
     101;           IDL> help, fitintobox(findgen(jpi,jpj,78)) 
     102;        Error:  
     103;           the array dimensions [180,148,78] are incompatible 
     104;           with the the domain dimensions  
     105;           [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 
     106;           <Expression>    INT       =       -1 
     107; 
     108; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     109;          10 juin 2000. 
     110;          June 2005: S. Masson rewrite all. 
     111; 
     112; @version $Id$ 
     113;- 
    76114;------------------------------------------------------------ 
    77115FUNCTION fitintobox, field, nx, ny, nz, firstx, firsty $ 
  • trunk/SRC/Utilities/linearequation.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME: linearequation 
    65; 
    7 ; PURPOSE:calcule une equation de droite du type ax+by+c=0 a partir 
    8 ; des coordonnees de 2 points. Rq: on peut avoir un tableau de couple 
    9 ; de points. 
     6; @file_comments  
     7; Calculate a linear equation of the type ax+by+c=0 
     8; thanks to coordinates of 2 points. 
     9; comment: we can have a table with pairs of points. 
    1010; 
    11 ; CATEGORY:petit truc qui peut etre utile (sans boucles, ca va de soit!) 
     11; @categories utilities 
     12;  
     13; @param point1 {in}{required} This is the first point of(the) straight  
     14; line(s) whose we want to calculate equation(s) 
    1215; 
    13 ; CALLING SEQUENCE:abc=linearequation(point1, point2) 
    14 ;  
    15 ; INPUTS: point1 et point2 dont deux point de(s) la droite(s) dont on 
    16 ; veut calculer l(es) equations(s). 
    17 ; deux possibilites sont possibles: 
    18 ;      1) point est un complexe ou un tableau de complexes, ou chaque 
    19 ;      element du complexe est les coordonnees du point 
    20 ;      2) points est un tableau de reels de dimensions 2 
    21 ;      ,nbre_de_droite. ou pour chaque ligne du tableau on a les 
    22 ;      coordonnees du point. 
     16; @param point2 {in}{required} This is the second point of(the) straight  
     17; line(s) whose we want to calculate equation(s) 
    2318; 
    24 ; KEYWORD PARAMETERS: 
     19;    There is 2 possibilities: 
     20;      1) point is a complex or a table ofcomplex, where each element is the coordinates of the point. 
     21;      2) point is a table of real of dimension 2,number_of_straight_line. 
     22;         For each row of the table, we have coordinates of the point. 
    2523; 
    26 ; OUTPUTS:abc c''est un tableau de dimensions 3, nbre_de_droite, ou 
    27 ; pour chaque ligne du tableau on obtient les 3 parametres a, b, c de 
    28 ; l'equation de la droite ax+by+c=0 
     24; @returns abc is a table of dimension 3, number_of_straight_line,  
     25;          where for each lign of the table we obtain the 3 parameters 
     26;          a, b and c of the linear equation ax+by+c=0 
    2927; 
    30 ; COMMON BLOCKS: 
     28; @examples IDL> abc=linearequation(complex(1,2),[3,4]) 
     29;           IDL> print, abc[0]*1+abc[1]*2+abc[2] 
     30;           0.00000 
    3131; 
    32 ; SIDE EFFECTS: 
     32; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     33;          10 juin 2000 
    3334; 
    34 ; RESTRICTIONS: 
     35; @version $Id$ 
    3536; 
    36 ; EXAMPLE: 
    37 ;    IDL> abc=linearequation(complex(1,2),[3,4]) 
    38 ;    IDL> print, abc[0]*1+abc[1]*2+abc[2] 
    39 ;          0.00000 
    40 ; 
    41 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    42 ;                       10 juin 2000 
    4337;- 
    4438;------------------------------------------------------------ 
  • trunk/SRC/Utilities/lineintersection.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME: lineintersection 
    65; 
    7 ; PURPOSE: Calcule les coordonnees de l''intersection de 2 droites ou 
    8 ; d''une serie de 2 droites 
     6; @file_comments  
     7; Calculate coordinates of the intersection between 2 straight lines  
     8; or of a succession of 2 straight lines. 
    99; 
    10 ; CATEGORY:petit truc qui peut etre utile (sans boucles, ca va de soit!) 
     10; @categories utilities 
     11;  
     12; @param abc1 {in}{required} is the first table of dimension 3, number_of_pairs_of_straight_lines,  
     13;         whose each line contain the 3 parameters a,b and c of the first linear  
     14;         equation of the type ax+by+c=0 
    1115; 
    12 ; CALLING SEQUENCE: point=lineintersection(abc1, abc2) 
    13 ;  
    14 ; INPUTS: abc est un tableau de dimensions 3, 
    15 ; nbre_de_couple_de_droites, dont chaque ligne contient les 3 
    16 ; parametres a, b, c de l''equation de droite du type ax+by+c=0 
     16; @param abc2 {in}{required} is second table of dimension 3, number_of_pairs_of_straight_lines,  
     17;         whose each line contain the 3 parameters a,b and c of the second linear  
     18;         equation of the type ax+by+c=0 
    1719; 
    18 ; KEYWORD PARAMETERS: 
    19 ;       /FLOAT: pour retourner l''output sous forme de tableau de 
    20 ;       reel plutot que de vecteur decomplexes (par defaut) 
     20; @keyword FLOAT To return the output as a table of real numbers instead of vectors of complex (by default) 
    2121; 
    22 ; OUTPUTS:2 possibilites: 
    23 ;      1) par defaut: c''est une vecteur de complexe dont chaque 
    24 ;      element est les coordonnees du point d''intersection d''un 
    25 ;      couple de droites. 
    26 ;      2) si /FLOAT est active, c'est un tableau de reels de 
    27 ;      dimensiones 2, nbre_de_couple_de_droites dont chaque 
    28 ;      ligne est les coordonnees du point d''intersection d''un 
    29 ;      couple de droites 
     22; @returns 2 possibilities: 
     23;      1) by default: it is a vector of complex whose each element is the coordinates  
     24;                     of the intersection point of a pair of straight lines. 
     25;      2) if FLOAT is activated, it is a table of reals of dimension 2,  
     26;         number_of_pairs_of_straight_lines whose each row is the coordinates  
     27;         of the intersection point of a pair of straight line. 
    3028; 
    31 ; COMMON BLOCKS: 
     29; @restrictions If the 2 straight line are parallel, we return coordinates (!values.f_nan,!values.f_nan) 
    3230; 
    33 ; SIDE EFFECTS:si les deux droites dont paralleles, on retourne les 
    34 ; coordonnes (!values.f_nan,!values.f_nan) 
     31; @restrictions Beware of the precision of the machine which make  
     32;               that calculated coordinates may not exactly verify  
     33;               equations of the pair of straight lines. 
    3534; 
    36 ; RESTRICTIONS:attention a la precision de la machine qui fait que 
    37 ; les coordonnees calcules de verifient peut-etre pas exactement les 
    38 ; equations du couple de droites. 
     35; @examples IDL> abc1=linearequation(complex(1,2),[3,4]) 
     36;           IDL> abc2=linearequation(complex(1,2),[8,15]) 
     37;           IDL> print, lineintersection(abc1, abc2) 
     38;           (      1.00000,      2.00000) 
     39;           IDL> print, lineintersection(abc1, abc2,/float) 
     40;                 1.00000      2.00000 
    3941; 
    40 ; EXAMPLE: 
    41 ;     IDL> abc1=linearequation(complex(1,2),[3,4]) 
    42 ;     IDL> abc2=linearequation(complex(1,2),[8,15]) 
    43 ;     IDL> print, lineintersection(abc1, abc2) 
    44 ;     (      1.00000,      2.00000) 
    45 ;     IDL> print, lineintersection(abc1, abc2,/float) 
    46 ;           1.00000      2.00000 
     42; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     43;          10 juin 2000 
    4744; 
    48 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    49 ;                      10 juin 2000 
     45; @version $Id$ 
     46; 
    5047;- 
    5148;------------------------------------------------------------ 
  • trunk/SRC/Utilities/pwd.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:pwd 
    65; 
    7 ; PURPOSE:print the current directory 
     6; @file_comments  
     7; print the current directory 
    88; 
    9 ; CATEGORY:like unix function 
     9; @categories like unix function 
     10;  
     11; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    1012; 
    11 ; CALLING SEQUENCE:pwd 
    12 ;  
    13 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     13; @version $Id$ 
    1414; 
    1515;- 
  • trunk/SRC/Utilities/report.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:report 
    65; 
    7 ; PURPOSE: comme dialog_message.pro si il y a deja des widgets actives 
    8 ; ou comme message.pro si il n''y a pas de widgets actives. pour poser 
    9 ; des question dont la reponse n''est pas oui/non utiliser xquestion 
     6; @file_comments  
     7; Like dialog_message.pro if there is already some widget  
     8; active or like message.pro if there is not any widget active.  
     9; To ask a question whose answer is not yes/no,use xquestion. 
    1010; 
    11 ; CATEGORY: 
    12 ; 
    13 ; CALLING SEQUENCE:res = report(text) 
    14 ;  
    15 ; INPUTS: text: un string on un vecteur de string. Si le string ne 
     11; @param text {in}{required} un string on un vecteur de string. Si le string ne 
    1612; comporte qu''un element, on cherche les eventuels characteres de 
    1713; retour a la ligne: '!C'. If text is set to an array of strings, each 
    1814; array element is displayed as a separate line of text. 
    1915; 
    20 ; KEYWORD PARAMETERS:  
    21 ;         SIMPLE: activate to print only the message without the name 
     16; @keyword SIMPLE activate to print only the message without the name 
    2217;             and the line of the routine (defined by calling routine_name) 
    2318; 
    24 ; ceux dialog_message.pro et message.pro avec en + 
    25 ; PARENT qui fait la meme chose que DIALOG_PARENT de dialog_message.pro 
     19; @keyword _extra used to pass keywords from dialog_message.pro and message.pro 
    2620; 
    27 ; OUTPUTS: -1 si le mot cle QUESTION n''est pas activer 
    28 ;          si le mot cle est active la fonction retourne 1 pour yes et 
    29 ;          0 pour no. 
     21; @keyword PARENT same as DIALOG_PARENT de dialog_message.pro 
    3022; 
    31 ; COMMON BLOCKS: 
     23; @keyword QUESTION Set this keyword to create a "Question" dialog. 
     24;                   The default dialog type is "Warning" 
    3225; 
    33 ; SIDE EFFECTS: 
     26; @keyword DEFAULT_NO Set this keyword to make the "No" button the default  
     27;                     selection for "Question" dialog. Normally, the default is yes. 
    3428; 
    35 ; RESTRICTIONS: 
     29; @keyword SIMPLE Activate to print the error message without printing  
     30;                 the routine name with its full path. 
    3631; 
    37 ; EXAMPLE: 
     32; @returns -1 if the keyword QUESTION is not activated 
     33;          If the keyword is activated, return 1 for yes and 0 for no. 
    3834;  
    39 ; si aucun widget n''est active: 
     35; @example If there is not any widget activated: 
    4036; 
    4137;     IDL> help, report('toto tata') 
    4238;     % $MAIN$: toto tata 
    4339;     <Expression>    INT       =       -1 
    44 ;     IDL> help, report('ca marche ?',/question) 
    45 ;     ca marche ? y/n (default answer is y) 
     40;     IDL> help, report('does it works ?',/question) 
     41;     does it works ? y/n (default answer is y) 
    4642;     <Expression>    BYTE      =    1 
    47 ;     IDL> help, report('question1: !C ca marche ?',/question) 
     43;     IDL> help, report('question1: !C does it works ?',/question) 
    4844;     question1: 
    49 ;     ca marche ? y/n (default answer is y) 
     45;     does it works ? y/n (default answer is y) 
    5046;     <Expression>    BYTE      =    1 
    5147; 
    52 ; si des widgets sont deja actives, c''est la meme chose mais avec des 
    53 ; widgets! 
     48; If widgets are already activated, it is the same thing but with widgets! 
    5449; 
    55 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     50; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    5651;                      21/10/1999 
     52; 
     53; @version $ID$ 
     54; 
    5755;- 
    5856;------------------------------------------------------------ 
     
    6361  compile_opt idl2, strictarrsubs 
    6462; 
    65    res = -1                     ; 
    66 ; on separe le texte en differentes lignes (separees par !C) si ce 
    67 ; n''est pas deja fait... 
     63  res = -1                      ; 
     64; we separate the text in different lines (separated by !C) if it is not already done... 
    6865   if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim) 
    69 ; il y a des widgets actifs, c''est facile on appelle dialog_massage 
     66; there is some widgets activated, it is easy, we call dialog_massage 
    7067   if (widget_info(/managed))[0] NE 0 then BEGIN 
    7168      res = dialog_message(text, dialog_parent = parent, QUESTION = question $ 
     
    7370      if keyword_set(question) THEN res = res EQ 'Yes' ELSE res = -1 
    7471   ENDIF ELSE BEGIN 
    75 ; aucun widget n''est actif 
    76 ; on pose une question ? 
     72; there is not any widget activated 
     73; do we ask a question ? 
    7774      if keyword_set(question) then BEGIN 
    78 ; quelle est la reponse par defaut ? 
     75; what i sthe answer by default ? 
    7976         if keyword_set(default_no) then answer = 'n' ELSE answer = 'y' 
    8077         default_answer = answer 
     
    8380         read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer 
    8481         answer = strlowcase(answer) ; 
    85 ; si la reponse ne convient pas 
     82; if the answer is not appropriated 
    8683         while answer NE '' and answer NE 'y' and answer NE 'n' do begin 
    8784            read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer 
    8885            answer = strlowcase(answer) 
    8986         ENDWHILE               ; 
    90 ; on ajuste res en fonction de la reponse 
     87; we adjust res in function of th answer 
    9188         case answer of 
    9289            '':res = default_answer EQ 'y' 
     
    9592         endcase 
    9693      endif ELSE BEGIN 
    97 ; si on ne pose pas de question on fait juste un print 
     94; If we do not ask any question, we just make a print 
    9895        IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': ' 
    9996         if n_elements(text) GT 1 THEN $ 
  • trunk/SRC/Utilities/routine_name.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:routine_name,remonte 
    65; 
    7 ; PURPOSE:retourne le nom de la routine (procedure ou function) ds 
    8 ; lequel on se trouve 
     6; @file_comments  
     7; Give us the name of the routine (procedure or function) where we are. 
    98; 
    10 ; CATEGORY:utilitaire 
     9; @categories utilities 
     10;  
     11; @param pilingnum {in}{optional} A whole number which give us how many level we have to reascend  
     12;                in the piling up of routines and subroutines to find the looked for routine. 
    1113; 
    12 ; CALLING SEQUENCE:res=routine_name([remonte]) 
    13 ;  
    14 ; INPUTS: remonte: un entier qui donne de combien de niveau on doit 
    15 ; remonter ds l''empillement des routines ewt sous-routines pour 
    16 ; retrouver le nom de la routine cherchee 
    1714; 
    18 ; KEYWORD PARAMETERS: 
     15; @returns a string giving either the full name of the routine (with the path) or '$MAIN$' 
    1916; 
    20 ; OUTPUTS:un string donnant soit le nom de la routine en entier (avec 
    21 ; le path) soit '$MAIN$' 
     17; @restriction This function use the keyword OUTPUT in help.pro and it is specified  
     18;              in the online help that the return syntax of this word can change in  
     19;              function of the version of the code. This version works with IDL 5.2. 
    2220; 
    23 ; COMMON BLOCKS: 
    24 ; 
    25 ; SIDE EFFECTS: 
    26 ; 
    27 ; RESTRICTIONS: 
    28 ;   cette fonction utilise le mot cle OUTPUT ds help.pro et il est 
    29 ;   specifie ds l''aide en ligne que la syntaxe du retour de ce mot cle 
    30 ;   peut changer suivant la version du code. Cette version marche avec 
    31 ;   IDL 5.2 
    32 ; 
    33 ; EXAMPLE: 
    34 ; 
    35 ;  IDL> print, routine_name() 
     21; @example IDL> print, routine_name() 
    3622;  /usr1/com/smasson/IDL_RD/UTILITAIRE/report.pro 
    3723;  IDL> print, routine_name(1) 
     
    4430;  $MAIN$ 
    4531; 
    46 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     32; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    4733;                      21/10/1999 
     34; 
     35; @version $Id$ 
     36; 
    4837;- 
    4938;------------------------------------------------------------ 
    5039;------------------------------------------------------------ 
    5140;------------------------------------------------------------ 
    52 FUNCTION routine_name,  remonte 
     41FUNCTION routine_name,  pilingnum 
    5342; 
    5443; 
     
    5645; 
    5746  help,  /traceback, output = name 
    58   name = strtrim(name, 1)     ; on enleve les blancs en debut de ligne 
    59 ; on va mettre les elements du vecteur bout a bout pour former un 
    60 ; unique sring 
     47  name = strtrim(name, 1)       ; we remove blanks at the beginning of lines and  
     48;                               we put elements of the vector stuck ones with  
     49;                               each others to make an unique string. 
    6150  allnames = '' 
    6251  for i = 0, n_elements(name)-1 do allnames = allnames+name[i] 
    6352; 
    64   name = str_sep(allnames, '%') ; on le redecoupe  
    65   name = strtrim(name, 2)     ; on eleve les blancs devant et derriere 
    66   name = strcompress(name)      ; on compresse les blancs 
    67 ; on ne retient pas les 2 premiers elements qui sont 1  un vide et la 
    68 ; ligne concernant routine_name  
     53  name = str_sep(allnames, '%') ; we cut it out again.  
     54  name = strtrim(name, 2)     ; we remouve blanks in front of and behind 
     55  name = strcompress(name)      ; we compress blanks 
     56; we do not hold back the two first elements who are a blanck  and the line concerning  
     57; routine_name.  
    6958  name = name[2: n_elements(name)-1] 
    70 ; on choisit la ligne qui nous concerne 
    71   if NOT keyword_set(remonte) then remonte = 0 
    72   if remonte GE n_elements(name) then return,  '$MAIN$' 
    73   name = name[remonte] 
     59; we choose the line which concern us. 
     60  if NOT keyword_set(pilingnum) then pilingnum = 0 
     61  if pilingnum GE n_elements(name) then return,  '$MAIN$' 
     62  name = name[pilingnum] 
    7463  if strpos(name, '$MAIN$') NE -1 then return,  '$MAIN$' 
    7564  name = str_sep(name, ' ') 
  • trunk/SRC/Utilities/testvar.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:testvar 
    65; 
    7 ; PURPOSE:une sorte de keyword_set mais qd la valeur existe renvoie 
    8 ; celle-ci 
     6; @file_comments  
     7; A  kind of keyword_set but when the value exist, it send it back 
    98; 
    10 ; CATEGORY:comme keyword_set 
     9; @categories utlities 
    1110; 
    12 ; CALLING SEQUENCE:res=testvar(var=variable) 
    13 ;  
    14 ; INPUTS:rien 
     11; @keyword var any kind of 
    1512; 
    16 ; KEYWORD PARAMETERS:var : n''importe quoi 
     13; @returns 0 if the variable does not exist  
    1714; 
    18 ; OUTPUTS:0 si la variable n''existe pas  
    19 ; 
    20 ; COMMON BLOCKS: 
    21 ; 
    22 ; SIDE EFFECTS: 
    23 ; 
    24 ; RESTRICTIONS: 
    25 ; 
    26 ; EXAMPLE: 
    27 ; 
    28 ;    IDL> print, testvar(var=toto) 
     15; @examples IDL> print, testvar(var=toto) 
    2916;           0 
    3017;    IDL> print, testvar(var='toto') 
    3118;    toto 
    3219; 
    33 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     20; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    3421;                      14/12/1999 
     22; 
     23; @version $Id$ 
     24; 
    3525;- 
    3626;------------------------------------------------------------ 
  • trunk/SRC/Utilities/text_box.pro

    r132 r133  
    11;+ 
    2 ; Name        : text_box 
    32; 
    4 ; Purpose     : Writes a text message within a box in a graphics window. 
     3; @file_comments  
     4; This procedure writes a short text message within a box-shaped 
     5; area in a graphics window.  The message may be split at word 
     6; boundaries into several lines, and the character size and 
     7 ;orientation may be adjusted for the text to fit within the box. 
     8;    
     9; @param TEXT {in}{required} ASCII text string containing the message. 
    510; 
    6 ; Description:  This procedure writes a short text message within a box-shaped 
    7 ;               area in a graphics window.  The message may be split at word 
    8 ;               boundaries into several lines, and the character size and 
    9 ;               orientation may be adjusted for the text to fit within the box. 
    10 ; 
    11 ; Useage:       text_box,text,pos=pos,color=color,$ 
    12 ;                    justify=justify,vert_space=vert_space 
    13 ; 
    14 ; Inputs       
    15 ; TEXT          ASCII text string containing the message. 
    16 ; 
    17 ; keywords 
    18 ;  pos          4 element vector specifying the box position and size 
     11; @keyword pos  4 element vector specifying the box position and size 
    1912;               pos[0],pos[1] specify the lower left corner coordinate 
    2013;               pos[2],pos[3] specify the upper right corner coordinate 
    2114;               data window normalized coordinates are use 
    2215; 
    23 ;   fg_color    color of box and legend titles (default=0) 
     16; @keyword fg_color color of box and legend titles (default=0) 
    2417; 
    25 ;   bg_color    background color. Setting BG_COLOR erases the area  
     18; @keyword bg_color background color. Setting BG_COLOR erases the area  
    2619;               covered by the text box (filling it with color BG_COLOR) 
    2720;               prior to writing the text.  If both BG_COLOR and !p.color 
     
    2922;               gaurantee a readability. 
    3023;                
    31 ;  right        if set, right justify text 
    32 ;  center       if set, center the text 
     24; @keyword right if set, right justify text 
    3325; 
    34 ;  vert_space   vertical spacing of lines in units of character height  
    35 ;               (default = 1.5) 
     26; @keyword center if set, center the text 
    3627; 
     28; @keyword vert_space {default=1.5}vertical spacing of lines in units of character height 
    3729; 
    38 ;  author:  Paul Ricchiazzi                            7Jul93 
     30; @keyword _EXTRA used to pass your keyword 
     31; 
     32; @keyword box activate to show the box on graphics window. 
     33; 
     34; @history  Paul Ricchiazzi                            7Jul93 
    3935;           Institute for Computational Earth System Science 
    4036;           University of California, Santa Barbara 
     37; 
     38; @version $Id$ 
     39; 
    4140;- 
    4241PRO text_box,text,pos=pos,fg_color=fg_color,bg_color=bg_color,$ 
  • trunk/SRC/Utilities/undefine.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME: undefine 
    65; 
    7 ; PURPOSE: effacer une variable 
    8 ;           meme chose que delvar mais utiulisable ds un programme et 
    9 ;           utilisable que pour une variable a la fois 
     6; @file_comments  
     7; erase a variable 
     8; same thing that delvar but usable in a program and usable  
     9; for one variable simultaneously 
    1010; 
    11 ; CATEGORY:  
     11; @categories utilities   
     12;  
     13; @param varname {in}{required} The name of the variable we want erase 
    1214; 
    13 ; CALLING SEQUENCE: UNDEFINE, varname   
    14 ;  
    15 ; INPUTS: varname: la variable a detruire 
     15; @example IDL> a=1 
     16;          IDL> undefine,a 
     17;          % Compiled module: UNDEFINE. 
     18;          IDL> help, a 
     19;          A               UNDEFINED = <Undefined> 
    1620; 
    17 ; EXAMPLE: 
    18 ; 
    19 ;    IDL> a=1 
    20 ;    IDL> undefine,a 
    21 ;    % Compiled module: UNDEFINE. 
    22 ;    IDL> help, a 
    23 ;    A               UNDEFINED = <Undefined> 
    24 ; 
    25 ; MODIFICATION HISTORY: trouve sur la page web de D.Fanning  
     21; @history trouve sur la page web de D.Fanning  
    2622; http://www.dfanning.com : 
    2723;QUESTION: How do I make an IDL variable have a type "undefined"?  
  • trunk/SRC/Utilities/xfile.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME: xfile 
    65; 
    7 ; PURPOSE: affiche ds un widget un fichier ASCII. 
    8 ;          c''est la meme chose que xdisplaydife mais ici on l''utilise pour 
    9 ;          visualiser le contenu d''une procedure ou d''une fonction 
    10 ;          meme si elle n''est pas ds le repertoire courant (grace a !path) 
     6; @file_comments  
     7; display in a widget an ASCII file. 
     8; It is the same thing that xdisplaydife but here, we use it  
     9; to display the content of a procedure or of a function,  
     10; even if it is not in the current directory (thanks to the path). 
    1111; 
    12 ; CATEGORY: help 
     12; @categories utilities 
    1313; 
    14 ; CALLING SEQUENCE: xfile,'nom_fichier' 
     14; @param filename {in}{required} It is the name of the procedure or of the function  
     15;                    we want to display (with or without .pro at the end). 
    1516; 
    16 ; INPUTS: 
    17 ;        nom_fichier:le nom d''une procedure ou d''une fonction a 
    18 ;        visualiser avec ou sans le .pro a la fin 
     17; @keyword _extra used to pass your keywords 
    1918; 
    20 ; KEYWORD PARAMETERS:ceux de xdisplayfile 
     19; @examples xfile,'plt' 
    2120; 
    22 ; EXAMPLE:xfile,'plt' 
    23 ; 
    24 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 
     21; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    2522;                       7/1/99 
    2623;                       6/7/1999: compatibilite mac et windows 
     24; 
     25; @version $Id$ 
     26; 
    2727;- 
    2828;------------------------------------------------------------ 
     
    3535pfile = strlowcase(filename) 
    3636; 
    37 ; il faut trouver le nom complet  
     37; we have to find the full name.  
    3838; 
    3939   if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro"  
     
    5757   endrep until res[0] NE '' OR i EQ n_elements(pfile)  
    5858   if res[0] NE  '' then BEGIN 
    59 ; on ouvre le fichier ds un widget 
     59; we open the file in a widget 
    6060   xdisplayfile, pfile[i-1], _extra = ex 
    6161   ENDIF ELSE ras = report('le fichier demande n''existe pas...') 
  • trunk/SRC/Utilities/xhelp.pro

    r132 r133  
    11;+ 
    2 ; NAME:  
    3 ;       xhelp 
    42; 
    5 ; PURPOSE: 
    6 ;       Display an IDL procedure header using widgets and the widget manager. 
     3; @file_comments  
     4; Display an IDL procedure header using widgets and the widget manager. 
    75; 
    8 ; CATEGORY: 
    9 ;       Widgets. 
     6; @categories Widgets. 
    107; 
    11 ; CALLING SEQUENCE: 
    12 ;       xhelp, Filename,_extra=ex 
    13 ; 
    14 ; INPUTS: 
    15 ;     Filename: A scalar string that contains the filename of the file 
     8; @param Filename {in}{required} A scalar string that contains the filename of the file 
    169;               to display.  If FILENAME does not include a complete path 
    1710;               specification, xhelp will search for the file in 
     
    2013;               ".pro" file suffix will be appended if it is not supplied. 
    2114; 
    22 ; KEYWORD PARAMETERS: 
    23 ;       Ceux de xdisplayfile 
     15; @keyword _extra used to pass your keywords 
    2416; 
    25 ; OUTPUTS: 
    26 ;       No explicit outputs.  A file viewing widget is created. 
     17; @restrictions Triggers the XMANAGER if it is not already in use. 
    2718; 
    28 ; SIDE EFFECTS: 
    29 ;       Triggers the XMANAGER if it is not already in use. 
     19; @examples Open a file and create a widget to display its contents. 
    3020; 
    31 ; RESTRICTIONS: 
    32 ;       None. 
    33 ; 
    34 ; PROCEDURE: 
    35 ;       Open a file and create a widget to display its contents. 
    36 ; 
    37 ; MODIFICATION HISTORY: 
    38 ;       Written By Steve Richards, December 1990 
     21; @history Written By Steve Richards, December 1990 
    3922;       Graceful error recovery, DMS, Feb, 1992. 
    4023;       Modified to extract .pro documentation headers, PJR/ESRG mar94 
    41 ; 
    42 ;  author:  Paul Ricchiazzi                            jun93 
    43 ;           Institute for Computational Earth System Science 
    44 ;           University of California, Santa Barbara 
    45 ; 
     24;       Paul Ricchiazzi                            jun93 
     25;       Institute for Computational Earth System Science 
     26;       University of California, Santa Barbara 
    4627;  7/1/99 : legeres mofification par Sebastien Masson : utilisation de 
    4728;  xdisplayfile, de findfile et de _extra. 
    4829;  6/7/1999: compatibilite mac et windows 
     30; 
     31; @version $Id$ 
     32; 
    4933;- 
    5034PRO xhelp, filename, _extra=ex 
     
    5337; 
    5438 
    55 ; filename est bien un string? 
     39; Are we sure filename is a string? 
    5640   cquoidonc = size(filename, /type) 
    5741   if cquoidonc NE 7 then begin 
     
    5943      return 
    6044   endif 
    61 ; il faut trouver le nom complet  
     45; We have to find the full name  
    6246   pfile=FILENAME 
    6347   if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro"  
     
    7559      pfile = [current, multipath]+ pfile 
    7660   ENDIF 
    77 ; on test tous les noms possibles pour trouver ou est le fichier 
     61; We test each possile name to find where the file is. 
    7862   nfile=n_elements(pfile) 
    7963   n = 0 
     
    8367   endrep until res[0] NE '' OR n EQ n_elements(pfile)  
    8468   if res[0] NE '' then BEGIN 
    85       openr, unit,pfile[n-1], /get_lun ; ouverture du fichier 
    86 ; on selectionne le morceaux en-tete      
     69      openr, unit,pfile[n-1], /get_lun ; opening of the file 
     70; we select the heading piece      
    8771      a = strarr(1000)          ;Maximum # of lines 
    8872      xsize=0 
     
    10488         ras = report('le programme a etait mal ecrit, il n''y a pas d''en-tete... utiliser xfile.pro.') ELSE BEGIN  
    10589         a = a[0:i-1] 
    106 ; on ecrit le contenu de a ds un widget 
     90; we wrote the a's content in a widget 
    10791         xdisplayfile,'toto',text = a,title=pfile[n-1], _extra = ex 
    10892      ENDELSE  
Note: See TracChangeset for help on using the changeset viewer.