Ignore:
Timestamp:
07/21/06 14:47:49 (18 years ago)
Author:
navarro
Message:

english and nicer header (2a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/LECTURE/litchamp.pro

    r134 r142  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:litchamp 
    65; 
    7 ; PURPOSE:permet de lire un simple tableau ou une structure 
    8 ; correspondant a un champ. 
    9 ; Si en entree on a : 
    10 ;   -un simple tableau, litchamp renvoie le tableau 
    11 ;   -une stucture, litchamp renvoie le premier element de la structure 
    12 ;   qui doit obligatoirement etre le champ sous forme d''un tableau. 
    13 ;   Au passage litchamp regarde les autres elements de la structure et 
    14 ;   met a jour si besoin les variables globales qui se rapportent au 
    15 ;   champ: vargrid, varname, varunit, vardate, varexp , valmask et time  
     6; @file_comments 
     7; Allows to read an array or a sructure cooresponding to a field. 
     8; If we have in input:  
     9;   -an array, litchamp send back the array. 
     10;   -a structure, litchamp send back the first element of the structure  
     11;   which must be the field in an array. 
     12;   Litchamp profit of this to look other elements of the structure et 
     13;   update if needed global variables which refer to the field: 
     14;   vargrid, varname, varunit, vardate, varexp , valmask et time  
    1615; 
    17 ; CATEGORY:permet d''appeler plt, pltz, pltt ... avec un tableau ou une 
    18 ; structure et de mettre a jour les variables globales liees au champ.  
     16; @categories 
     17; graphic 
    1918; 
    20 ; CALLING SEQUENCE:res=litchamp(struct) 
     19; @param STRUCT {in}{required} 
     20; It is either an array or a structure. 
     21;  If STRUCT is a structure, it must follow following rules: 
     22;        -the first element is the array containing the field. 
     23;        -other elements are strings containing informations on the field exept 
     24;        for the one about the date. This one can be either a string to designate 
     25;        a particular date (ex: 'August 1999') or a vector of julian days (of IDL) 
     26;        corresponding  to the calendar to be associated with the field if it is a 
     27;        temporal series. 
     28;        -the order of elements (exept the first) has not any importance.  
     29;        -the other elements (exept the first) are optional. 
     30;        -they are recognize by the first letter of their names: 
     31;             g  to update vargrid 
     32;             u  to update varunit 
     33;             e  to update varexp 
     34;             d  to update vardate 
     35;             n  to update varname 
     36;             m  to update valmask 
    2137; 
    22 ; INPUTS: 
    23 ;        struct: c''est soit un tableau soit une structure. 
    24 ;    Si struct est une structure, elle doit suivre les regles 
    25 ;    suivantes: 
    26 ;        -le premier element est le tableau contenant le champ. 
    27 ;        -les autres elements sont des strings qui contiennent des 
    28 ;        informations sur le champ SAUF pour l''element relatif a 
    29 ;        date. Ce dernier peut etre soit un string pour designer une date 
    30 ;        particuliere (ex: 'August 1999') ou bien un vecteur de jours 
    31 ;        juliens (d''IDL) correspondant au calendrier a associer au 
    32 ;        champ si c'est une serie temporelle. 
    33 ;        -l''ordre des elements (autre que le premier) n''a pas 
    34 ;        d''importance.  
    35 ;        -les autres elements (autre que le premier) sont tous 
    36 ;        optionnels. 
    37 ;        -ils sont reconnus par la premiere lettre de leur nom: 
    38 ;             g  pour actualiser vargrid 
    39 ;             u  pour actualiser varunit 
    40 ;             e  pour actualiser varexp 
    41 ;             d  pour actualiser vardate 
    42 ;             n  pour actualiser varname 
    43 ;             m  pour actualiser valmask 
     38; @keyword GRID 
     39; We activate this keyword if we want litchamp to send back the variable  
     40; associated with the element of the structure starting by 'g' if it exist  
     41; and '' if it does not. 
    4442; 
    45 ; KEYWORD PARAMETERS: 
     43; @keyword UNIT 
     44; We activate this keyword if we want litchamp to send back the variable  
     45; associated with the element of the structure starting by 'u' if it exist  
     46; and '' if it does not. 
    4647; 
    47 ;        /GRID: activer ce mot cle si on veut que litchamp renvoie la 
    48 ;        variable associee a l''element de la structure commencant 
    49 ;        par 'g' si il existe et '' dans le cas contraire. 
     48; @keyword EXP 
     49; We activate this keyword if we want litchamp to send back the variable  
     50; associated with the element of the structure starting by 'u' if it exist  
     51; and '' if it does not. 
    5052; 
    51 ;        /UNIT: activer ce mot cle si on veut que litchamp renvoie la 
    52 ;        variable associee a l''element de la structure commencant 
    53 ;        par 'u' si il existe et '' dans le cas contraire. 
     53; @keyword DATE 
     54; We activate this keyword if we want litchamp to send back the variable  
     55; associated with the element of the structure starting by 'd' if it exist  
     56; and '' if it does not. 
    5457; 
    55 ;        /EXP: activer ce mot cle si on veut que litchamp renvoie la 
    56 ;        variable associee a l''element de la structure commencant 
    57 ;        par 'e' si il existe et '' dans le cas contraire. 
     58; @keyword NAME 
     59; We activate this keyword if we want litchamp to send back the variable  
     60; associated with the element of the structure starting by 'n' if it exist  
     61; and '' if it does not. 
    5862; 
    59 ;        /DATE: activer ce mot cle si on veut que litchamp renvoie la 
    60 ;        variable associee a l''element de la structure commencant 
    61 ;        par 'd' si il existe et '' dans le cas contraire. 
     63; @keyword LEVEL 
     64; We activate this keyword if we want litchamp to send back the variable  
     65; associated with the element of the structure starting by 'l' if it exist  
     66; and -1 if it does not. 
     67;  
    6268; 
    63 ;        /NAME: activer ce mot cle si on veut que litchamp renvoie la 
    64 ;        variable associee a l''element de la structure commencant 
    65 ;        par 'n' si il existe et '' dans le cas contraire. 
     69; @keyword MASK 
     70; We activate this keyword if we want litchamp to send back the variable  
     71; associated with the element of the structure starting by 'm' if it exist  
     72; and -1 if it does not. 
    6673; 
    67 ;        /LEVEL: activer ce mot cle si on veut que litchamp renvoie la 
    68 ;        variable associee a l''element de la structure commencant 
    69 ;        par 'l' si il existe et -1 dans le cas contraire. 
     74; @returns 
     75; It is the array containing the field. 
    7076; 
    71 ;        /MASK: activer ce mot cle si on veut que litchamp renvoie la 
    72 ;        variable associee a l''element de la structure commencant 
    73 ;        par 'm' si il existe et -1 dans le cas contraire. 
     77; @uses 
     78; common.pro 
    7479; 
    75 ; OUTPUTS:c''est le tableau qui continent le champ. 
     80; @restrictions 
     81; Update if needed global variables vargrid, 
     82; varname, varunit, vardate, varexp, valmask and time. 
    7683; 
    77 ; COMMON BLOCKS: 
    78 ;       common.pro 
    79 ; 
    80 ; SIDE EFFECTS: actualise au besion les variables globales vargrid, 
    81 ; varname, varunit, vardate, varexp, valmask et time. 
    82 ; 
    83 ; RESTRICTIONS: 
    84 ; 
    85 ; EXAMPLE: 
     84; @examples 
    8685;      
    8786;    IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp      
     
    9796;  
    9897; 
    99 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 
     98; @history 
     99; Sebastien Masson (smasson@lodyc.jussieu.fr) 
    100100;                       28/5/1999 
     101; 
     102; @version 
     103; $Id$ 
     104; 
    101105;- 
    102106;------------------------------------------------------------ 
     
    110114@common 
    111115;------------------------------------------------------------ 
    112    if size(struct, /type) ne 8 then BEGIN ; alors contour n''est pas une structure 
     116  if size(struct, /type) ne 8 then BEGIN ; so contour is not a structure. 
    113117      if keyword_set(grid) then return, '' 
    114118      if keyword_set(name) then return, '' 
     
    121125   ENDIF   
    122126;------------------------------------------------------------ 
    123    IF n_tags(struct) EQ 1 then BEGIN ; la structure n'a qu''un element 
     127   IF n_tags(struct) EQ 1 then BEGIN ; The structure has only one element. 
    124128      if keyword_set(grid) then return, '' 
    125129      if keyword_set(name) then return, '' 
Note: See TracChangeset for help on using the changeset viewer.