Changeset 136


Ignore:
Timestamp:
07/10/06 17:20:19 (18 years ago)
Author:
pinsard
Message:

some improvements and corrections in some .pro file according to
aspell and idldoc log file

Location:
trunk/SRC
Files:
76 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Calendar/caldat.pro

    r134 r136  
    22; 
    33; @file_comments 
    4 ;       Return the calendar date and time given julian date. 
    5 ;       This is the inverse of the function JULDAY. 
     4; Return the calendar date and time given Julian date. 
     5; This is the inverse of the function JULDAY. 
    66;  
    77; @categories Calendar 
    88; 
    9 ; 
    10 ; @param JULIAN {in}{required} contains the Julian Day Number (which begins at noon) of the 
    11 ;       specified calendar date.  It should be a long integer. 
    12 ; 
    13 ; @param MONTH {out} Number of the desired month (1 = January, ..., 12 = December). 
    14 ; 
    15 ; @param DAY {out} Number of day of the month. 
    16 ; 
    17 ; @param YEAR {out} Number of the desired year. 
    18 ; 
    19 ; @param HOUR {out} Hour of the day 
    20 ; 
    21 ; @param Minute {out} Minute of the day 
    22 ; 
    23 ; @param Second {out} Second (and fractions) of the day. 
    24 ; 
    25 ; 
    26 ; @keyword NDAYSPM {default=30} for using a calendar with fixed number of days per 
    27 ;                months. 
     9; @param JULIAN {in}{required}  
     10; contains the Julian Day Number (which begins at noon) of the 
     11; specified calendar date.  It should be a long integer. 
     12; 
     13; @param MONTH {out}  
     14; Number of the desired month (1 = January, ..., 12 = December). 
     15; 
     16; @param DAY {out}  
     17; Number of day of the month. 
     18; 
     19; @param YEAR {out}  
     20; Number of the desired year. 
     21; 
     22; @param HOUR {out}  
     23; Hour of the day 
     24; 
     25; @param Minute {out}  
     26; Minute of the day 
     27; 
     28; @param Second {out}  
     29; Second (and fractions) of the day. 
     30; 
     31; @keyword NDAYSPM {default=30}  
     32; for using a calendar with fixed number of days per months. 
    2833; 
    2934; @uses cm_4cal 
    3035; 
    31 ; 
    32 ; @restrictions Accuracy using IEEE double precision numbers is approximately 
    33 ;       1/10000th of a second. 
    34 ; 
    35 ; @history Translated from "Numerical Recipies in C", by William H. Press, 
    36 ;       Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 
    37 ;       Cambridge University Press, 1988 (second printing). 
    38 ; 
    39 ;       DMS, July 1992. 
    40 ;       DMS, April 1996, Added HOUR, MINUTE and SECOND keyword 
    41 ;       AB, 7 December 1997, Generalized to handle array input. 
    42 ; 
    43 ;       Eric Guilyardi, June 1999 
    44 ;       Added key_work ndayspm for fixed number of days per months 
    45 ; 
    46 ;       AB, 3 January 2000, Make seconds output as DOUBLE in array output. 
     36; @restrictions  
     37; Accuracy using IEEE double precision numbers is approximately 1/10000th of a  
     38; second. 
     39; 
     40; @history  
     41; Translated from "Numerical Recipes in C", by William H. Press, 
     42; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 
     43; Cambridge University Press, 1988 (second printing). 
     44; 
     45; DMS, July 1992. 
     46; DMS, April 1996, Added HOUR, MINUTE and SECOND keyword 
     47; AB, 7 December 1997, Generalized to handle array input. 
     48; 
     49; Eric Guilyardi, June 1999 
     50; Added key_work ndayspm for fixed number of days per months 
     51; 
     52; AB, 3 January 2000, Make seconds output as DOUBLE in array output. 
    4753; 
    4854; @version $Id$ 
  • trunk/SRC/Calendar/date2jul.pro

    r134 r136  
    55; 
    66; @file_comments  
    7 ; gives julian day equivalent of a date in yyyymmdd format 
     7; gives Julian day equivalent of a date in yyyymmdd format 
    88; 
    99; @categories calendar 
    1010; 
    11 ; @param date {in}{required} date in yyyymmdd format 
     11; @param date {in}{required}  
     12; date in yyyymmdd format 
    1213; 
    1314; @keyword GRADS {in}{optional} 
     
    1516; if 50 <= year <= 99 --> year = 1900 + year 
    1617; 
    17 ; @returns date in julian day 
     18; @returns  
     19; date in Julian day 
    1820; 
    1921; @examples 
  • trunk/SRC/Calendar/date2string.pro

    r134 r136  
    99; @categories calendar, string 
    1010; 
    11 ; @param yyyymmdd {in}{required} the date in the format yyyymmdd 
     11; @param yyyymmdd {in}{required}  
     12; the date in the format yyyymmdd 
    1213; 
    13 ; @file_comments keyword parameters of string function to specify the format of the month (the C format) can be used 
     14; @file_comments  
     15; keyword parameters of string function to specify the format of  
     16; the month (the C format) can be used 
    1417; 
    15 ; @keyword _EXTRA used to pass your keywords to the created procedure. 
     18; @keyword _EXTRA  
     19; used to pass your keywords to the created procedure. 
    1620; 
    17 ; @returns a string containing the date in a easy readable format 
     21; @returns  
     22; a string containing the date in a easy readable format 
    1823; 
    1924; @examples 
  • trunk/SRC/Calendar/daysinmonth.pro

    r134 r136  
    1515; If not provided, we take month and year from "time" common variable. 
    1616; 
    17 ; @returns number of days in a month or -1 in case of error 
     17; @returns  
     18; number of days in a month or -1 in case of error 
    1819; 
    1920; @uses cm_4cal 
     
    2324; 
    2425; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    25 ;                       2/7/98 
     26; 2/7/98 
    2627; update/review/english/new commons: June 2005 Sebastien Masson. 
    2728; 
  • trunk/SRC/Calendar/jul2date.pro

    r134 r136  
    55; 
    66; @file_comments 
    7 ; gives yyyymmdd date equivalent of a julian day 
     7; gives yyyymmdd date equivalent of a Julian day 
    88; 
    99; @categories calendar 
    1010; 
    11 ; @param jday {in}{required} julian day 
     11; @param jday {in}{required}  
     12; Julian day 
    1213; 
    13 ; @returns date in yyyymmdd format 
     14; @returns  
     15; date in yyyymmdd format 
    1416; 
    1517; @examples 
  • trunk/SRC/Calendar/julday.pro

    r134 r136  
    22; 
    33; @file_comments 
    4 ;       Calculate the Julian Day Number for a given month, day, and year. 
    5 ;       This is the inverse of the library function CALDAT. 
    6 ;       See also caldat, the inverse of this function. 
     4; Calculate the Julian Day Number for a given month, day, and year. 
     5; This is the inverse of the library function CALDAT. 
     6; See also caldat, the inverse of this function. 
    77; 
    88; @categories Calendar 
    99; 
    10 ; @param MONTH {in}{required} Number of the desired month (1 = January, ..., 12 = December). Can be scalar or array 
    11 ; 
    12 ; @param DAY {in}{required} Number of day of the month.Can be scalar or array 
    13 ; 
    14 ; @param YEAR {in}{required} Number of the desired year.Year parameters must be valid 
    15 ;               values from the civil calendar.  Years B.C.E. are represented 
    16 ;               as negative integers.  Years in the common era are represented 
    17 ;               as positive integers.  In particular, note that there is no 
    18 ;               year 0 in the civil calendar.  1 B.C.E. (-1) is followed by 
    19 ;               1 C.E. (1). Can be scalar or array 
    20 ; 
    21 ; @param HOUR {in}{optional} Number of the hour of the day. Can be scalar or array 
    22 ; 
    23 ; @param MINUTE {in}{optional} Number of the minute of the hour. Can be scalar or array 
    24 ; 
    25 ; @param SECOND {in}{optional} Number of the second of the minute. Can be scalar or array 
    26 ; 
    27 ; @restrictions The Result will have the same dimensions as the smallest array, or 
    28 ;         will be a scalar if all arguments are scalars. 
     10; @param MONTH {in}{required}  
     11; Number of the desired month (1 = January, ..., 12 = December).  
     12; Can be scalar or array 
     13; 
     14; @param DAY {in}{required}  
     15; Number of day of the month.Can be scalar or array 
     16; 
     17; @param YEARin {in}{required}  
     18; Number of the desired year. Year parameters must be valid 
     19; values from the civil calendar.  Years B.C.E. are represented 
     20; as negative integers.  Years in the common era are represented 
     21; as positive integers.  In particular, note that there is no 
     22; year 0 in the civil calendar.  1 B.C.E. (-1) is followed by 
     23; 1 C.E. (1). Can be scalar or array 
     24; 
     25; @param HOUR {in}{optional}  
     26; Number of the hour of the day. Can be scalar or array 
     27; 
     28; @param MINUTE {in}{optional}  
     29; Number of the minute of the hour. Can be scalar or array 
     30; 
     31; @param SECOND {in}{optional}  
     32; Number of the second of the minute. Can be scalar or array 
     33; 
     34; @restrictions  
     35; The Result will have the same dimensions as the smallest array, or 
     36; will be a scalar if all arguments are scalars. 
    2937;  
    30 ; 
    31 ; @keywords NDAYSPM {default=30} for using a calendar with fixed number of days per 
    32 ;                months. 
    33 ; 
    34 ; @ returns JULDAY: the Julian Day Number (which begins at noon) of the 
    35 ;       specified calendar date.  If Hour, Minute, and Second are not specified, 
    36 ;       then the result will be a long integer, otherwise the result is a 
    37 ;       double precision floating point number. 
     38; @keyword NDAYSPM {default=30}  
     39; for using a calendar with fixed number of days per months. 
     40; 
     41; @returns  
     42; the Julian Day Number (which begins at noon) of the specified calendar date. 
     43; If Hour, Minute, and Second are not specified, then the result will be a  
     44; long integer, otherwise the result is a double precision floating point  
     45; number. 
    3846; 
    3947; @uses cm_4cal 
    4048; 
    41 ; @restrictions Accuracy using IEEE double precision numbers is approximately 
    42 ;   1/10000th of a second, with higher accuracy for smaller (earlier) 
    43 ;   Julian dates. 
    44 ; 
    45 ; @history Translated from "Numerical Recipies in C", by William H. Press, 
    46 ;       Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 
    47 ;       Cambridge University Press, 1988 (second printing). 
    48 ; 
    49 ;       AB, September, 1988 
    50 ;       DMS, April, 1995, Added time of day. 
    51 ; 
    52 ;       Eric Guilyardi, June 1999 
    53 ;       Added key_work ndayspm for fixed number of days per months 
    54 ;       + change to accept year 0 
    55 ; 
    56 ;       Sebastien Masson, Aug. 2003 
    57 ;       fix bug for negative and large values of month values 
    58 ;       eg. julday(349,1,1970) 
    59 ; 
    60 ;   CT, April 2000, Now accepts vectors or scalars. 
     49; @restrictions  
     50; Accuracy using IEEE double precision numbers is approximately 
     51; 1/10000th of a second, with higher accuracy for smaller (earlier) 
     52; Julian dates. 
     53; 
     54; @history Translated from "Numerical Recipes in C", by William H. Press, 
     55; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 
     56; Cambridge University Press, 1988 (second printing). 
     57; 
     58; AB, September, 1988 
     59; DMS, April, 1995, Added time of day. 
     60; 
     61; Eric Guilyardi, June 1999 
     62; Added keyword ndayspm for fixed number of days per months 
     63; + change to accept year 0 
     64; 
     65; Sebastien Masson, Aug. 2003 
     66; fix bug for negative and large values of month values 
     67; eg. julday(349,1,1970) 
     68; 
     69; CT, April 2000, Now accepts vectors or scalars. 
    6170; 
    6271; @version $Id$ 
     
    8493 
    8594 
    86 ; Gregorian Calander was adopted on Oct. 15, 1582 
     95; Gregorian Calender was adopted on Oct. 15, 1582 
    8796; skipping from Oct. 4, 1582 to Oct. 15, 1582 
    8897      GREG = 2299171L           ; incorrect Julian day for Oct. 25, 1582 
     
    151160; change to accept year 0 
    152161; if (MAX(L_YEAR eq 0) NE 0) then message, $ 
    153 ;       'There is no year zero in the civil calendar.' 
     162; 'There is no year zero in the civil calendar.' 
    154163; 
    155164; by seb Aug 2003 
     
    177186      JUL = floor(365.25d * JY) + floor(30.6001d*TEMPORARY(JM)) + L_DAY + 1720995L 
    178187 
    179 ; Test whether to change to Gregorian Calandar. 
     188; Test whether to change to Gregorian Calendar. 
    180189      IF (MIN(JUL) GE GREG) THEN BEGIN ; change all dates 
    181190        JA = long(0.01d * TEMPORARY(JY)) 
     
    197206        eps = (MACHAR(/DOUBLE)).eps 
    198207        eps = eps*ABS(jul) > eps 
    199 ; For Hours, divide by 24, then subtract 0.5, in case we have unsigned ints. 
     208; For Hours, divide by 24, then subtract 0.5, in case we have unsigned integers. 
    200209        jul = TEMPORARY(JUL) + ( (TEMPORARY(d_Hour)/24d - 0.5d) + $ 
    201210                                 TEMPORARY(d_Minute)/1440d + TEMPORARY(d_Second)/86400d + eps ) 
  • trunk/SRC/Calendar/leapyr.pro

    r134 r136  
    99; @categories calendar 
    1010; 
    11 ; @param year {in}{required} year to be tested as a leap year 
     11; @param year {in}{required}  
     12; year to be tested as a leap year 
    1213; 
    13 ; @returns 0 then not a leap year 
    14 ;         1 then year is a leap year 
     14; @returns  
     15; 0 then not a leap year, 1 then year is a leap year 
    1516; 
    1617; @uses cm_4cal 
     
    3233;       This means that year 1800, 1900, 2100, 2200, 2300 and 2500 are 
    3334;       NOT leap years, while year 2000 and 2400 are leap years. 
    34 ;       + supress the automatic change 89 -> 1989 
     35;       + suppress the automatic change 89 -> 1989 
    3536; 
    3637;       June 2005 update for new commons, Sebastien Masson. 
  • trunk/SRC/Calendar/monthname.pro

    r134 r136  
    99; @categories calendar 
    1010; 
    11 ; @param mm1 {in}{required}  the month number (from 1 to 12) 
     11; @param mm1 {in}{required} 
     12; the month number (from 1 to 12) 
    1213; 
    13 ; @keyword _EXTRA used to pass your keywords to the created procedure. 
     14; @keyword _EXTRA  
     15; used to pass your keywords to the created procedure. 
    1416; 
    15 ; @file_comments keyword parameters of string function to specify the format of the month (the C format) can be used. 
     17; @file_comments  
     18; keyword parameters of string function to specify the format of the  
     19; month (the C format) can be used. 
    1620; 
    17 ; @returns the month's name 
     21; @returns  
     22; the month's name 
    1823; 
    1924; @examples 
  • trunk/SRC/Colors/color24.pro

    r134 r136  
    77; @categories Graphics, Color Specification. 
    88; 
    9 ; @param RGB_TRIPLE {in}{required} A three-element column or row array representing  
    10 ;       a color triple. The values of the elements must be between  
    11 ;       0 and 255. 
     9; @param rgb_triple {in}{required}  
     10; A three-element column or row array representing  
     11; a color triple. The values of the elements must be between 0 and 255. 
    1212; 
    13 ; @returns a 24-bit long integer that is equivalent the input color.  
    14 ; The color is 
    15 ; described in terms of a hexidecimal number (e.g., FF206A) 
     13; @returns  
     14; a 24-bit long integer that is equivalent the input color.  
     15; The color is described in terms of a hexadecimal number (e.g., FF206A) 
    1616; where the left two digits represent the blue color, the  
    1717; middle two digits represent the green color, and the right  
    1818; two digits represent the red color. 
    1919; 
    20 ; @examples To convert the color triple for the color YELLOW,  
    21 ;       (255, 255, 0), to the hexadecimal value '00FFFF'x  
    22 ;       or the decimal number 65535, type: 
     20; @examples  
     21; To convert the color triple for the color YELLOW,  
     22; (255, 255, 0), to the hexadecimal value '00FFFF'x  
     23; or the decimal number 65535, type: 
    2324; 
    24 ;       color = COLOR24([255, 255, 0]) 
     25; IDL> color = COLOR24([255, 255, 0]) 
    2526;        
    26 ;       This routine was written to be used with routines like  
    27 ;       COLORS or GETCOLOR 
     27; This routine was written to be used with routines like COLORS or GETCOLOR 
    2828; 
    2929; @history 
     
    3333; 
    3434;- 
    35 FUNCTION COLOR24, number 
     35FUNCTION COLOR24, rgb_triple 
    3636; 
    3737  compile_opt idl2, strictarrsubs 
     
    3939ON_ERROR, 1 
    4040 
    41 IF N_ELEMENTS(number) NE 3 THEN $ 
    42    MESSAGE, 'Augument must be a three-element vector.' 
     41IF N_ELEMENTS(rgb_triple) NE 3 THEN $ 
     42   MESSAGE, 'Argument must be a three-element vector.' 
    4343 
    44 IF MAX(number) GT 255 OR MIN(number) LT 0 THEN $ 
     44IF MAX(rgb_triple) GT 255 OR MIN(rgb_triple) LT 0 THEN $ 
    4545   MESSAGE, 'Argument values must be in range of 0-255' 
    4646 
     
    4949num24bit = 0L 
    5050 
    51 FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $ 
    52    (Fix(number[j]/16) * base16[1,j]) 
     51FOR j=0,2 DO num24bit = num24bit + ((rgb_triple[j] MOD 16) * base16[0,j]) + $ 
     52   (Fix(rgb_triple[j]/16) * base16[1,j]) 
    5353    
    5454RETURN, num24bit 
  • trunk/SRC/Colors/colorbar.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; The purpose of this routine is to add a color bar to the current 
    55; graphics window. 
     
    77; @categories Graphics, Widgets. 
    88; 
    9 ; @keyword BOTTOM The lowest color index of the colors to be loaded in 
    10 ;                 the bar. 
    11 ; 
    12 ; @keyword CB_CHARSIZE The character size of the color bar annotations. Default is 1.0. 
    13 ; 
    14 ; @keyword CB_CHARTICK The character thick of the color bar annotations. Default is 1.0. 
    15 ; 
    16 ; @keyword CB_COLOR The color index of the bar outline and characters. Default 
    17 ;                 is ncolors - 1 + bottom. 
    18 ; 
    19 ; @keyword CB_LOG to get logarithmic scale for the colorbar 
    20 ; 
    21 ; @keyword CB_TITLE This is title for the color bar. The default is to have 
    22 ;                 no title. 
    23 ; 
    24 ; @keyword DISCRETE Vector which contain color's indexes to trace in a color bar. Therefore 
    25 ;               we obtain a discreet color bar which only contains specified colors in  
    26 ;               order where they appear in the vector 
    27 ; 
    28 ; @keyword DIVISIONS The number of divisions to divide the bar into. There will 
    29 ;                 be (divisions + 1) annotations. The default is 2. 
    30 ; 
    31 ; @keyword FORMAT The format of the bar annotations. Default is '(F6.2)'. 
    32 ; 
    33 ; @keyword CB_LABEL It is a vector who specifie sticks's value attend in the color bar. 
    34 ;                It allowes, when we use DISCREET, to have colors which don't increase  
    35 ;                by increments in a regular way. 
    36 ; 
    37 ; @keyword MAX The maximum data value for the bar annotation. Default is 
    38 ;                 NCOLORS-1. 
    39 ; 
    40 ; @keyword MIN The minimum data value for the bar annotation. Default is 0. 
    41 ; 
    42 ; @keyword NCOLOR This is the number of colors in the color bar. 
    43 ; 
    44 ; @keyword NOTITLE Force to don't writte title even if CB_TITLE is declarerd. 
    45 ; 
    46 ; @keyword POSITION A four-element array of normalized coordinates in the same 
    47 ;                 form as the POSITION keyword on a plot. Default is 
    48 ;                 [0.88, 0.15, 0.95, 0.95] for a vertical bar and 
    49 ;                 [0.15, 0.88, 0.95, 0.95] for a horizontal bar. 
    50 ; 
    51 ; @keyword PSCOLOR This keyword is only applied if the output is being sent to 
    52 ;                 a PostScript file. It indicates that the PostScript device 
    53 ;                 is configured for color output. If this keyword is set, then 
    54 ;                 the annotation is drawn in the color specified by the COLOR 
    55 ;                 keyword. If the keyword is not set, the annotation is drawn 
    56 ;                 in the color specified by the !P.COLOR system variable 
    57 ;                 (usually this will be the color black). In general, this 
    58 ;                 gives better looking output on non-color or gray-scale 
    59 ;                 printers. If you are not specifically setting the annotation 
    60 ;                 color (with the COLOR keyword), it will probably 
    61 ;                 be better NOT to set this keyword either, even if you 
    62 ;                 are outputting to a color PostScript printer. 
    63 ; 
    64 ; @keyword RIGHT This puts the labels on the right-hand side of a vertical 
    65 ;                 color bar. It applies only to vertical color bars. 
    66 ; 
    67 ; @keyword TOP This puts the labels on top of the bar rather than under it. 
    68 ;                 The keyword only applies if a horizontal color bar is rendered. 
    69 ; 
    70 ; @keyword VERTICAL Setting this keyword give a vertical color bar. The default 
    71 ;                 is a horizontal color bar. 
    72 ; 
    73 ; @restrictions Color bar is drawn in the current graphics window. 
    74 ; 
    75 ; @restrictions The number of colors available on the display device (not the 
    76 ;       PostScript device) is used unless the NCOLORS keyword is used. 
    77 ; 
    78 ; @examples To display a horizontal color bar above a contour plot, type: 
    79 ; 
    80 ;       IDL> LOADCT, 5, NCOLORS=100 
    81 ;       IDL> CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $ 
    82 ;       IDL> C_COLORS=INDGEN(25)*4, NLEVELS=25 
    83 ;       IDL> COLORBAR, NCOLORS=100 
     9; @keyword BOTTOM 
     10; The lowest color index of the colors to be loaded in the bar. 
     11; 
     12; @keyword CB_CHARSIZE {default=1.0} 
     13; The character size of the color bar annotations. 
     14; 
     15; @keyword CB_CHARTHICK {default=1.0} 
     16; The character thick of the color bar annotations. 
     17; 
     18; @keyword CB_COLOR {default=ncolors - 1 + bottom} 
     19; The color index of the bar outline and characters. 
     20; 
     21; @keyword CB_LOG 
     22; to get logarithmic scale for the colorbar 
     23; 
     24; @keyword CB_TITLE 
     25; This is title for the color bar. The default is to have no title. 
     26; 
     27; @keyword DISCRETE 
     28; Vector which contain color's indexes to trace in a color bar. Therefore 
     29; we obtain a discreet color bar which only contains specified colors in 
     30; order where they appear in the vector 
     31; 
     32; @keyword DIVISIONS {default=2} 
     33; The number of divisions to divide the bar into. 
     34; There will be (divisions + 1) annotations. 
     35; 
     36; @keyword FORMAT {default='(F6.2)'} 
     37; The format of the bar annotations. 
     38; 
     39; @keyword CB_LABEL 
     40; It is a vector who specifies sticks's value attend in the color bar. 
     41; It allowes, when we use DISCREET, to have colors which don't increase 
     42; by increments in a regular way. 
     43; 
     44; @keyword MAX {default=NCOLORS - 1} 
     45; The maximum data value for the bar annotation. 
     46; 
     47; @keyword MIN {default=0} 
     48; The minimum data value for the bar annotation. 
     49; 
     50; @keyword NCOLORS 
     51; This is the number of colors in the color bar. 
     52; 
     53; @keyword NOTITLE 
     54; Force to don't write title even if CB_TITLE is declared. 
     55; 
     56; @keyword POSITION 
     57; A four-element array of normalized coordinates in the same 
     58; form as the POSITION keyword on a plot. Default is 
     59; [0.88, 0.15, 0.95, 0.95] for a vertical bar and 
     60; [0.15, 0.88, 0.95, 0.95] for a horizontal bar. 
     61; 
     62; @keyword PSCOLOR 
     63; This keyword is only applied if the output is being sent to 
     64; a Postscript file. It indicates that the Postscript device 
     65; is configured for color output. If this keyword is set, then 
     66; the annotation is drawn in the color specified by the COLOR 
     67; keyword. If the keyword is not set, the annotation is drawn 
     68; in the color specified by the !P.COLOR system variable 
     69; (usually this will be the color black). In general, this 
     70; gives better looking output on non-color or gray-scale 
     71; printers. If you are not specifically setting the annotation 
     72; color (with the COLOR keyword), it will probably 
     73; be better NOT to set this keyword either, even if you 
     74; are outputting to a color Postscript printer. 
     75; 
     76; @keyword RIGHT 
     77; This puts the labels on the right-hand side of a vertical 
     78; color bar. It applies only to vertical color bars. 
     79; 
     80; @keyword TOP 
     81; This puts the labels on top of the bar rather than under it. 
     82; The keyword only applies if a horizontal color bar is rendered. 
     83; 
     84; @keyword VERTICAL 
     85; Setting this keyword give a vertical color bar. 
     86; The default is a horizontal color bar. 
     87; 
     88; @restrictions 
     89; Color bar is drawn in the current graphics window. 
     90; 
     91; @restrictions 
     92; The number of colors available on the display device (not the 
     93; Postscript device) is used unless the NCOLORS keyword is used. 
     94; 
     95; @examples 
     96; To display a horizontal color bar above a contour plot, type: 
     97; 
     98; IDL> LOADCT, 5, NCOLORS=100 
     99; IDL> CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $ 
     100; IDL> C_COLORS=INDGEN(25)*4, NLEVELS=25 
     101; IDL> COLORBAR, NCOLORS=100 
    84102; 
    85103; @history Written by: David Fanning, 10 JUNE 96. 
    86 ;       10/27/96: Added the ability to send output to PostScript. DWF 
    87 ;       11/4/96: Substantially rewritten to go to screen or PostScript 
    88 ;           file without having to know much about the PostScript device 
     104;       10/27/96: Added the ability to send output to Postscript. DWF 
     105;       11/4/96: Substantially rewritten to go to screen or Postscript 
     106;           file without having to know much about the Postscript device 
    89107;           or even what the current graphics device is. DWF 
    90108;       1/27/97: Added the RIGHT and TOP keywords. Also modified the 
     
    93111;            no valid data range in them. DWF 
    94112;       3/3/98:  ajout du keyword discret par 
    95 ;                sebastien (smasson@lodyc.jussieu.fr) 
     113;            sebastien (smasson\@lodyc.jussieu.fr) 
    96114; 
    97115; @version $Id$ 
    98116; 
    99117;- 
    100  
    101 PRO COLORBAR, BOTTOM=bottom, CB_CHARSIZE=cb_charsize, CB_CHARTHICK=cb_charthick $ 
     118PRO COLORBAR, BOTTOM=bottom, CB_CHARSIZE=cb_charsize, $ 
     119              CB_CHARTHICK=cb_charthick $ 
    102120              , CB_COLOR=cb_color, $ 
    103121              DIVISIONS=divisions, DISCRETE=discrete,CB_LABEL = cb_label, $ 
    104               FORMAT=format, POSITION=position, MAX=max, MIN=min, NCOLORS=ncolors, $ 
    105               PSCOLOR=pscolor, CB_TITLE=cb_title, VERTICAL=vertical, TOP=top, RIGHT=right, CB_LOG = CB_log, _extra = ex 
    106                                 ; Is the PostScript device selected? 
     122              FORMAT=format, POSITION=position, MAX=max, MIN=min, $ 
     123              NCOLORS=ncolors, $ 
     124              PSCOLOR=pscolor, CB_TITLE=cb_title, NOTITLE=notitle, $ 
     125              VERTICAL=vertical, $ 
     126              TOP=top, RIGHT=right, CB_LOG = CB_log, _extra = ex 
     127                                ; Is the Postscript device selected? 
    107128; 
    108129  compile_opt idl2, strictarrsubs 
     
    175196      IF KEYWORD_SET(discrete) THEN begin 
    176197         facteur=256/n_elements(discrete) 
    177          discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite)  
     198         discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite) 
    178199         bar = REPLICATE(1B,10) # discrete 
    179200      endif else  bar = REPLICATE(1B,10) # BINDGEN(256) 
     
    182203      IF KEYWORD_SET(discrete) THEN begin 
    183204         facteur=256/n_elements(discrete) 
    184          discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite)  
     205         discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite) 
    185206         bar =  discrete # REPLICATE(1B,10) 
    186207      endif else bar = BINDGEN(256) # REPLICATE(1B, 10) 
  • trunk/SRC/Colors/getcolor.pro

    r134 r136  
    1212; same where color decomposition is turned on or off. 
    1313; 
    14 ;       (The 16 supported colors in GETCOLOR come from the McIDAS color 
    15 ;       table offered on the IDL newsgroup by Liam Gumley.) 
     14; (The 16 supported colors in GETCOLOR come from the McIDAS color 
     15; table offered on the IDL newsgroup by Liam Gumley.) 
    1616; 
    1717; @categories Graphics, Color Specification. 
    1818; 
    19 ; @param thisColor {in}{optional} A string with the "name" of the color. Valid names are: 
     19; @param thisColor {in}{optional}  
     20; A string with the "name" of the color. Valid names are: 
    2021;           black 
    2122;           magenta 
     
    4647;           IDL 5.2 or higher. 
    4748; 
    48 ; @param index {in}{optional} The color table index where the specified color should be loaded. 
     49; @param index {in}{optional}  
     50; The color table index where the specified color should be loaded. 
    4951;           If this parameter is passed, then the return value of the function is the 
    5052;           index number and not the color triple. (If color decomposition is turned 
     
    6264;           TVLCT, colors, 100 
    6365; 
    64 ; @keyword NAMES If this keyword is set, the return value of the function is 
    65 ;              a 16-element string array containing the names of the colors. 
    66 ;              These names would be appropriate, for example, in building 
    67 ;              a list widget with the names of the colors. If the NAMES 
    68 ;              keyword is set, the COLOR and INDEX parameters are ignored. 
    69 ; 
    70 ;                 listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
    71 ; 
    72 ; @keyword LOAD  If this keyword is set, all 16 colors are automatically loaded 
    73 ;              starting at the color index specified by the START keyword. 
    74 ;              Note that setting this keyword means that the return value of the 
    75 ;              function will be a structure, with each field of the structure 
    76 ;              corresponding to a color name. The value of each field will be 
    77 ;              an index number (set by the START keyword) corresponding to the 
    78 ;              associated color, or a 24-bit long integer value that creates the 
    79 ;              color on a true-color device. What you have as the field values is 
    80 ;              determined by the TRUE keyword or whether color decomposition is on 
    81 ;              or off in the absense of the TRUE keyword. It will either be a 1-by-3 
    82 ;              byte array or a long integer value. 
    83 ; 
    84 ; @keyword START The starting color index number if the LOAD keyword is set. This keyword 
    85 ;              value is ignored unless the LOAD keyword is also set. The keyword is also 
    86 ;              ignored if the TRUE keyword is set or if color decomposition in on in 
    87 ;              IDL 5.2 and higher. The default value for the START keyword is 
    88 ;              !D.TABLE_SIZE - 17. 
    89 ; 
    90 ; @keyword TRUE  If this keyword is set, the specified color triple is returned 
    91 ;              as a 24-bit integer equivalent. The lowest 8 bits correspond to 
    92 ;              the red value; the middle 8 bits to the green value; and the 
    93 ;              highest 8 bits correspond to the blue value. In IDL 5.2 and higher, 
    94 ;              if color decomposition is turned on, it is as though this keyword 
    95 ;              were set. 
    96 ; 
    97 ; @restrictions The TRUE keyword causes the START keyword to be ignored. 
    98 ;       The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be ignored. 
    99 ;       The COLOR parameter is ignored if the LOAD keyword is used. 
    100 ;       On systems where it is possible to tell the state of color decomposition 
    101 ;       (i.e., IDL 5.2 and higher), a 24-bit value (or values) is automatically 
    102 ;       returned if color decomposition is ON. 
    103 ; 
    104 ;  
    105 ; @examples To load a yellow color in color index 100 and plot in yellow, type: 
    106 ; 
    107 ;          IDL> yellow = GETCOLOR('yellow', 100) 
    108 ;          IDL> PLOT, data, COLOR=yellow 
     66; @keyword NAMES  
     67; If this keyword is set, the return value of the function is 
     68; a 16-element string array containing the names of the colors. 
     69; These names would be appropriate, for example, in building 
     70; a list widget with the names of the colors. If the NAMES 
     71; keyword is set, the COLOR and INDEX parameters are ignored. 
     72; 
     73; listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
     74; 
     75; @keyword LOAD   
     76; If this keyword is set, all 16 colors are automatically loaded 
     77; starting at the color index specified by the START keyword. 
     78; Note that setting this keyword means that the return value of the 
     79; function will be a structure, with each field of the structure 
     80; corresponding to a color name. The value of each field will be 
     81; an index number (set by the START keyword) corresponding to the 
     82; associated color, or a 24-bit long integer value that creates the 
     83; color on a true-color device. What you have as the field values is 
     84; determined by the TRUE keyword or whether color decomposition is on 
     85; or off in the absence of the TRUE keyword. It will either be a 1-by-3 
     86; byte array or a long integer value. 
     87; 
     88; @keyword START {default=!D.TABLE_SIZE - 17} 
     89; The starting color index number if the LOAD keyword is set. This keyword 
     90; value is ignored unless the LOAD keyword is also set. The keyword is also 
     91; ignored if the TRUE keyword is set or if color decomposition in on in 
     92; IDL 5.2 and higher. The default value for the START keyword is 
     93; 
     94; @keyword TRUE   
     95; If this keyword is set, the specified color triple is returned 
     96; as a 24-bit integer equivalent. The lowest 8 bits correspond to 
     97; the red value; the middle 8 bits to the green value; and the 
     98; highest 8 bits correspond to the blue value. In IDL 5.2 and higher, 
     99; if color decomposition is turned on, it is as though this keyword 
     100; were set. 
     101; 
     102; @restrictions  
     103; The TRUE keyword causes the START keyword to be ignored. 
     104; The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be  
     105; ignored. 
     106; The COLOR parameter is ignored if the LOAD keyword is used. 
     107; On systems where it is possible to tell the state of color decomposition 
     108; (i.e., IDL 5.2 and higher), a 24-bit value (or values) is automatically 
     109; returned if color decomposition is ON. 
     110; 
     111; @examples  
     112; To load a yellow color in color index 100 and plot in yellow, type: 
     113; 
     114; IDL> yellow = GETCOLOR('yellow', 100) 
     115; IDL> PLOT, data, COLOR=yellow 
    109116; 
    110117;       or, 
    111118; 
    112 ;          IDL> PLOT, data, COLOR=GETCOLOR('yellow', 100) 
    113 ; 
    114 ;       To do the same thing on a 24-bit color system with decomposed color on, type: 
    115 ; 
    116 ;          IDL> PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 
     119; IDL> PLOT, data, COLOR=GETCOLOR('yellow', 100) 
     120; 
     121; To do the same thing on a 24-bit color system with decomposed color on, type: 
     122; 
     123; IDL> PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 
    117124; 
    118125;       or in IDL 5.2 and higher, 
    119126; 
    120 ;          IDL> DEVICE, Decomposed=1 
    121 ;          IDL> PLOT, data, COLOR=GETCOLOR('yellow') 
    122 ; 
    123 ;       To load all 16 colors into the current color table, starting at 
    124 ;       color index 200, type: 
    125 ; 
    126 ;          IDL> TVLCT, GETCOLOR(), 200 
    127 ; 
    128 ;       To add the color names to a list widget: 
    129 ; 
    130 ;           IDL> listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
    131 ; 
    132 ;       To load all 16 colors and have the color indices returned in a structure: 
    133 ; 
    134 ;           IDL> DEVICE, Decomposed=0 
    135 ;           IDL> colors = GetColor(/Load, Start=1) 
    136 ;           IDL> HELP, colors, /Structure 
    137 ;           PLOT, data, COLOR=colors.yellow 
    138 ; 
    139 ;       To get the direct color values as 24-bit integers in color structure fields: 
    140 ; 
    141 ;           IDL> DEVICE, Decomposed=1 
    142 ;           IDL> colors = GetColor(/Load) 
    143 ;           IDL> PLOT, data, COLOR=colors.yellow 
    144 ; 
    145 ;       Note that the START keyword value is ignored if on a 24-bit device, 
    146 ;       so it is possible to write completely device-independent code by 
    147 ;       writing code like this: 
    148 ; 
    149 ;           IDL> colors = GetColor(/Load) 
    150 ;           IDL> PLOT, data, Color=colors.yellow;           IDL> DEVICE, Decomposed=0 
    151 ;           IDL> colors = GetColor(/Load, Start=1) 
    152 ;           IDL> HELP, colors, /Structure 
    153 ;           PLOT, data, COLOR=colors.yellow 
    154 ; 
    155 ;       To get the direct color values as 24-bit integers in color structure fields: 
    156 ; 
    157 ;           IDL> DEVICE, Decomposed=1 
    158 ;           IDL> colors = GetColor(/Load) 
    159 ;           IDL> PLOT, data, COLOR=colors.yellow 
    160 ; 
    161 ;       Note that the START keyword value is ignored if on a 24-bit device, 
    162 ;       so it is possible to write completely device-independent code by 
    163 ;       writing code like this: 
    164 ; 
    165 ;           IDL> colors = GetColor(/Load) 
    166 ;           IDL> PLOT, data, Color=colors.yellow 
     127; IDL> DEVICE, Decomposed=1 
     128; IDL> PLOT, data, COLOR=GETCOLOR('yellow') 
     129; 
     130; To load all 16 colors into the current color table, starting at 
     131; color index 200, type: 
     132; 
     133; IDL> TVLCT, GETCOLOR(), 200 
     134; 
     135; To add the color names to a list widget: 
     136; 
     137; IDL> listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
     138; 
     139; To load all 16 colors and have the color indexes returned in a structure: 
     140; 
     141; IDL> DEVICE, Decomposed=0 
     142; IDL> colors = GetColor(/Load, Start=1) 
     143; IDL> HELP, colors, /Structure 
     144; PLOT, data, COLOR=colors.yellow 
     145; 
     146; To get the direct color values as 24-bit integers in color structure fields: 
     147; 
     148; IDL> DEVICE, Decomposed=1 
     149; IDL> colors = GetColor(/Load) 
     150; IDL> PLOT, data, COLOR=colors.yellow 
     151; 
     152; Note that the START keyword value is ignored if on a 24-bit device, 
     153; so it is possible to write completely device-independent code by 
     154; writing code like this: 
     155; 
     156; IDL> colors = GetColor(/Load) 
     157; IDL> PLOT, data, Color=colors.yellow;           IDL> DEVICE, Decomposed=0 
     158; IDL> colors = GetColor(/Load, Start=1) 
     159; IDL> HELP, colors, /Structure 
     160; IDL> PLOT, data, COLOR=colors.yellow 
     161; 
     162; To get the direct color values as 24-bit integers in color structure fields: 
     163; 
     164; IDL> DEVICE, Decomposed=1 
     165; IDL> colors = GetColor(/Load) 
     166; IDL> PLOT, data, COLOR=colors.yellow 
     167; 
     168; Note that the START keyword value is ignored if on a 24-bit device, 
     169; so it is possible to write completely device-independent code by 
     170; writing code like this: 
     171; 
     172; IDL> colors = GetColor(/Load) 
     173; IDL> PLOT, data, Color=colors.yellow 
    167174; 
    168175; @history Written by: David Fanning, 10 February 96. 
     
    171178;       Added the INDEX parameter to the program 8 Mar 99. DWF 
    172179;       Added the NAMES keyword at insistence of Martin Schultz. 10 Mar 99. DWF 
    173 ;       Reorderd the colors so black is first and white is last. 7 June 99. DWF 
     180;       Reordered the colors so black is first and white is last. 7 June 99. DWF 
    174181;       Added automatic recognition of DECOMPOSED=1 state. 7 June 99. DWF 
    175182;       Added LOAD AND START keywords. 7 June 99. DWF. 
     
    292299colorIndex = WHERE(names EQ thisColor) 
    293300 
    294    ; If you can't find it. Issue an infomational message, 
     301   ; If you can't find it. Issue an informational message, 
    295302   ; set the index to a YELLOW color, and continue. 
    296303 
  • trunk/SRC/Colors/lct.pro

    r134 r136  
    1212; 
    1313; @keyword LIGHTNESS a scalar used to change the Lightness of the color 
    14 ;            palette to be abble to adjust according to the printer we use, 
     14;            palette to be able to adjust according to the printer we use, 
    1515;            the media (paper or slide)...  
    1616;               lightness < 1 to get lighter colors 
     
    2222; 
    2323; @keyword GET_NAME Set this keyword to a named variable in which the names of the color tables 
    24 ;          are reurned as a string array. No changes are made to the color table. 
     24;          are returned as a string array. No changes are made to the color table. 
    2525; 
    2626; @keyword _EXTRA Used to pass your keywords 
     
    2828; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    2929;          30/3/1999: add extra 
    30 ;          6/7/1999: mac/windows comptibility 
     30;          6/7/1999: mac/windows compatibility 
    3131; 
    3232; @version $Id$ 
     
    4343; definition of the name of the file containing colors palettes. 
    4444   if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' 
    45 ; What is the full adress of nametbl? 
     45; What is the full address of nametbl? 
    4646   thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
    4747   CASE thisOS of 
  • trunk/SRC/Colors/newpalette.pro

    r134 r136  
    1111; @categories graphic, color specification 
    1212; 
    13 ; @param namepal {in}{required} It is a string containing the name of the new palettte we want to write. 
     13; @param namepal {in}{required}  
     14; It is a string containing the name of the new palette we want to write. 
    1415; 
    15 ; @keyword  OVER It is a whole number which designate the number of the palette 
    16 ;               we want to replace the palette on the screen  
     16; @keyword OVER  
     17; It is a whole number which designate the number of the palette 
     18; we want to replace the palette on the screen  
    1719; 
    18 ; @keyword FILE {default=palette.tbl} is not specified, we are looking  a file containing  
    19 ;             palettes named palette.tbl. 
    20 ;              This file can be in any directory of the !path 
    21 ;              On the other hand it must be writable 
     20; @keyword FILE {default=palette.tbl}  
     21; if not specified, we are looking a file containing palettes named palette.tbl. 
     22; This file can be in any directory of the !path 
     23; On the other hand it must be writable 
    2224; 
    23 ; @keyword _extra Used to pass your keywords 
     25; @keyword _extra  
     26; Used to pass your keywords 
    2427; 
    2528; @history Guillaume Roulet (gr@lodyc.jussieu.fr) 
    26 ;                       30/3/1999 s.masson, add _extra, research of the full name, OVER 
     29; 30/3/1999 s.masson, add _extra, research of the full name, OVER 
    2730;                       5/5/1999 s.masson 
    2831; 
  • trunk/SRC/Colors/xlct.pro

    r134 r136  
    383383;               this ID is specified, a death of the caller results in a  
    384384;               death of Xlct 
    385 ; @keyword NCOLORS = number of colors to use.  Use color indices from BOTTOM 
     385; @keyword NCOLORS = number of colors to use.  Use color indexes from BOTTOM 
    386386;               to the smaller of !D.TABLE_SIZE-1 and NCOLORS-1. 
    387387;               Default = !D.TABLE_SIZE = all available colors. 
    388 ; @keyword BOTTOM = first color index to use. Use color indices from BOTTOM to 
     388; @keyword BOTTOM = first color index to use. Use color indexes from BOTTOM to 
    389389;               BOTTOM+NCOLORS-1.  Default = 0. 
    390390; @keyword SILENT - Normally, no informational message is printed when 
  • trunk/SRC/Colors/xpal.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
    4 ; like xpalette but shorter to write and ,moreover, 
     3; @file_comments 
     4; like xpalette but shorter to write and, moreover, 
    55; possess a hotkey save which (thanks to the newpalette routine) 
    66; allows to save the routine that we have just done. Comment: when we 
    7 ; press the predefined hotkey, it calls xlct instead of xloadct  
     7; press the predefined hotkey, it calls xlct instead of xloadct 
    88; No explicit inputs.  The current color table is used as a starting point. 
    99; 
    1010; @categories Color tables, widgets. 
    1111; 
    12 ; @keyword BLOCK Set this keyword to have XMANAGER block when this 
    13 ;               application is registered.  By default the Xmanager 
    14 ;               keyword NO_BLOCK is set to 1 to provide access to the 
    15 ;               command line if active command  line processing is available. 
    16 ;               Note that setting BLOCK for this application will cause 
    17 ;               all widget applications to block, not only this 
    18 ;               application.  For more information see the NO_BLOCK keyword 
    19 ;               to XMANAGER. 
    20 ; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 
    21 ;               a user-supplied procedure that will be called when the color 
    22 ;               table is updated by XLOADCT.  The procedure may optionally 
    23 ;               accept a keyword called DATA, which will be automatically 
    24 ;               set to the value specified by the optional UPDATECBDATA 
    25 ;               keyword. 
    26 ; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 
    27 ;               passed via the DATA keyword to the user-supplied procedure 
    28 ;               specified via the UPDATECALLBACK keyword, if any. If the 
    29 ;               UPDATECBDATA keyword is not set the value accepted by the 
    30 ;               DATA keyword to the procedure specified by UPDATECALLBACK 
    31 ;               will be undefined. 
    32 ; 
    33 ; @uses COLORS: Contains the current RGB color tables. 
    3412; @uses XP_COM: Private to this module. 
    3513; 
    36 ; @restrictions XPAL uses two colors from the current color table as 
    37 ;       drawing foreground and background colors. These are used 
    38 ;       for the RGB plots on the left, and the current index marker on 
    39 ;       the right. This means that if the user set these two colors 
    40 ;       to the same value, the XPAL display could become unreadable 
    41 ;       (like writing on black paper with black ink). XPAL minimizes 
    42 ;       this possibility by noting changes to the color map and always 
    43 ;       using the brightest available color for the foreground color 
    44 ;       and the darkest for the background. Thus, the only way 
    45 ;       to make XPAL's display unreadable is to set the entire color 
    46 ;       map to a single color, which is highly unlikely. The only side 
    47 ;       effect of this policy is that you may notice XPAL redrawing 
    48 ;       the entire display after you've modified the current color. 
    49 ;       This simply means that the change has made XPAL pick new 
    50 ;       drawing colors. 
    51 ; 
    52 ;       The new color tables are saved in the COLORS common and loaded 
    53 ;       to the display. 
    54 ; 
    55 ; @examples The XPAL widget has the following controls: 
     14; @restrictions 
     15; XPAL uses two colors from the current color table as 
     16; drawing foreground and background colors. These are used 
     17; for the RGB plots on the left, and the current index marker on 
     18; the right. This means that if the user set these two colors 
     19; to the same value, the XPAL display could become unreadable 
     20; (like writing on black paper with black ink). XPAL minimizes 
     21; this possibility by noting changes to the color map and always 
     22; using the brightest available color for the foreground color 
     23; and the darkest for the background. Thus, the only way 
     24; to make XPAL's display unreadable is to set the entire color 
     25; map to a single color, which is highly unlikely. The only side 
     26; effect of this policy is that you may notice XPAL redrawing 
     27; the entire display after you've modified the current color. 
     28; This simply means that the change has made XPAL pick new 
     29; drawing colors. 
     30; 
     31; The new color tables are saved in the COLORS common and loaded 
     32; to the display. 
     33; 
     34; @examples 
     35; The XPAL widget has the following controls: 
    5636; 
    5737;       Left:   Three plots showing the current Red, Green, and Blue vectors. 
     
    10686;                        3) The name of the file containing palettes. 
    10787;                        Comment: May follow instructions gave by the prompter. 
    108 ;                 
     88; 
    10989; 
    11090;       Three sliders (R, G, and B) that allow the user to modify the 
     
    125105;                          horizontally. 
    126106; 
    127 ; @history addaptation de xpalette pour ajouter un bouton save par 
    128 ;          Gima Nicolas (nglod@ipsl.jussieu.fr) et par Masson 
    129 ;          Sebastien (smlod@ipsl.jussieu.fr) 
     107; @history adaptation de xpalette pour ajouter un bouton save par 
     108;          Grima Nicolas (nglod\@ipsl.jussieu.fr) et par Masson 
     109;          Sebastien (smlod\@ipsl.jussieu.fr) 
    130110; 
    131111; $Id$ 
     
    134114; 
    135115;+ 
    136 ; @file_comments XP_NEW_COLORS: Choose the best foreground and background colors for the current 
    137 ;                color maps and set !P appropriately. Returns 1 if the colors changed, 
    138 ;                0 otherwise. 
    139 ; 
    140 ; @returns 1 or 0 
    141 ;-  
     116; @file_comments 
     117; XP_NEW_COLORS: Choose the best foreground and background colors for 
     118; the current color maps and set !P appropriately. 
     119; 
     120; @returns 
     121; 1 if the colors changed, 0 otherwise. 
     122;- 
    142123function XP_NEW_COLORS 
    143124; 
     
    162143end 
    163144 
     145;+ 
     146; @hidden 
     147;- 
    164148pro XP_ALERT_CALLER 
    165149; 
     
    187171end 
    188172;+ 
    189 ; @file_comments XP_XLCTCALLBACK:  For visuals with static colormaps, update the graphics 
    190 ;                after a change by XLOADCT. 
     173; @file_comments 
     174; XP_XLCTCALLBACK:  For visuals with static colormaps, update the graphics 
     175; after a change by XLOADCT. 
    191176;- 
    192177pro XP_XLCTCALLBACK 
     
    201186end 
    202187 
     188;+ 
     189; @hidden 
     190;- 
    203191pro XP_REDRAW 
    204192; 
     
    216204 
    217205;+ 
    218 ; @file_comments XP_REPLOT: Re-draw the RGB plots. Type has the following possible values. 
     206; @file_comments 
     207; XP_REPLOT: Re-draw the RGB plots. Type has the following possible values. 
    219208;       - 'D': Draw the data part of all three plots 
    220209;       - 'F': draw all three plots 
     
    222211;       - 'G': Draw the data part of the Green plot 
    223212;       - 'B': Draw the data part of the Blue plot 
    224 ;-  
     213;- 
    225214pro XP_REPLOT, color_index, type 
    226215; 
     
    240229  save_x_s = !x.s 
    241230  save_y_s = !y.s 
    242   save_x_type = !x.type  
    243   save_y_type = !y.type  
     231  save_x_type = !x.type 
     232  save_y_type = !y.type 
    244233 
    245234  !y.margin= [2, 2] 
     
    435424 
    436425      7: goto, do_copy 
    437       8: BEGIN  
     426      8: BEGIN 
    438427         COMMON basecommon,  bas212, bas222,  bas232 
    439428         base = WIDGET_BASE(/COLUMN, /FRAME) 
     
    476465  THEN BEGIN 
    477466    CASE uval OF 
    478      'ok' :BEGIN  
     467     'ok' :BEGIN 
    479468        WIDGET_CONTROL, bas212, GET_VALUE = palname 
    480469        WIDGET_CONTROL, bas222, GET_VALUE = over 
     
    541530;+ 
    542531; 
    543 ; @keyword group  
    544 ; 
    545 ; @keyword BLOCK Set this keyword to have XMANAGER block when this 
    546 ;               application is registered.  By default the Xmanager 
    547 ;               keyword NO_BLOCK is set to 1 to provide access to the 
    548 ;               command line if active command  line processing is available. 
    549 ;               Note that setting BLOCK for this application will cause 
    550 ;               all widget applications to block, not only this 
    551 ;               application.  For more information see the NO_BLOCK keyword 
    552 ;               to XMANAGER. 
    553 ; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 
    554 ;               a user-supplied procedure that will be called when the color 
    555 ;               table is updated by XLOADCT.  The procedure may optionally 
    556 ;               accept a keyword called DATA, which will be automatically 
    557 ;               set to the value specified by the optional UPDATECBDATA 
    558 ;               keyword. 
    559 ; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 
    560 ;               passed via the DATA keyword to the user-supplied procedure 
    561 ;               specified via the UPDATECALLBACK keyword, if any. If the 
    562 ;               UPDATECBDATA keyword is not set the value accepted by the 
    563 ;               DATA keyword to the procedure specified by UPDATECALLBACK 
    564 ;               will be undefined. 
    565 ; 
    566 ;- 
    567  
    568  
    569  
     532; @keyword group 
     533; 
     534; @keyword BLOCK 
     535; Set this keyword to have XMANAGER block when this 
     536; application is registered.  By default the Xmanager 
     537; keyword NO_BLOCK is set to 1 to provide access to the 
     538; command line if active command line processing is available. 
     539; Note that setting BLOCK for this application will cause 
     540; all widget applications to block, not only this 
     541; application.  For more information see the NO_BLOCK keyword 
     542; to XMANAGER. 
     543; 
     544; @keyword UPDATECALLBACK 
     545; Set this keyword to a string containing the name of 
     546; a user-supplied procedure that will be called when the color 
     547; table is updated by XLOADCT.  The procedure may optionally 
     548; accept a keyword called DATA, which will be automatically 
     549; set to the value specified by the optional UPDATECBDATA 
     550; keyword. 
     551; 
     552; @keyword UPDATECBDATA 
     553; Set this keyword to a value of any type. It will be 
     554; passed via the DATA keyword to the user-supplied procedure 
     555; specified via the UPDATECALLBACK keyword, if any. If the 
     556; UPDATECBDATA keyword is not set the value accepted by the 
     557; DATA keyword to the procedure specified by UPDATECALLBACK 
     558; will be undefined. 
     559; 
     560;- 
    570561pro XPAL, group=group, BLOCK=block, UPDATECALLBACK=updt_cb_name, $ 
    571562        UPDATECBDATA=updt_cb_data 
     
    584575 
    585576  xpw = { xp_widgets, base:0L, $ 
    586         colorsel:0L, mark_label:0L, idx_label:0L, button_base:0L, rgb_base:0L} 
     577  colorsel:0L, mark_label:0L, idx_label:0L, button_base:0L, rgb_base:0L} 
    587578 
    588579  state = {old_p:!p, $                     ; Original value of !P 
    589            mark_idx:0, $                   ; Current mark index 
    590            cur_idx:0, $                    ; Current index 
    591            cur_color_win:0, $              ; Current Color draw window index 
    592            plot_win:0, $                   ; RGB plot draw window index 
    593            updt_callback: updt_callback, $ ; user-defined callback (optional) 
    594            p_updt_cb_data:p_updt_cb_data}  ; data for callback (optional) 
     580   mark_idx:0, $                   ; Current mark index 
     581   cur_idx:0, $                    ; Current index 
     582   cur_color_win:0, $              ; Current Color draw window index 
     583   plot_win:0, $                   ; RGB plot draw window index 
     584   updt_callback: updt_callback, $ ; user-defined callback (optional) 
     585   p_updt_cb_data:p_updt_cb_data}  ; data for callback (optional) 
    595586 
    596587  if (XREGISTERED('XPAL')) then return      ; Only one copy at a time 
     
    610601  save_win = !d.window          ;Previous window 
    611602 
    612   IF N_ELEMENTS(r_orig) LE 0 THEN BEGIN ;If no common, use current colors 
    613         TVLCT, r_orig, g_orig, b_orig, /GET 
    614         r_curr = r_orig 
    615         b_curr = b_orig 
    616         g_curr = g_orig 
    617         ENDIF 
     603  IF N_ELEMENTS(r_orig) LE 0 THEN BEGIN ;If no common, use current colors 
     604   TVLCT, r_orig, g_orig, b_orig, /GET 
     605   r_curr = r_orig 
     606   b_curr = b_orig 
     607   g_curr = g_orig 
     608  ENDIF 
    618609 
    619610  ; Create widgets 
     
    631622 
    632623  c1 = WIDGET_BASE(xpw.base, /COLUMN, space=20) 
    633     status = WIDGET_BASE(c1, /COLUMN, /FRAME) 
    634       ncw = WIDGET_LABEL(WIDGET_BASE(status), /DYNAMIC_RESIZE) 
    635       xpw.idx_label = CW_FIELD(status, title='Current Index: ', value='0', $ 
    636                                xsize=20, /STRING) 
    637       xpw.mark_label = CW_FIELD(status, title='Mark Index:    ', value='0', $ 
    638                                 xsize=20, /STRING) 
    639       c1_1 = widget_base(status, /ROW) 
    640         junk = WIDGET_LABEL(c1_1, value="Current Color: ") 
    641           cur_color = WIDGET_DRAW(c1_1, xsize = 125, ysize=50, /frame) 
    642     names = [ 'Done', 'Predefined', 'Help', 'Redraw', 'Set Mark', $ 
    643                 'Switch Mark', 'Copy Current', 'Interpolate', 'save'] 
    644     xpw.button_base = CW_BGROUP(c1, names, COLUMN=3, /FRAME) 
    645     xpw.rgb_base = CW_RGBSLIDER(c1, /FRAME, /DRAG) 
    646  
    647     junk = WIDGET_BASE(xpw.base)        ; Responds to YOFFSET 
     624  status = WIDGET_BASE(c1, /COLUMN, /FRAME) 
     625  ncw = WIDGET_LABEL(WIDGET_BASE(status), /DYNAMIC_RESIZE) 
     626  xpw.idx_label = CW_FIELD(status, title='Current Index: ', value='0', $ 
     627  xsize=20, /STRING) 
     628  xpw.mark_label = CW_FIELD(status, title='Mark Index:    ', value='0', $ 
     629  xsize=20, /STRING) 
     630  c1_1 = widget_base(status, /ROW) 
     631  junk = WIDGET_LABEL(c1_1, value="Current Color: ") 
     632  cur_color = WIDGET_DRAW(c1_1, xsize = 125, ysize=50, /frame) 
     633  names = [ 'Done', 'Predefined', 'Help', 'Redraw', 'Set Mark', $ 
     634  'Switch Mark', 'Copy Current', 'Interpolate', 'save'] 
     635  xpw.button_base = CW_BGROUP(c1, names, COLUMN=3, /FRAME) 
     636  xpw.rgb_base = CW_RGBSLIDER(c1, /FRAME, /DRAG) 
     637 
     638  junk = WIDGET_BASE(xpw.base)        ; Responds to YOFFSET 
    648639    if (version.style='Motif') then junk2=30 else junk2 = 50 
    649640    xpw.colorsel = CW_COLORSEL(junk, yoffset=junk2) 
    650  
    651641 
    652642  state.cur_idx = 0 
     
    658648 
    659649  WIDGET_CONTROL, ncw, $ 
    660         set_value='Number Of Colors: ' + strcompress(!d.n_colors, /REMOVE_ALL) 
     650 set_value='Number Of Colors: ' + strcompress(!d.n_colors, /REMOVE_ALL) 
    661651  WIDGET_CONTROL, get_value=tmp, cur_color 
    662652  state.cur_color_win = tmp 
     
    672662 
    673663  XMANAGER, 'Xpal', xpw.base, event_handler='XP_EVENT', group=group, $ 
    674         NO_BLOCK=(NOT(FLOAT(block))) 
    675 end 
    676  
     664  NO_BLOCK=(NOT(FLOAT(block))) 
     665end 
     666 
  • trunk/SRC/Commons/cm_4cal.pro

    r134 r136  
    77; 
    88COMMON time_coord, jpt, time 
    9 ; key_caltype = 'greg' : gregorian calendar 
     9; key_caltype = 'greg' : Gregorian calendar 
    1010;             = '360d' :360 days calendar 
    1111;             = 'noleap' : no leap year calendar (always 365 days) 
  • trunk/SRC/Commons/cm_4ps.pro

    r134 r136  
    4242; archive_ps = 0 -> nothing is done 
    4343; archive_ps = 1 -> each printed ps has its name and creation date 
    44 ;                   written in the bottom-left corber of the page 
     44;                   written in the bottom-left corner of the page 
    4545;                   and is gzipped in the psdir directory 
    4646; archive_ps > 1 -> question is asked to know if ps file has to be 
    47 ;                   achived or not 
     47;                   archived or not 
    4848; 
    4949COMMON ps_archiving, archive_ps 
  • trunk/SRC/ForOldVersion/updatekwd.pro

    r133 r136  
    3737  old = [old, 'discret']            & new = [new, 'discrete'] 
    3838;  old = [old, ''] & new = [new, ''] 
    39 ; supress the first dummy argument and make sure we use lowcase 
     39; supress the first dummy argument and make sure we use low case 
    4040  old = strtrim(strlowcase(old[1:*]), 2) 
    4141  new = strtrim(strlowcase(new[1:*]), 2) 
  • trunk/SRC/Interpolation/angle.pro

    r134 r136  
    11;--------- 
    22;+ 
    3 ; @file_comments  
     3; @file_comments 
    44; north stereographic polar projection 
    55; 
     
    88; @param pphi {in}{required} 
    99; 
    10 ; @keyword DOUBLE {default=0} use double precision (default is float) 
     10; @keyword DOUBLE {default=0} 
     11; use double precision (default is float) 
    1112; 
    1213; @returns 
  • trunk/SRC/Interpolation/clickincell.pro

    r134 r136  
    11;+ 
    2 ; @file_comments  
     2; @file_comments 
    33; click on a map and find in which cell the click was 
    44; 
  • trunk/SRC/Interpolation/compute_fromirr_bilinear_weigaddr.pro

    r125 r136  
    11;+ 
    2 ; @file_comments  
     2; @file_comments 
    33; compute the weight and address needed to interpolate data from 
    44; an "irregular 2D grid" (defined as a grid made of quadrilateral cells) 
     
    77; @categories interpolation 
    88; 
    9 ; @param olonin {in}{required} longitudeof the input data 
    10 ; @param olat   {in}{required} latitude of the input data 
    11 ; @param omsk   {in}{required} land/se mask of the input data 
    12 ; @param alonin {in}{required} longitude of the output data 
    13 ; @param alat   {in}{required} latitude of the output data 
    14 ; @param amsk   {in}{required} land/sea mask of the output data 
     9; @param olonin {in}{required} 
     10; longitude of the input data 
     11; 
     12; @param olat {in}{required} 
     13; latitude of the input data 
     14; 
     15; @param omsk {in}{required} 
     16; land/sea mask of the input data 
     17; 
     18; @param alonin {in}{required} 
     19; longitude of the output data 
     20; 
     21; @param alat {in}{required} 
     22; latitude of the output data 
     23; 
     24; @param amsk {in}{required} 
     25; land/sea mask of the output data 
    1526; 
    1627; @param weig {out} 
  • trunk/SRC/Interpolation/compute_fromreg_bilinear_weigaddr.pro

    r134 r136  
    11;+ 
    2 ; @file_comments  
     2; @file_comments 
    33; compute the weight and address needed to interpolate data from a 
    44; "regular grid" to any grid using the bilinear method 
     
    66; @categories interpolation 
    77; 
    8 ; @param alonin {in}{required} longitudeof the input data 
    9 ; @param alatin  {in}{required} latitude of the input data 
    10 ; @param olonin {in}{required} longitude of the output data 
    11 ; @param olat  {in}{required} latitude of the output data 
    12 ; 
    13 ; @keyword NONORTHERNLINE activate if you don't want to take into 
    14 ;          account the northen line of the input data when perfoming the 
    15 ; @keyword NOSOUTHERNLINE activate if you don't want to take into 
    16 ;          account the southern line of the input data when perfoming the 
    17 ;          interpolation. 
     8; @param alonin{in}{required} 
     9; longitude of the input data 
     10; 
     11; @param alatin {in}{required} 
     12; latitude of the input data 
     13; 
     14; @param olonin {in}{required} 
     15; longitude of the output data 
     16; 
     17; @param olat {in}{required} 
     18; latitude of the output data 
     19; 
     20; @keyword NONORTHERNLINE 
     21; activate if you don't want to take into 
     22; account the northen line of the input data when perfoming the interpolation. 
     23; 
     24; @keyword NOSOUTHERNLINE 
     25; activate if you don't want to take into 
     26; account the southern line of the input data when perfoming the interpolation. 
    1827; 
    1928; @param weig {out} 
  • trunk/SRC/Interpolation/compute_fromreg_imoms3_weigaddr.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; compute the weight and address neede to interpolate data from a 
    55; "regular grid" to any grid using the imoms3 method 
     
    77; @categories interpolation 
    88; 
    9 ; @param alonin {in}{required} longitude of the input data 
    10 ; @param alatin {in}{required} latitude of the input data 
    11 ; @param olonin {in}{required} longitude of the output data 
    12 ; @param olat {in}{required} latitude of the output data 
     9; @param alonin {in}{required} 
     10; longitude of the input data 
     11; 
     12; @param alatin {in}{required} 
     13; latitude of the input data 
     14; 
     15; @param olonin {in}{required} 
     16; longitude of the output data 
     17; @param olat {in}{required} 
     18; latitude of the output data 
    1319; 
    1420; @keyword NONORTHERNLINE 
  • trunk/SRC/Interpolation/cutpar.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; cut p parallelogram(s) into p*n^2 parallelograms 
    55; 
     
    1414; @param x3 {in}{required} 
    1515; @param y3 {in}{required} 
    16 ; 1d arrays of p elements, giving the edge positions. The 
    17 ;       edges must be given as in plot to draw the parallelogram. (see 
    18 ;       example). 
     16; 1d arrays of p elements, giving the edge positions. 
     17; The edges must be given as in plot to draw the parallelogram. (see example). 
    1918; 
    20 ; @param n {in}{required} each parallelogram will be cutted in n^2 pieces 
     19; @param n {in}{required} 
     20; each parallelogram will be cutted in n^2 pieces 
    2121; 
    22 ; @keyword ENDPOINTS see outputs 
     22; @keyword ENDPOINTS 
     23; see outputs 
    2324; 
    24 ; @keyword ONSPHERE to specify that the points are located on a 
    25 ;         sphere. In this case, x and y corresponds to longitude and 
    26 ;         latitude in degrees. 
     25; @keyword ONSPHERE 
     26; to specify that the points are located on a 
     27; sphere. In this case, x and y corresponds to longitude and 
     28; latitude in degrees. 
    2729; 
    2830; @returns 
  • trunk/SRC/Interpolation/cutsegment.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; cut p segments into p*n equal parts 
    55; 
     
    1212; 1d arrays of p elements, the coordinates of the endpoints of the p segments 
    1313; 
    14 ; @param n {in}{required} the number of pieces we want to cut each segment 
     14; @param n {in}{required} 
     15; the number of pieces we want to cut each segment 
    1516; 
    16 ; @keyword ENDPOINTS see ouputs 
     17; @keyword ENDPOINTS 
     18; see ouputs 
    1719; 
    18 ; @keyword ONSPHERE to specify that the points are located on a 
    19 ;         sphere. In this case, x and y corresponds to longitude and 
    20 ;         latitude in degrees. 
     20; @keyword ONSPHERE 
     21; to specify that the points are located on a sphere. 
     22; In this case, x and y corresponds to longitude and latitude in degrees. 
    2123; 
    2224; @returns 
  • trunk/SRC/Interpolation/extrapolate.pro

    r134 r136  
    11;+ 
    2 ; @file_comments  
     2; @file_comments 
    33; extrapolate data (zinput) where maskinput eq 0 by filling 
    44; step by step the coastline points with the mean value of the 8 neighbourgs. 
  • trunk/SRC/Interpolation/fromirr.pro

    r125 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; interpolate data from an irregular 2D grid to any 2D grid. 
    55;   Only 1 method available = bilinear 
     
    77; @categories interpolation 
    88; 
    9 ; @param method {in}{required} a string defining the interpolation method. must be 'bilinear' 
    10 ; @param datain {in}{required} a 2D array the input data to interpolate 
    11 ; @param lonin {in}{optional} a 2D array defining the longitude of the input data 
    12 ; @param latin {in}{optional} a 2D array defining the latitude of the input data. 
    13 ; @param mskin {in}{optional} a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land) 
    14 ; @param lonout {in}{optional} 1D or 2D array defining the longitude of the output data. 
    15 ; @param latout {in}{optional} 1D or 2D array defining the latitude of the output data. 
    16 ; @param mskout {in}{required} a 2D array, the land-sea mask of the ouput data (1 on ocean, 0 on land) 
     9; @param method {in}{required} 
     10; a string defining the interpolation method. must be 'bilinear' 
     11; 
     12; @param datain {in}{required} 
     13; a 2D array the input data to interpolate 
     14; 
     15; @param lonin {in}{optional} 
     16; a 2D array defining the longitude of the input data 
     17; 
     18; @param latin {in}{optional} 
     19; a 2D array defining the latitude of the input data. 
     20; 
     21; @param mskin {in}{optional} 
     22; a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land) 
     23; 
     24; @param lonout {in}{optional} 
     25; 1D or 2D array defining the longitude of the output data. 
     26; 
     27; @param latout {in}{optional} 
     28; 1D or 2D array defining the latitude of the output data. 
     29; 
     30; @param mskout {in}{required} 
     31; a 2D array, the land-sea mask of the ouput data (1 on ocean, 0 on land) 
    1732; 
    1833; @keyword WEIG (see ADDR) 
    1934; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 
    20 ;     perform the interpolation: 
     35; perform the interpolation: 
    2136;          dataout = total(weig*datain[addr], 1) 
    2237;          dataout = reform(dataout, jpio, jpjo, /over) 
    23 ;     Those keywords can be set to named variables (that are undefined or equal to 0) into which the 
    24 ;     values will be copied when the current routine exits. Next, they can be used to perform 
    25 ;     the interpolation whithout computing again those 2 parameters. This greatly 
    26 ;     speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary. 
     38; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 
     39; values will be copied when the current routine exits. Next, they can be used to perform 
     40; the interpolation whithout computing again those 2 parameters. This greatly 
     41; speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary. 
    2742; 
    28 ; @returns 2D array the interpolated data 
     43; @returns 
     44; 2D array the interpolated data 
    2945; 
    3046; @restrictions 
  • trunk/SRC/Interpolation/fromreg.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; interpolate data from a "regular/rectangular grid" to any grid. 
    55;   2 methods availables: bilinear and imoms3 
     
    99; @categories interpolation 
    1010; 
    11 ; @param method {in}{required}  a string defining the interpolation method. 
    12 ;            must be 'bilinear' or 'imoms3' 
    13 ; @param datain {in}{required}  a 2D array the input data to interpolate 
    14 ; @param lonin {in}{optional}  1D or 2D array defining the longitude of the input data 
    15 ; @param latin {in}{optional}  1D or 2D array defining the latitude of the input data 
    16 ; @param lonout {in}{optional}  1D or 2D array defining the longitude of the output data 
    17 ; @param latout {in}{required}  1D or 2D array defining the latitude of the output data 
     11; @param method {in}{required} 
     12; a string defining the interpolation method. 
     13; must be 'bilinear' or 'imoms3' 
     14; 
     15; @param datain {in}{required} 
     16; a 2D array the input data to interpolate 
     17; 
     18; @param lonin {in}{optional} 
     19; 1D or 2D array defining the longitude of the input data 
     20; 
     21; @param latin {in}{optional} 
     22; 1D or 2D array defining the latitude of the input data 
     23; 
     24; @param lonout {in}{optional} 
     25; 1D or 2D array defining the longitude of the output data 
     26; 
     27; @param latout {in}{required} 
     28; 1D or 2D array defining the latitude of the output data 
    1829; 
    1930; @keyword WEIG (see ADDR) 
    2031; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 
    21 ;     perform the interpolation: 
     32; perform the interpolation: 
    2233;          dataout = total(weig*datain[addr], 1) 
    2334;          dataout = reform(dataout, jpio, jpjo, /over) 
    24 ;     Those keywords can be set to named variables (that are undefined or equal to 0) into which the 
    25 ;     values will be copied when the current routine exits. Next, they can be used to perform 
    26 ;     the interpolation whithout computing again those 2 parameters. In that 
    27 ;     case, lonin, latin, lonout and latout are not necessary. 
     35; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 
     36; values will be copied when the current routine exits. Next, they can be used to perform 
     37; the interpolation whithout computing again those 2 parameters. In that 
     38; case, lonin, latin, lonout and latout are not necessary. 
    2839; 
    2940; @keyword NONORTHERNLINE 
     
    3243; of the input data when perfoming the interpolation. 
    3344; 
    34 ; @returns 2D array the interpolated data 
     45; @returns 
     46; 2D array the interpolated data 
    3547; 
    3648; @restrictions 
  • trunk/SRC/Interpolation/get_gridparams.pro

    r134 r136  
    22; 
    33; @file_comments 
    4 ;   1) extract from a NetCDF file the longitude, latidude, and their dimensions 
    5 ;      and make sure it is 1D or 2D arrays 
    6 ; 
    7 ;   or 
    8 ;   2) given longitude and latitude arrays get their dimensions and make 
    9 ;  sure they are 1D or 2D arrays 
     4; 1) extract from a NetCDF file the longitude, latidude, and their dimensions 
     5; and make sure it is 1D or 2D arrays 
     6; 
     7; or 
     8; 2) given longitude and latitude arrays get their dimensions and make 
     9; sure they are 1D or 2D arrays 
    1010; 
    1111; @categories interpolation 
     
    2222; 
    2323; 1) 
    24 ; @param in1 {in}{required} the name of the netcdf file 
    25 ; @param in2 {in}{required} the name of the variable that contains the longitude in the NetCDF file 
    26 ; @param in3 {in}{required} the name of the variable that contains the latitude in the NetCDF file 
    27 ; @param in4 {out} the number of points in the longitudinal direction 
    28 ; @param in5 {out} the number of points in the latitudinal direction 
    29 ; @param in6 {out} the variable that will contain the longitudes 
    30 ; @param in7 {out} the variable that will contain the latitudes 
    31 ; @param in8 {out} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
     24; @param in1 {in}{required} 
     25; the name of the netcdf file 
     26; 
     27; @param in2 {in}{required} 
     28; the name of the variable that contains the longitude in the NetCDF file 
     29; 
     30; @param in3 {in}{required} 
     31; the name of the variable that contains the latitude in the NetCDF file 
     32; 
     33; @param in4 {out} 
     34; the number of points in the longitudinal direction 
     35; 
     36; @param in5 {out} 
     37; the number of points in the latitudinal direction 
     38; 
     39; @param in6 {out} 
     40; the variable that will contain the longitudes 
     41; 
     42; @param in7 {out} 
     43; the variable that will contain the latitudes 
     44; 
     45; @param in8 {out} 
     46; 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
    3247; 
    3348; or 
    3449; 
    3550; 2) 
    36 ; @param in1 {in}{required} 1d or 2D arrays defining longitudes and latitudes. 
    37 ; @param in2 {in}{required} 1d or 2D arrays defining longitudes and latitudes. 
    38 ;    Note that these arrays are also outputs and can therefore be modified. 
    39  
    40 ; @param in1 {out} the variable that will contain the longitudes 
    41 ; @param in2 {out} the variable that will contain the latitudes 
    42 ; @param in3 {in} the number of points in the longitudinal direction 
    43 ; @param in4 {in} the number of points in the latitudinal direction 
    44 ; @param in5 {in} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
    45 ;    arrays or 2D arrays (jpi,jpj). Note that of  n_dimensions = 1, then the 
    46 ;    grid must be regular (each longitudes must be the same for all latitudes 
    47 ;    and each latitudes should be the sae for all longitudes). 
    48 ; 
    49 ; @keyword DOUBLE use double precision to perform the computation 
     51; @param in1 {in}{required} 
     52; 1d or 2D arrays defining longitudes and latitudes. 
     53; 
     54; @param in2 {in}{required} 
     55; 1d or 2D arrays defining longitudes and latitudes. 
     56; Note that these arrays are also outputs and can therefore be modified. 
     57; 
     58; @param in1 {out} 
     59; the variable that will contain the longitudes 
     60; 
     61; @param in2 {out} 
     62; the variable that will contain the latitudes 
     63; 
     64; @param in3 {in} 
     65; the number of points in the longitudinal direction 
     66; 
     67; @param in4 {in} 
     68; the number of points in the latitudinal direction 
     69; 
     70; @param in5 {in} 
     71; 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
     72; arrays or 2D arrays (jpi,jpj). Note that of  n_dimensions = 1, then the 
     73; grid must be regular (each longitudes must be the same for all latitudes 
     74; and each latitudes should be the sae for all longitudes). 
     75; 
     76; @keyword DOUBLE 
     77; use double precision to perform the computation 
    5078; 
    5179; @examples 
  • trunk/SRC/Interpolation/inquad.pro

    r134 r136  
    11;+ 
    2 ; @file_comments  
     2; @file_comments 
    33; to find if an (x,y) point is in a quadrilateral (x1,x2,x3,x4) 
    44; 
     
    77; @param x {in}{required} 
    88; @param y {in}{required} 
    9 ;  the coordinates of the point we want to know where it is. 
    10 ;  Must be a scalar if /ONSPHERE activated else can be scalar or array. 
     9; the coordinates of the point we want to know where it is. 
     10; Must be a scalar if /ONSPHERE activated else can be scalar or array. 
    1111; 
    1212; @param x1 {in}{required} 
     
    1818; @param x4 {in}{required} 
    1919; @param y4 {in}{required} 
    20 ;  the coordinates of the quadrilateral given in the CLOCKWISE order. 
    21 ;  Scalar or array. 
    22 ; 
    23 ; @keyword DOUBLE use double precision to perform the computation 
    24 ; 
    25 ; @keyword ONSPHERE to specify that the quadilateral are on a sphere and 
    26 ;    that teir coordinates are longitude-latitude coordinates. In this 
    27 ;    case, est-west periodicity, poles singularity and other pbs 
    28 ;    related to longitude-latitude coordinates are managed 
    29 ;    automatically. 
     20; the coordinates of the quadrilateral given in the CLOCKWISE order. 
     21; Scalar or array. 
     22; 
     23; @keyword DOUBLE 
     24; use double precision to perform the computation 
     25; 
     26; @keyword ONSPHERE 
     27; to specify that the quadilateral are on a sphere and 
     28; that teir coordinates are longitude-latitude coordinates. In this 
     29; case, est-west periodicity, poles singularity and other pbs 
     30; related to longitude-latitude coordinates are managed 
     31; automatically. 
    3032; 
    3133; @keyword ZOOMRADIUS {default=4} 
    3234; the zoom (circle centred on the (x,y) with a radius of 
    33 ;    zoomradius degree where we look for the the quadrilateral which 
    34 ;    contains the (x,y) point) used for the satellite projection 
    35 ;    when /ONSPHERE is activated. 
    36 ;    4 seems to be the minimum which can be used. 
    37 ;    Can be increase if the cell size is larger than 5 degrees. 
    38 ; 
    39 ; @keyword NOPRINT to suppress the print messages. 
     35; zoomradius degree where we look for the the quadrilateral which 
     36; contains the (x,y) point) used for the satellite projection 
     37; when /ONSPHERE is activated. 
     38; 4 seems to be the minimum which can be used. 
     39; Can be increase if the cell size is larger than 5 degrees. 
     40; 
     41; @keyword NOPRINT 
     42; to suppress the print messages. 
    4043; 
    4144; @keyword NEWCOORD 
    4245; 
    4346; @returns 
    44 ;    a n element vector. Where n is the number of elements of 
    45 ;    x. res[i]=j means that the point number i is located in the 
    46 ;    quadrilateral number j with (0 <= j <= n_elements(x0)-1) 
     47; a n element vector. Where n is the number of elements of 
     48; x. res[i]=j means that the point number i is located in the 
     49; quadrilateral number j with (0 <= j <= n_elements(x0)-1) 
    4750; 
    4851; @restrictions 
     
    6770; IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
    6871; 
    69 ;      On a sphere see clickincell.pro... 
     72; On a sphere see clickincell.pro... 
    7073; 
    7174; @history 
     
    292295; point 
    293296    found = temporary(found)/ntofind 
    294 ; found must be sorted accordind to forsort 
     297; found must be sorted according to forsort 
    295298    found = found[sort(forsort)] 
    296299  ENDELSE 
  • trunk/SRC/Interpolation/inrecgrid.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; given - a list of points, (x,y) position 
    55;       - the x and y limits of a rectangular grid 
     
    2424; @keyword OUTPUT2D 
    2525; to get the output as a 2d array (2,n_elements(x1d)), 
    26 ;    with res[0,*] the x index accoring to the 1d array defined by 
    27 ;    left and res[1,*] the y index accoring to the 1d array defined by 
    28 ;    bottom. 
     26; with res[0,*] the x index according to the 1d array defined by 
     27; left and res[1,*] the y index according to the 1d array defined by bottom. 
    2928; 
    3029; @keyword CHECKOUT 
    3130; = [rbgrid,ubgrid] specify the right and upper boundaries of 
    32 ;    the grid and check if some points are out. 
     31; the grid and check if some points are out. 
    3332; 
    3433; @returns 
    35 ; the index on the cell accoring to the 2d array defined by left and bottom. 
     34; the index on the cell according to the 2d array defined by left and bottom. 
    3635; 
    3736; @examples 
  • trunk/SRC/Interpolation/ll_narcs_distances.pro

    r134 r136  
    88; 
    99; Formula from Map Projections - a working manual.  USGS paper 
    10 ; 1395.  Equations (5-5) and (5-6). 
     10; 1395. Equations (5-5) and (5-6). 
    1111; 
    1212; @categories Mapping, geography 
  • trunk/SRC/Interpolation/map_npoints.pro

    r134 r136  
    1 ;+  
    2 ;  
    3 ; @file_comments  
    4 ; Return the distance in meter between all np0 points P0 and all  
    5 ; np1 points P1 on a sphere. If keyword /TWO_BY_TWO is given then  
    6 ; returns the distances between number n of P0 points and number  
     1;+ 
     2; 
     3; @file_comments 
     4; Return the distance in meter between all np0 points P0 and all 
     5; np1 points P1 on a sphere. If keyword /TWO_BY_TWO is given then 
     6; returns the distances between number n of P0 points and number 
    77; n of P1 points (in that case, np0 and np1 must be equal). 
    88; Same as map_2points with the meter parameter but for n points 
     
    4646; an np-element vector giving the distance in meter between P0[i] 
    4747; and P1[i] (in that case, we have np0 = np1 = np) ; if /MIDDLE see this keyword. 
    48 ; 
    4948; @examples 
    5049; IDL> print, $ 
  • trunk/SRC/Interpolation/neighbor.pro

    r134 r136  
    77; @categories Maps 
    88; 
    9 ; @param p0lon {in}{required}  scalar. longitudes of point P0. 
    10 ; @param p0lat {in}{required}  scalar. latitudes of point P0. 
     9; @param p0lon {in}{required} 
     10; scalar. longitudes of point P0. 
     11; 
     12; @param p0lat {in}{required} 
     13; scalar. latitudes of point P0. 
     14; 
    1115; @param neighlon {in}{optional} 
     16; 
    1217; @param neighlat {in}{optional} 
    1318; 
  • trunk/SRC/Interpolation/quadrilateral2square.pro

    r134 r136  
    2828; given in the anticlockwise order. 
    2929; 
    30 ; @param xxin {in}{required} the coordinates of the point(s) for which we want to do the mapping. Can be scalar or array. 
    31 ; @param yyin {in}{required} the coordinates of the point(s) for which we want to do the mapping. Can be scalar or array. 
     30; @param xxin {in}{required} 
     31; the coordinates of the point(s) for which we want to do the mapping. 
     32; Can be scalar or array. 
     33; 
     34; @param yyin {in}{required} 
     35; the coordinates of the point(s) for which we want to do the mapping. 
     36; Can be scalar or array. 
    3237; 
    3338; @keyword PERF 
     
    3540; @returns 
    3641; 
    37 ;     (2,n) array: the new coodinates (xout, yout) of the (xin,yin) 
    38 ;     point(s) after mapping. 
    39 ;     If xin is a scalar, then n is equal to the number of elements of 
    40 ;     x0. If xin is an array , then n is equal to the number of 
    41 ;     elements of xin. 
     42; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) point(s) after 
     43; mapping. 
     44; If xin is a scalar, then n is equal to the number of elements of x0. 
     45; If xin is an array , then n is equal to the number of elements of xin. 
    4246; 
    4347; @restrictions 
  • trunk/SRC/Interpolation/spl_incr.pro

    r134 r136  
    1818; @param y1 {in}{required} 
    1919; f(x) = y. An n-element input vector that specifies the values 
    20 ;    of the tabulated function F(Xi) corresponding to Xi. As f is 
    21 ;    supposed to be monotonically increasing, y values must be 
    22 ;    monotonically increasing. y can have equal consecutive values. 
     20; of the tabulated function F(Xi) corresponding to Xi. As f is 
     21; supposed to be monotonically increasing, y values must be 
     22; monotonically increasing. y can have equal consecutive values. 
    2323; 
    2424; @param x2 {in}{required} 
     
    2727; 
    2828; @param der2 
     29; 
    2930; @param x 
    3031; 
     
    3435; 
    3536; @restrictions 
    36 ;   It might be possible that y2[i+1]-y2[i] has very small negative 
    37 ;   values (amplitude smaller than 1.e-6)... 
     37; It might be possible that y2[i+1]-y2[i] has very small negative 
     38; values (amplitude smaller than 1.e-6)... 
    3839; 
    3940; @examples 
  • trunk/SRC/Interpolation/spl_keep_mean.pro

    r134 r136  
    4141; 
    4242; @returns 
    43 ; 
    44 ;    y2: the meean value between two consecutive values of x2. This 
    45 ;    array has one element less than y2. y2 has double precision. 
     43; y2: the mean value between two consecutive values of x2. This 
     44; array has one element less than y2. y2 has double precision. 
    4645; 
    4746; @restrictions 
    48 ;   It might be possible that y2 has very small negative values 
    49 ;   (amplitude smaller than 1.e-6)... 
    50 ; 
     47; It might be possible that y2 has very small negative values 
     48; (amplitude smaller than 1.e-6)... 
    5149; 
    5250; @examples 
  • trunk/SRC/Interpolation/square2quadrilateral.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; warm (or map) a unit square onto an arbitrary quadrilateral 
    55; according to the 4-point correspondences: 
     
    1414; @categories image, grid manipulation 
    1515; 
    16 ; @param x0in {in}{required}  the coordinates of the quadrilateral 
    17 ;     (see above for correspondance with the unit square). Can be 
    18 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    19 ;     given in the anticlockwise order. 
    20 ; @param y0in {in}{required}  the coordinates of the quadrilateral 
    21 ;     (see above for correspondance with the unit square). Can be 
    22 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    23 ;     given in the anticlockwise order. 
    24 ; @param x1in {in}{required}  the coordinates of the quadrilateral 
    25 ;     (see above for correspondance with the unit square). Can be 
    26 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    27 ;     given in the anticlockwise order. 
    28 ; @param y1in {in}{required}  the coordinates of the quadrilateral 
    29 ;     (see above for correspondance with the unit square). Can be 
    30 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    31 ;     given in the anticlockwise order. 
    32 ; @param x2in {in}{required}  the coordinates of the quadrilateral 
    33 ;     (see above for correspondance with the unit square). Can be 
    34 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    35 ;     given in the anticlockwise order. 
    36 ; @param y2in {in}{required}  the coordinates of the quadrilateral 
    37 ;     (see above for correspondance with the unit square). Can be 
    38 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    39 ;     given in the anticlockwise order. 
    40 ; @param x3in {in}{required}  the coordinates of the quadrilateral 
    41 ;     (see above for correspondance with the unit square). Can be 
    42 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    43 ;     given in the anticlockwise order. 
    44 ; @param y3in {in}{required}  the coordinates of the quadrilateral 
    45 ;     (see above for correspondance with the unit square). Can be 
    46 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    47 ;     given in the anticlockwise order. 
     16; @param x0in {in}{required} 
     17; @param y0in {in}{required} 
     18; @param x1in {in}{required} 
     19; @param y1in {in}{required} 
     20; @param x2in {in}{required} 
     21; @param y2in {in}{required} 
     22; @param x3in {in}{required} 
     23; @param y3in {in}{required} 
     24; the coordinates of the quadrilateral (see above for correspondance with the 
     25; unit square). 
     26; Can be scalar or array. 
     27; (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are given in the anticlockwise order. 
    4828; 
    49 ; @param xxin {in}{optional} the coordinates of the point(s) for which we want to do the 
    50 ;     mapping. Can be scalar or array. 
    51 ; @param yyin {in}{optional} the coordinates of the point(s) for which we want to do the 
    52 ;     mapping. Can be scalar or array. 
     29; 
     30; @param xxin {in}{optional} 
     31; @param yyin {in}{optional} 
     32; the coordinates of the point(s) for which we want to do the mapping. 
    5333; 
    5434; @returns 
     35; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) 
     36; point(s) after mapping. 
     37; If xin is a scalar, then n is equal to the number of elements of 
     38; x0. If xin is an array , then n is equal to the number of 
     39; elements of xin. 
     40; If xin and yin are omited, square2quadrilateral returns the 
     41; matrix A which is used for the inverse transformation. 
    5542; 
    56 ;     (2,n) array: the new coodinates (xout, yout) of the (xin,yin) 
    57 ;     point(s) after mapping. 
    58 ;     If xin is a scalar, then n is equal to the number of elements of 
    59 ;     x0. If xin is an array , then n is equal to the number of 
    60 ;     elements of xin. 
    61 ;     If xin and yin are omited, square2quadrilateral returns the 
    62 ;     matrix A which is used for the inverse transformation. 
    63 ; 
    64 ; 
    65 ; @restrictions I think degenerated quadrilateral (e.g. flat of 
    66 ; twisted) is not work. This has to be tested. 
     43; @restrictions 
     44; I think degenerated quadrilateral (e.g. flat of twisted) is not work. 
     45; This has to be tested. 
    6746; 
    6847; @examples 
  • trunk/SRC/Matrix/cmapply.pro

    r134 r136  
    1 ;; Utility function, adapted from CMPRODUCT 
    21;+ 
     2; @file_comments 
     3; Utility function, adapted from CMPRODUCT 
     4; 
     5; @version $Id$ 
     6; 
    37; @todo seb 
    48;- 
     
    2024end 
    2125 
    22 ;; Utility function, used to collect collaped dimensions 
    2326;+ 
     27; @file_comments 
     28; cmapply_redim : Utility function, used to collect collaped dimensions 
     29; 
    2430; @todo seb 
    2531;- 
     
    5359;+ 
    5460; 
    55 ; @file_comments  
     61; @file_comments 
    5662; Applies a function to specified dimensions of an array 
    5763; 
    58 ;   Description: 
    59 ; 
    60 ;      CMAPPLY will apply one of a few select functions to specified  
    61 ;   dimensions of an array.  Unlike some IDL functions, you *do* have 
    62 ;   a choice of which dimensions that are to be "collapsed" by this 
    63 ;   function.  Iterative loops are avoided where possible, for  
    64 ;   performance reasons. 
     64; Description: 
     65; 
     66; CMAPPLY will apply one of a few select functions to specified 
     67; dimensions of an array.  Unlike some IDL functions, you *do* have 
     68; a choice of which dimensions that are to be "collapsed" by this 
     69; function.  Iterative loops are avoided where possible, for 
     70; performance reasons. 
    6571; 
    6672;   The possible functions are:             (and number of loop iterations:) 
     
    102108; @categories Arrays 
    103109; 
    104 ; @param OP {in}{required} The operation to perform, as a string.  May be upper or lower 
    105 ;        case. 
    106 ; 
    107 ;        If a user-defined operation is to be passed, then OP is of 
    108 ;        the form, 'USER:FUNCTNAME', where FUNCTNAME is the name of 
    109 ;        the user-defined function. 
    110 ; 
    111 ; @param ARRAY {in}{required} An array of values to be operated on.  Must not be of type 
    112 ;           STRING (7) or STRUCTURE (8). 
    113 ; 
    114 ; @param DIMS {in}{optional}{default=1 (ie, first dimension)}  
    115 ;          An array of dimensions that are to be "collapsed", where 
    116 ;          the the first dimension starts with 1 (ie, same convention 
    117 ;          as IDL function TOTAL).  Whereas TOTAL only allows one 
    118 ;          dimension to be added, you can specify multiple dimensions 
    119 ;          to CMAPPLY.  Order does not matter, since all operations 
    120 ;          are associative and transitive.  NOTE: the dimensions refer 
    121 ;          to the *input* array, not the output array.  IDL allows a  
    122 ;          maximum of 8 dimensions. 
    123 ;          DEFAULT: 1 (ie, first dimension) 
    124 ; 
    125 ; @keyword DOUBLE Set this if you wish the internal computations to be done 
    126 ;            in double precision if necessary.  If ARRAY is double  
    127 ;            precision (real or complex) then DOUBLE=1 is implied. 
    128 ;            DEFAULT: not set 
    129 ; 
    130 ; @keyword TYPE Set this to the IDL code of the desired output type (refer 
    131 ;          to documentation of SIZE()).  Internal results will be 
    132 ;          rounded to the nearest integer if the output type is an 
    133 ;          integer type. 
    134 ;          DEFAULT: same is input type 
    135 ; 
    136 ; @keyword FUNCTARGS If OP is 'USER:...', then the contents of this keyword 
    137 ;               are passed to the user function using the _EXTRA 
    138 ;               mechanism.  This way you can pass additional data to 
    139 ;               your user-supplied function, via keywords, without 
    140 ;               using common blocks. 
    141 ;               DEFAULT: undefined (i.e., no keywords passed by _EXTRA) 
    142 ; 
    143 ; @returns An array of the required TYPE, whose elements are the result of 
    144 ;   the requested operation.  Depending on the operation and number of 
    145 ;   elements in the input array, the result may be vulnerable to 
    146 ;   overflow or underflow. 
    147 ; 
    148 ; @examples  
    149 ;    
     110; @param OP {in}{required} 
     111; The operation to perform, as a string.  May be upper or lower case. 
     112; 
     113; If a user-defined operation is to be passed, then OP is of 
     114; the form, 'USER:FUNCTNAME', where FUNCTNAME is the name of 
     115; the user-defined function. 
     116; 
     117; @param ARRAY {in}{required} 
     118; An array of values to be operated on. 
     119; Must not be of type STRING (7) or STRUCTURE (8). 
     120; 
     121; @param dimapply {in}{optional}{default=1 (ie, first dimension)} 
     122; An array of dimensions that are to be "collapsed", where 
     123; the the first dimension starts with 1 (ie, same convention 
     124; as IDL function TOTAL).  Whereas TOTAL only allows one 
     125; dimension to be added, you can specify multiple dimensions 
     126; to CMAPPLY.  Order does not matter, since all operations 
     127; are associative and transitive.  NOTE: the dimensions refer 
     128; to the *input* array, not the output array.  IDL allows a 
     129; maximum of 8 dimensions. 
     130; 
     131; @keyword DOUBLE {default=not set} 
     132; Set this if you wish the internal computations to be done 
     133; in double precision if necessary.  If ARRAY is double 
     134; precision (real or complex) then DOUBLE=1 is implied. 
     135; 
     136; @keyword TYPE 
     137; Set this to the IDL code of the desired output type (refer 
     138; to documentation of SIZE()).  Internal results will be 
     139; rounded to the nearest integer if the output type is an 
     140; integer type. 
     141; DEFAULT: same is input type 
     142; 
     143; @keyword FUNCTARGS 
     144; If OP is 'USER:...', then the contents of this keyword 
     145; are passed to the user function using the _EXTRA 
     146; mechanism.  This way you can pass additional data to 
     147; your user-supplied function, via keywords, without 
     148; using common blocks. 
     149; DEFAULT: undefined (i.e., no keywords passed by _EXTRA) 
     150; 
     151; @returns 
     152; An array of the required TYPE, whose elements are the result of 
     153; the requested operation.  Depending on the operation and number of 
     154; elements in the input array, the result may be vulnerable to 
     155; overflow or underflow. 
     156; 
     157; @examples 
     158; 
    150159;   First example:  Shows how CMAPPLY can be used to total the second dimension of the 
    151160;   array called IN.  This is equivalent to OUT = TOTAL(IN, 2) 
     
    190199;   Changed usage message to not bomb, 24 Mar 2000, CM 
    191200;   Signficant rewrite for *, MIN and MAX (inspired by Todd Clements 
    192 ;     <Todd_Clements@alumni.hmc.edu>); FOR loop indices are now type 
     201;     <Todd_Clements\@alumni.hmc.edu>); FOR loop indices are now type 
    193202;     LONG; copying terms are liberalized, CM, 22, Aug 2000 
    194203;   More efficient MAX/MIN (inspired by Alex Schuster), CM, 25 Jan 
     
    199208; 
    200209;  Author: Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770 
    201 ;  craigm@lheamail.gsfc.nasa.gov 
     210;  craigm\@lheamail.gsfc.nasa.gov 
    202211; 
    203212; @version $Id$ 
     
    293302              if newop EQ 'MIN' then return, min(newarr) 
    294303          endif 
    295            
     304 
    296305          ;; Next task: create result array 
    297306          result = make_array(totkeep, type=type) 
    298            
     307 
    299308          ;; Now either iterate over the number of output elements, or 
    300309          ;; the number of collapsed elements, whichever is smaller. 
     
    302311              ;; Iterate over the number of collapsed elements 
    303312              result[0] = reform(newarr[0,*],totkeep,/overwrite) 
    304               case newop of  
     313              case newop of 
    305314                  'MAX': for i = 1L, totcol-1 do $ 
    306315                    result[0] = result > newarr[i,*] 
     
    310319          endif else begin 
    311320              ;; Iterate over the number of output elements 
    312               case newop of  
     321              case newop of 
    313322                  'MAX': for i = 0L, totkeep-1 do result[i] = max(newarr[*,i]) 
    314323                  'MIN': for i = 0L, totkeep-1 do result[i] = min(newarr[*,i]) 
     
    332341              return, call_function(functname, newarr) 
    333342          endif 
    334            
     343 
    335344          ;; Next task: create result array 
    336345          result = make_array(totkeep, type=type) 
    337            
     346 
    338347          ;; Iterate over the number of output elements 
    339348          if n_elements(functargs) GT 0 then begin 
     
    349358      end 
    350359 
    351                
     360 
    352361  endcase 
    353362 
     
    363372    return, call_function(castfns[type], newarr) 
    364373end 
    365    
  • trunk/SRC/Matrix/cmset_op.pro

    r134 r136  
    22; @hidden 
    33; 
     4; @file_comments 
     5; Simplified version of CMSET_OP_UNIQ which sorts, and takes the 
     6; "first" value, whatever that may mean. 
     7; 
    48; @todo seb 
    59;- 
    610; 
    7 ;; Simplified version of CMSET_OP_UNIQ which sorts, and takes the 
    8 ;; "first" value, whatever that may mean. 
    911function cmset_op_uniq, a 
    1012; 
     
    2224;+ 
    2325; 
    24 ; @file_comments  
     26; @file_comments 
    2527; Performs an AND, OR, or XOR operation between two sets 
    2628; 
    27 ;   Description: SET_OP performs three common operations between two sets. The 
    28 ;   three supported functions of OP are: 
     29; Description: SET_OP performs three common operations between two sets. The 
     30; three supported functions of OP are: 
    2931; 
    3032;        OP          Meaning 
    3133;      'AND' - to find the intersection of A and B; 
    3234;      'OR'  - to find the union of A and B; 
    33 ;      'XOR' - to find the those elements who are members of A or B  
     35;      'XOR' - to find the those elements who are members of A or B 
    3436;              but not both; 
    3537; 
    3638;   Sets as defined here are one dimensional arrays composed of 
    37 ;   numeric or string types.  Comparisons of equality between elements 
     39;   numeric or string types. Comparisons of equality between elements 
    3840;   are done using the IDL EQ operator. 
    3941; 
    4042;   The complements of either set can be taken as well, by using the 
    41 ;   NOT1 and NOT2 keywords.  For example, it may be desireable to find 
     43;   NOT1 and NOT2 keywords. For example, it may be desireable to find 
    4244;   the elements in A but not B, or B but not A (they are different!). 
    4345;   The following IDL expressions achieve each of those effects: 
     
    5254; 
    5355;   NOT1 and NOT2 can only be set for the 'AND' operator, and never 
    54 ;   simultaneously.  This is because the results of an operation with 
     56;   simultaneously. This is because the results of an operation with 
    5557;   'OR' or 'XOR' and any combination of NOTs -- or with 'AND' and 
    5658;   both NOTs -- formally cannot produce a defined result. 
    5759; 
    58 ;   The implementation depends on the type of operands.  For integer 
    59 ;   types, a fast technique using HISTOGRAM is used.  However, this 
     60;   The implementation depends on the type of operands. For integer 
     61;   types, a fast technique using HISTOGRAM is used. However, this 
    6062;   algorithm becomes inefficient when the dynamic range in the data 
    61 ;   is large.  For those cases, and for other data types, a technique 
    62 ;   based on SORT() is used.  Thus the compute time should scale 
     63;   is large. For those cases, and for other data types, a technique 
     64;   based on SORT() is used. Thus the compute time should scale 
    6365;   roughly as (A+B)*ALOG(A+B) or better, rather than (A*B) for the 
    64 ;   brute force approach.  For large arrays this is a significant 
     66;   brute force approach. For large arrays this is a significant 
    6567;   benefit. 
    6668; 
    6769; @categories array 
    6870; 
    69 ; @param A {in}{required} The two sets to be operated on.  A one dimensional array of 
    70 ;          either numeric or string type.  A and B must be of the same 
    71 ;          type.  Empty sets are permitted, and are either represented 
    72 ;          as an undefined variable, or by setting EMPTY1 or EMPTY2. 
    73 ; 
    74 ; @param B {in}{required} See A 
    75 ; 
    76 ; @param OP {in}{required} a string, the operation to be performed.  Must be one of 
    77 ;        'AND', 'OR' or 'XOR' (lower or mixed case is permitted). 
    78 ;        Other operations will cause an error message to be produced. 
    79 ; 
    80 ; @keyword NOT1 If set and OP is 'AND', then the complement of A (for 
    81 ;                NOT1) or B (for NOT2) will be used in the operation. 
    82 ;                NOT1 and NOT2 cannot be set simultaneously. 
    83 ; 
    84 ; @keyword NOT2 See NOT1 
    85 ; 
    86 ; @keyword EMPTY1 If set, then A (for EMPTY1) or B (for EMPTY2) are 
    87 ;                 assumed to be the empty set.  The actual values 
    88 ;                 passed as A or B are then ignored. 
    89 ; 
    90 ; @keyword EMPTY2 See EMPTY1 
    91 ; 
    92 ; @keyword INDEX if set, then return a list of indices instead of the array 
    93 ;           values themselves.  The "slower" set operations are always 
    94 ;           performed in this case. 
    95 ; 
    96 ;           The indices refer to the *combined* array [A,B].  To 
    97 ;           clarify, in the following call: I = CMSET_OP(..., /INDEX); 
    98 ;           returned values from 0 to NA-1 refer to A[I], and values 
    99 ;           from NA to NA+NB-1 refer to B[I-NA]. 
    100 ; 
    101 ; @keyword COUNT upon return, the number of elements in the result set. 
    102 ;           This is only important when the result set is the empty 
    103 ;           set, in which case COUNT is set to zero. 
    104 ; 
    105 ; @returns The resulting set as a one-dimensional array.  The set may be 
    106 ;   represented by either an array of data values (default), or an 
    107 ;   array of indices (if INDEX is set).  Duplicate elements, if any, 
    108 ;   are removed, and element order may not be preserved. 
    109 ; 
    110 ;   The empty set is represented as a return value of -1L, and COUNT 
    111 ;   is set to zero.  Note that the only way to recognize the empty set 
    112 ;   is to examine COUNT. 
     71; @param A {in}{required} 
     72; The two sets to be operated on. A one dimensional array of 
     73; either numeric or string type. A and B must be of the same 
     74; type. Empty sets are permitted, and are either represented 
     75; as an undefined variable, or by setting EMPTY1 or EMPTY2. 
     76; 
     77; @param B {in}{required} 
     78; See A 
     79; 
     80; @param OP0 {in}{required} 
     81; a string, the operation to be performed. Must be one of 
     82; 'AND', 'OR' or 'XOR' (lower or mixed case is permitted). 
     83; Other operations will cause an error message to be produced. 
     84; 
     85; @keyword NOT1 
     86; If set and OP is 'AND', then the complement of A (for 
     87; NOT1) or B (for NOT2) will be used in the operation. 
     88; NOT1 and NOT2 cannot be set simultaneously. 
     89; 
     90; @keyword NOT2 
     91; See NOT1 
     92; 
     93; @keyword EMPTY1 
     94; If set, then A (for EMPTY1) or B (for EMPTY2) are 
     95; assumed to be the empty set. The actual values 
     96; passed as A or B are then ignored. 
     97; 
     98; @keyword EMPTY2 
     99; See EMPTY1 
     100; 
     101; @keyword INDEX 
     102; if set, then return a list of indices instead of the array 
     103; values themselves. The "slower" set operations are always 
     104; performed in this case. 
     105; 
     106; The indices refer to the *combined* array [A,B]. To 
     107; clarify, in the following call: I = CMSET_OP(..., /INDEX); 
     108; returned values from 0 to NA-1 refer to A[I], and values 
     109; from NA to NA+NB-1 refer to B[I-NA]. 
     110; 
     111; @keyword COUNT 
     112; upon return, the number of elements in the result set. 
     113; This is only important when the result set is the empty 
     114; set, in which case COUNT is set to zero. 
     115; 
     116; @returns 
     117; The resulting set as a one-dimensional array. The set may be 
     118; represented by either an array of data values (default), or an 
     119; array of indices (if INDEX is set). Duplicate elements, if any, 
     120; are removed, and element order may not be preserved. 
     121; 
     122; The empty set is represented as a return value of -1L, and COUNT 
     123; is set to zero. Note that the only way to recognize the empty set 
     124; is to examine COUNT. 
    113125; 
    114126; SEE ALSO: 
    115127; 
    116  SET_UTILS.PRO by RSI 
     128SET_UTILS.PRO by RSI 
    117129; 
    118130; @history Written, CM, 23 Feb 2000 
     
    145157; 
    146158;   Author: Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770 
    147 ;   craigm@lheamail.gsfc.nasa.gov 
    148 ; 
    149 ; @version $Id: cmset_op.pro,v 1.6 2006/01/16 19:45:22 craigm Exp $ 
    150 ; 
    151 ; @examples Utility function, similar to UNIQ, but allowing choice of taking 
     159;   craigm\@lheamail.gsfc.nasa.gov 
     160; 
     161; @version $Id$ 
     162; 
     163; @examples 
     164; Utility function, similar to UNIQ, but allowing choice of taking 
    152165; first or last unique element, or non-unique elements. 
    153166; Unfortunately this doesn't work because of implementation dependent 
     
    235248      if n2 GT 0 then b1 = cmset_op_uniq(b) 
    236249      n1 = n_elements(a1) < n1 & n2 = n_elements(b1) < n2 
    237       case op of  
     250      case op of 
    238251          'OR': if n1 EQ 0 then goto, RET_A1 else goto, RET_B1 
    239252         'XOR': if n1 EQ 0 then goto, RET_B1 else goto, RET_A1 
     
    255268     if kind then begin 
    256269         if count GT 0 then return, b1+n1 else return, -1L 
    257      endif          
     270     endif 
    258271     if count GT 0 then return, b[b1] else return, -1L 
    259272 endif 
     
    294307      ;; String and real types, or large int arrays 
    295308      SLOW_SET_OP: 
    296       case op of  
     309      case op of 
    297310          'OR': begin 
    298311              uu = [a,b]    ;; OR is simple; just take unique values 
     
    394407 
    395408      ;; Compute NOT cases 
    396       if keyword_set(not1) then ha = 1b - ha   
     409      if keyword_set(not1) then ha = 1b - ha 
    397410      if keyword_set(not2) then hb = 1b - hb 
    398       case op of  
     411      case op of 
    399412          ;; Boolean operations 
    400           'AND': mask = temporary(ha) AND temporary(hb)  
     413          'AND': mask = temporary(ha) AND temporary(hb) 
    401414           'OR': mask = temporary(ha)  OR temporary(hb) 
    402415          'XOR': mask = temporary(ha) XOR temporary(hb) 
     
    405418      wh = where(temporary(mask), count) 
    406419      if count EQ 0 then return, -1L 
    407        
     420 
    408421      result = temporary(wh+minn) 
    409422      if tp1 NE tp2 then return, result 
  • trunk/SRC/Matrix/congridseb.pro

    r134 r136  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; @file_comment  
     5; @file_comments 
    66; Like congrid but here, it works... 
    77;        example: 
    8 ;IDL> print, congrid([[1,2,3,4],[5,6,7,8]],12,4) 
     8; IDL> print, congrid([[1,2,3,4],[5,6,7,8]],12,4) 
    99;       1 1 1 2 2 2 3 3 3 3 4 4 
    1010;       1 1 1 2 2 2 3 3 3 3 4 4 
    1111;       5 5 5 6 6 6 7 7 7 7 8 8 
    1212;       5 5 5 6 6 6 7 7 7 7 8 8 
    13 ;IDL> print, rebin([[1,2,3,4],[5,6,7,8]],12,4) 
     13; IDL> print, rebin([[1,2,3,4],[5,6,7,8]],12,4) 
    1414;       1 1 1 2 2 2 3 3 3 4 4 4 
    1515;       3 3 3 4 4 4 5 5 5 6 6 6 
    1616;       5 5 5 6 6 6 7 7 7 8 8 8 
    1717;       5 5 5 6 6 6 7 7 7 8 8 8 
    18 ;IDL> print, congridseb([[1,2,3,4],[5,6,7,8]],12,4) 
     18; IDL> print, congridseb([[1,2,3,4],[5,6,7,8]],12,4) 
    1919;       1 1 1 2 2 2 3 3 3 4 4 4 
    2020;       1 1 1 2 2 2 3 3 3 4 4 4 
     
    2424; @categories utilities 
    2525; 
    26 ; @param tableau {in}{required} A table 1 ou 2d 
     26; @param tableau {in}{required} 
     27; A table 1 ou 2d 
    2728; 
    28 ; @param x {in}{required} dimension in x of the result which must be  
    29 ;                         a multiple of the dimension in x of the table. 
     29; @param x {in}{required} 
     30; dimension in x of the result which must be 
     31; a multiple of the dimension in x of the table. 
    3032; 
    31 ; @param y {in}{required} dimension in y of the result which must be  
    32 ;                         a multiple of the dimension in y of the table. 
     33; @param y {in}{required} 
     34; dimension in y of the result which must be 
     35; a multiple of the dimension in y of the table. 
    3336; 
    34 ; @returns res a table dim x * y 
     37; @returns 
     38; a table dim x * y 
    3539; 
    36 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     40; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3741;                      20/3/98 
    3842;                      18/6/1999 supression d''une horrible boucle 
     
    6468      end 
    6569      else: return, report('Mauvais nombre de parametre dans l''appel de CONGRIDSEB') 
    66    endcase             
     70   endcase 
    6771end 
  • trunk/SRC/Matrix/extrac2.pro

    r134 r136  
    44;+ 
    55; 
    6 ; @fie-comments  
    7 ; extractoin of subdomains of matrixes; Even if the subdomain is "pierced" (see the example) 
     6; @file_comments 
     7; extraction of subdomains of matrixes; 
     8; Even if the subdomain is "pierced" (see the example) 
    89; By default, IDL can make extractions of subdomain: 
    910; 
    10 ;      IDL> a=indgen(5,5)  
    11 ;      IDL> print, a  
     11;      IDL> a=indgen(5,5) 
     12;      IDL> print, a 
    1213;             0       1       2       3       4 
    1314;             5       6       7       8       9 
     
    1516;            15      16      17      18      19 
    1617;            20      21      22      23      24 
    17 ;      IDL> print, a[[0,2],3]  
     18;      IDL> print, a[[0,2],3] 
    1819;            15      17 
    19 ;      IDL> print, a[[0,2],*]   
     20;      IDL> print, a[[0,2],*] 
    2021;             0       2 
    2122;             5       7 
     
    2425;            20      22 
    2526; but 
    26 ;      IDL> print, a[[0,2],[3,4]]  
     27;      IDL> print, a[[0,2],[3,4]] 
    2728;            15      22 
    2829; while 
    29 ;      IDL> print, extrac2(a,[0,2],[3,4])   
     30;      IDL> print, extrac2(a,[0,2],[3,4]) 
    3031;            15      17 
    3132;            20      22 
     
    3334; @categories utilities 
    3435; 
    35 ; @param array {in}{required} a 1,2,3 or 4 dim input array 
     36; @param array {in}{required} 
     37; a 1,2,3 or 4 dim input array 
    3638; 
    37 ; @param index1 {in}{required} can have 2 forms: 
    38 ;              1)a vector containing indexes of lines we want to keep 
    39 ;              2)the string '*' if we want to keep all lines. 
     39; @param index1 {in}{required} 
     40; can have 2 forms: 
     41; 1)a vector containing indexes of lines we want to keep 
     42; 2)the string '*' if we want to keep all lines. 
    4043; 
    41 ; @param index2 {in}{required} the same thing that index1 but for dim 2. 
     44; @param index2 {in}{required} 
     45; the same thing that index1 but for dim 2. 
    4246; 
    43 ; @param index3 {in}{required} the same thing that index1 but for dim 3. 
     47; @param index3 {in}{required} 
     48; the same thing that index1 but for dim 3. 
     49; 
     50; @param index4 {in}{required} 
     51; the same thing that index1 but for dim 4. 
     52; 
     53; @returns 
     54; a matrix 1,2,3 or 4d extract from input array 
     55; 
     56; @restrictions 
     57; -1 in case of mistake 
     58; 
     59; @examples 
     60; I have a dim 2 matrix named A. I want extract a small intersection 
     61; matrix 2d of the line 2,3 and 7 and of the column 0 and 1: 
    4462;  
    45 ; @param index4 {in}{required} the same thing that index1 but for dim 4. 
     63; IDL> res=extrac2(A,[2,3,7],[0,1]) 
    4664; 
    47 ; @returns a matrix 1,2,3 or 4d extract from input array 
     65; other ex: 
     66; IDL> print, a 
     67; a b c 
     68; d e f 
     69; g h i 
     70; IDL> print, extrac2(a,[0,2],[0,2]) 
     71; a c 
     72; g i 
    4873; 
    49 ; @restrictions res=-1 in case of mistake 
    50 ; 
    51 ;  
    52 ; @examples I have a dim 2 matrix named A. I want extract a small intersection  
    53 ;          matrix 2d of the line 2,3 and 7 and of the column 0 and 1: 
    54 ;       
    55 ;      res=extrac2(A,[2,3,7],[0,1]) 
    56 ; 
    57 ;other ex: 
    58 ;      IDL> print, a  
    59 ;      a b c 
    60 ;      d e f 
    61 ;      g h i 
    62 ;      IDL> print, extrac2(a,[0,2],[0,2])         
    63 ;      a c 
    64 ;      g i 
    65 ; 
    66 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     74; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    6775;                       12/1/1999 
    6876;                       29/4/1999: correction of a bug and complement of the heading 
     
    8694   if n_params() NE taille[0]+1 THEN $ 
    8795    return, report('we need as many indexes as the number of dimensions of the input array') 
    88    IF n_params() GE 5 THEN BEGIN  
     96   IF n_params() GE 5 THEN BEGIN 
    8997      if size(index4,/type) EQ 7 then index4 = lindgen(taille[4]) $ 
    9098      ELSE index4 = long(index4) 
    91       nt = n_elements(index4)  
    92    ENDIF  
    93    IF n_params() GE 4 THEN BEGIN  
     99      nt = n_elements(index4) 
     100   ENDIF 
     101   IF n_params() GE 4 THEN BEGIN 
    94102      if size(index3,/type) EQ 7 then index3 = lindgen(taille[3]) $ 
    95103      ELSE index3 = long(index3) 
    96       nz = n_elements(index3)  
    97    ENDIF  
    98    IF n_params() GE 3 THEN BEGIN  
     104      nz = n_elements(index3) 
     105   ENDIF 
     106   IF n_params() GE 3 THEN BEGIN 
    99107      if size(index2,/type) EQ 7 then index2 = lindgen(taille[2]) $ 
    100108      ELSE index2 = long(index2) 
    101       ny = n_elements(index2)  
     109      ny = n_elements(index2) 
    102110   ENDIF 
    103    IF n_params() GE 2 THEN BEGIN  
     111   IF n_params() GE 2 THEN BEGIN 
    104112      if size(index1,/type) EQ 7 then index1 = lindgen(taille[1]) $ 
    105113      ELSE index1 = long(index1) 
    106       nx = n_elements(index1)  
     114      nx = n_elements(index1) 
    107115   ENDIF 
    108     
     116 
    109117;------------------------------------------------------------ 
    110118; construction of an array of indexes and of results following the size of array 
     
    115123         index = index1#replicate(1, ny)+taille[1]*replicate(1, nx)#index2 
    116124         res = array[index] 
    117       END  
     125      END 
    118126      3:BEGIN 
    119127         index = index1#replicate(1, ny)+taille[1]*replicate(1, nx)#index2 
     
    121129          +taille[1]*taille[2]*replicate(1, nx*ny)#index3 
    122130         res = array[reform(index, nx, ny, nz, /over)] 
    123       END  
     131      END 
    124132      4:BEGIN 
    125133         index = index1#replicate(1, ny)+taille[1]*replicate(1, nx)#index2 
     
    129137          +taille[1]*taille[2]*taille[3]*replicate(1, nx*ny*nz)#index4 
    130138         res = array[reform(index, nx, ny, nz, nz, /over)] 
    131       END  
     139      END 
    132140   endcase 
    133141 
  • trunk/SRC/Obsolete/extrait.pro

    r134 r136  
    44;+ 
    55; 
    6 ; @fie-comments  
    7 ; extractoin of subdomains of matrixes; Even if the subdomain is "pierced" (see the example) 
     6; @file_comments  
     7; extraction of subdomains of matrixes;  
     8; Even if the subdomain is "pierced" (see the example) 
    89; By default, IDL can make extractions of subdomain: 
    910; 
     
    3839; @categories utilities 
    3940; 
    40 ; @param tab {in}{required} a 1,2,3 or 4 dim table 
     41; @param tab {in}{required}  
     42; a 1,2,3 or 4 dim table 
    4143; 
    42 ; @param indicex {in}{required} can have 2 forms: 
    43 ;              1)a vector containing indexes of lines we want to keep 
    44 ;              2)the string '*' if we want to keep all lines. 
     44; @param indicex {in}{required}  
     45; can have 2 forms: 
     46; 1)a vector containing indexes of lines we want to keep 
     47; 2)the string '*' if we want to keep all lines. 
    4548; 
    46 ; @param indicey {in}{required} the same thing that indicex but for dim 2. 
     49; @param indicey {in}{required}  
     50; the same thing that indicex but for dim 2. 
    4751; 
    48 ; @param indicez {in}{required} the same thing that indicex but for dim 3. 
     52; @param indicez {in}{required}  
     53; the same thing that indicex but for dim 3. 
    4954;  
    50 ; @param indicet {in}{required} the same thing that indicex but for dim 4. 
     55; @param indicet {in}{required}  
     56; the same thing that indicex but for dim 4. 
    5157; 
    52 ; @returns a matrix 1,2,3 or 4d extract from tab 
     58; @returns  
     59; a matrix 1,2,3 or 4d extract from tab 
    5360; 
    54 ; @restrictions res=-1 in case of mistake 
     61; @restrictions  
     62; res=-1 in case of mistake 
     63;  
     64; @examples  
     65; I have a dim 2 matrix named A. I want extract a small intersection  
     66; matrix 2d of the line 2,3 and 7 and of the column 0 and 1: 
     67;       
     68; IDL> res=extrait(A,[2,3,7],[0,1]) 
    5569; 
     70; other ex: 
     71; IDL> print, a  
     72; a b c 
     73; d e f 
     74; g h i 
     75; IDL> print, extrait(a,[0,2],[0,2])         
     76; a c 
     77; g i 
    5678;  
    57 ; @examples I have a dim 2 matrix named A. I want extract a small intersection  
    58 ;          matrix 2d of the line 2,3 and 7 and of the column 0 and 1: 
    59 ;       
    60 ;      res=extrait(A,[2,3,7],[0,1]) 
    61 ; 
    62 ;other ex: 
    63 ;      IDL> print, a  
    64 ;      a b c 
    65 ;      d e f 
    66 ;      g h i 
    67 ;      IDL> print, extrait(a,[0,2],[0,2])         
    68 ;      a c 
    69 ;      g i 
    70 ; 
    71 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    72 ;                       12/1/1999 
    73 ;                       29/4/1999: correction of a bug and complement of the heading 
     79; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     80; 12/1/1999 
     81; 29/4/1999: correction of a bug and complement of the heading 
    7482; 
    7583; @version $Id$ 
  • trunk/SRC/Picture/image_viewer.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; The purpose of this program is to provide an interactive tool that can be used 
    55; to view JPEG, BMP, GIF, PNG, and TIFF picture files.  Images are loaded into 
     
    1111; @param event {in}{required} 
    1212; 
    13 ; @restrictions While this program is running in an IDL session it will change the current 
    14 ;       working directory, enables/disables color decomposition, and sets !QUIET=1, 
    15 ;       !ORDER=0, & !P.BACKGROUND=0.  These settings are returned to their initial 
    16 ;       settings before the program was initiated once it is terminated. 
    17 ; 
    18 ; @restrictions This program is supported in IDL version 5.5 and newer.  In order to open 
    19 ;       GIF files or TIFF files with LZW compression the copy of IDL being used must 
    20 ;       be licensed with these features.  IDL only supports BMP files in the standard 
    21 ;       Windows format and does not support OS2 bitmaps. 
     13; @restrictions 
     14; While this program is running in an IDL session it will change the current 
     15; working directory, enables/disables color decomposition, and sets !QUIET=1, 
     16; !ORDER=0, & !P.BACKGROUND=0.  These settings are returned to their initial 
     17; settings before the program was initiated once it is terminated. 
     18; 
     19; @restrictions 
     20; This program is supported in IDL version 5.5 and newer.  In order to open 
     21; GIF files or TIFF files with LZW compression the copy of IDL being used must 
     22; be licensed with these features.  IDL only supports BMP files in the standard 
     23; Windows format and does not support OS2 bitmaps. 
    2224; 
    2325; @history Written by: AEB, 1/02. 
     
    972974;********************************************************************************************* 
    973975;+ 
    974 ; @param widjetID {in}{required} 
     976; @param widgetID {in}{required} 
    975977;- 
    976978PRO IMAGE_VIEWER_CLEANUP,widgetID 
  • trunk/SRC/Picture/imdisp.pro

    r134 r136  
    191191;+ 
    192192; 
    193 ; @file_comments  
     193; @file_comments 
    194194;    Display an image on the current graphics device. 
    195195;    IMDISP is an advanced replacement for TV and TVSCL. 
     
    216216; @categories Image display 
    217217; 
    218 ; @param IMAGE {in}{required} Array containing image data. 
    219 ;                Pseudo (indexed) color images must have 2 dimensions. 
    220 ;                True color images must have 3 dimensions, in either 
    221 ;                [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. 
    222 ; 
    223 ; @keyword RANGE For Pseudo Color images only, a vector with two elements 
    224 ;                specifying the minimum and maximum values of the image 
    225 ;                array to be considered when the image is byte-scaled 
    226 ;                (default is minimum and maximum array values). 
    227 ;                This keyword is ignored for True Color images, 
    228 ;                or if the NOSCALE keyword is set. 
    229 ; 
    230 ; @keyword BOTTOM Bottom value in the color table to be used 
    231 ;                for the byte-scaled image 
    232 ;                (default is 0). 
    233 ;                This keyword is ignored if the NOSCALE keyword is set. 
    234 ; 
    235 ; @keyword NCOLORS Number of colors in the color table to be used 
    236 ;                for the byte-scaled image 
    237 ;                (default is !D.TABLE_SIZE - BOTTOM). 
    238 ;                This keyword is ignored if the NOSCALE keyword is set. 
    239 ; 
    240 ; @keyword MARGIN A scalar value specifying the margin to be maintained 
    241 ;                around the image in normal coordinates 
    242 ;                (default is 0.1, or 0.025 if !P.MULTI is set to display 
    243 ;                multiple images). 
    244 ; 
    245 ; @keyword INTERP If set, the resized image will be interpolated using 
    246 ;                bilinear interpolation 
    247 ;                (default is nearest neighbor sampling). 
    248 ; 
    249 ; @keyword DITHER If set, true color images will be dithered when displayed 
    250 ;                on an 8-bit graphics device 
    251 ;                (default is no dithering). 
    252 ; 
    253 ; @keyword ASPECT A scalar value specifying the aspect ratio (height/width) 
    254 ;                for the displayed image 
    255 ;                (default is to maintain native aspect ratio). 
    256 ; 
    257 ; @keyword POSITION On input, a 4-element vector specifying the position 
    258 ;                of the displayed image in the form [X0,Y0,X1,Y1] in 
    259 ;                in normal coordinates 
    260 ;                (default is [0.0,0.0,1.0,1.0]). 
    261 ;                See the examples below to display an image where only the 
    262 ;                offset and size are known (e.g. MAP_IMAGE output). 
    263 ; 
    264 ; @keyword OUT_POS On output, a 4-element vector specifying the position 
    265 ;                actually used to display the image. 
    266 ; 
    267 ; @keyword NOSCALE If set, the image will not be byte-scaled 
    268 ;                (default is to byte-scale the image). 
    269 ; 
    270 ; @keyword NORESIZE If set, the image will not be resized. 
    271 ;                (default is to resize the image to fit the display). 
    272 ; 
    273 ; @keyword ORDER If set, the image is displayed from the top down 
    274 ;                (default is to display the image from the bottom up). 
    275 ;                Note that the system variable !ORDER is always ignored. 
    276 ; 
    277 ; @keyword USEPOS If set, the image will be sized to exactly fit a supplied 
    278 ;                POSITION vector, over-riding ASPECT and MARGIN 
    279 ;                (default is to honor ASPECT and MARGIN when a POSITION 
    280 ;                vector is supplied). 
    281 ; 
    282 ; @keyword CHANNEL Display channel (Red, Green, or Blue) to be written. 
    283 ;                0 => All channels (the default) 
    284 ;                1 => Red channel 
    285 ;                2 => Green channel 
    286 ;                3 => Blue channel 
    287 ;                This keyword is only recognized by graphics devices which 
    288 ;                support 24-bit decomposed color (WIN, MAC, X). It is ignored 
    289 ;                by all other graphics devices. However True color (RGB) 
    290 ;                images can be displayed on any device supported by IMDISP. 
    291 ; 
    292 ; @keyword BACKGROUND If set to a positive integer, the background will be filled 
    293 ;                with the color defined by BACKGROUND. 
    294 ; 
    295 ; @keyword ERASE If set, the screen contents will be erased. Note that if 
    296 ;                !P.MULTI is set to display multiple images, the screen is 
    297 ;                always erased when the first image is displayed. 
    298 ; 
    299 ; @keyword AXIS If set, plot axes will be drawn on the image. The default 
    300 ;                x and y axis ranges are determined by the size of the image. 
    301 ;                When the AXIS keyword is set, IMDISP accepts any keywords 
    302 ;                supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). 
    303 ; 
    304 ; @keyword NEGATIVE If set, a photographic negative of the image is displayed. 
    305 ;                The values of BOTTOM and NCOLORS are honored. This keyword 
    306 ;                allows True color images scanned from color negatives to be 
    307 ;                displayed. It also allows Pseudo color images to be displayed 
    308 ;                as negatives without reversing the color table. This keyword 
    309 ;                is ignored if the NOSCALE keyword is set. 
    310 ; 
    311 ; @restrictions The image is displayed on the current graphics device. 
    312 ; 
    313 ; @restrictions Requires IDL 5.0 or higher (square bracket array syntax). 
     218; @param IMAGE {in}{required} 
     219; Array containing image data. 
     220; Pseudo (indexed) color images must have 2 dimensions. 
     221; True color images must have 3 dimensions, in either 
     222; [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. 
     223; 
     224; @keyword RANGE 
     225; For Pseudo Color images only, a vector with two elements 
     226; specifying the minimum and maximum values of the image 
     227; array to be considered when the image is byte-scaled 
     228; (default is minimum and maximum array values). 
     229; This keyword is ignored for True Color images, 
     230; or if the NOSCALE keyword is set. 
     231; 
     232; @keyword BOTTOM 
     233; Bottom value in the color table to be used 
     234; for the byte-scaled image 
     235; (default is 0). 
     236; This keyword is ignored if the NOSCALE keyword is set. 
     237; 
     238; @keyword NCOLORS 
     239; Number of colors in the color table to be used 
     240; for the byte-scaled image 
     241; (default is !D.TABLE_SIZE - BOTTOM). 
     242; This keyword is ignored if the NOSCALE keyword is set. 
     243; 
     244; @keyword MARGIN 
     245; A scalar value specifying the margin to be maintained 
     246; around the image in normal coordinates 
     247; (default is 0.1, or 0.025 if !P.MULTI is set to display 
     248; multiple images). 
     249; 
     250; @keyword INTERP 
     251; If set, the resized image will be interpolated using 
     252; bilinear interpolation 
     253; (default is nearest neighbor sampling). 
     254; 
     255; @keyword DITHER 
     256; If set, true color images will be dithered when displayed 
     257; on an 8-bit graphics device 
     258; (default is no dithering). 
     259; 
     260; @keyword ASPECT 
     261; A scalar value specifying the aspect ratio (height/width) 
     262; for the displayed image 
     263; (default is to maintain native aspect ratio). 
     264; 
     265; @keyword POSITION {default= [0.0,0.0,1.0,1.0]} 
     266; On input, a 4-element vector specifying the position 
     267; of the displayed image in the form [X0,Y0,X1,Y1] in 
     268; in normal coordinates 
     269; See the examples below to display an image where only the 
     270; offset and size are known (e.g. MAP_IMAGE output). 
     271; 
     272; @keyword OUT_POS 
     273; On output, a 4-element vector specifying the position 
     274; actually used to display the image. 
     275; 
     276; @keyword NOSCALE 
     277; If set, the image will not be byte-scaled 
     278; (default is to byte-scale the image). 
     279; 
     280; @keyword NORESIZE 
     281; If set, the image will not be resized. 
     282; (default is to resize the image to fit the display). 
     283; 
     284; @keyword ORDER 
     285; If set, the image is displayed from the top down 
     286; (default is to display the image from the bottom up). 
     287; Note that the system variable !ORDER is always ignored. 
     288; 
     289; @keyword USEPOS 
     290; If set, the image will be sized to exactly fit a supplied 
     291; POSITION vector, over-riding ASPECT and MARGIN 
     292; (default is to honor ASPECT and MARGIN when a POSITION 
     293; vector is supplied). 
     294; 
     295; @keyword CHANNEL 
     296; Display channel (Red, Green, or Blue) to be written. 
     297; 0 => All channels (the default) 
     298; 1 => Red channel 
     299; 2 => Green channel 
     300; 3 => Blue channel 
     301; This keyword is only recognized by graphics devices which 
     302; support 24-bit decomposed color (WIN, MAC, X). It is ignored 
     303; by all other graphics devices. However True color (RGB) 
     304; images can be displayed on any device supported by IMDISP. 
     305; 
     306; @keyword BACKGROUND 
     307; If set to a positive integer, the background will be filled 
     308; with the color defined by BACKGROUND. 
     309; 
     310; @keyword ERASE 
     311; If set, the screen contents will be erased. Note that if 
     312; !P.MULTI is set to display multiple images, the screen is 
     313; always erased when the first image is displayed. 
     314; 
     315; @keyword AXIS 
     316; If set, plot axes will be drawn on the image. The default 
     317; x and y axis ranges are determined by the size of the image. 
     318; When the AXIS keyword is set, IMDISP accepts any keywords 
     319; supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). 
     320; 
     321; @keyword NEGATIVE 
     322; If set, a photographic negative of the image is displayed. 
     323; The values of BOTTOM and NCOLORS are honored. This keyword 
     324; allows True color images scanned from color negatives to be 
     325; displayed. It also allows Pseudo color images to be displayed 
     326; as negatives without reversing the color table. This keyword 
     327; is ignored if the NOSCALE keyword is set. 
     328; 
     329; @restrictions 
     330; The image is displayed on the current graphics device. 
     331; 
     332; @restrictions 
     333; Requires IDL 5.0 or higher (square bracket array syntax). 
    314334; 
    315335; @examples 
     
    317337;;- Load test data 
    318338; 
    319 ;openr, lun, filepath('ctscan.dat', subdir='examples/data'), /get_lun 
     339; openr, lun, filepath('ctscan.dat', subdir='examples/data'), /get_lun 
    320340;ctscan = bytarr(256, 256) 
    321341;readu, lun, ctscan 
     
    452472;map_grid 
    453473; 
    454 ; @history Liam.Gumley@ssec.wisc.edu 
     474; @history Liam.Gumley\@ssec.wisc.edu 
    455475; http://cimss.ssec.wisc.edu/~gumley 
    456476; 
     
    471491; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    472492; 
    473 ; @version $Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $ 
     493; @version $Id$ 
    474494; 
    475495;- 
     
    485505; 
    486506 
    487 rcs_id = '$Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $' 
     507rcs_id = '$Id$' 
    488508 
    489509;------------------------------------------------------------------------------- 
  • trunk/SRC/Picture/saveimage.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; Save the current graphics window to an output file (GIF by default). 
    55; 
     
    1717; @categories Input/Output. 
    1818; 
    19 ; @param FILE {in}{required} Name of the output file (GIF format by default). 
    20 ; 
    21 ; @keyword BMP Set this keyword to create BMP format (8-bit with color table). 
    22 ; 
    23 ; @keyword PNG Set this keyword to create PNG format (8-bit with color table). 
    24 ; 
    25 ; @keyword PICT Set this keyword to create PICT format (8-bit with color table). 
    26 ; 
    27 ; @keyword JPEG Set this keyword to create JPEG format (24-bit true color). 
    28 ; 
    29 ; @keyword TIFF Set this keyword to create TIFF format (24-bit true color). 
    30 ; 
    31 ; @keyword QUALITY  If set to a named variable, specifies the quality for 
    32 ;             JPEG output (default 75). Ranges from 0 ("terrible") to 
    33 ;             100 ("excellent"). Smaller quality values yield higher 
    34 ;             compression ratios and smaller output files. 
    35 ; 
    36 ;@keyword DITHER   If set, dither the output image when creating 8-bit output 
    37 ;             which is read from a 24-bit display (default is no dithering). 
    38 ; 
    39 ; @keyword CUBE     If set, use the color cube method to quantize colors when 
    40 ;             creating 8-bit output which is read from a 24-bit display 
    41 ;             (default is to use the statistical method). This may improve 
    42 ;             the accuracy of colors in the output image, especially white. 
    43 ; @keyword QUIET    Set this keyword to suppress the information message 
    44 ;             (default is to print an information message). 
    45 ; @keyword MULTIPLE to write multiple gif image. 
    46 ; 
    47 ; @restrictions The output file is overwritten if it exists. 
    48 ; 
    49 ;  
    50 ; @restrictions requires IDL 5.0 or higher (square bracket array syntax). 
     19; @param FILE {in}{required} 
     20; Name of the output file (GIF format by default). 
     21; 
     22; @keyword BMP 
     23; Set this keyword to create BMP format (8-bit with color table). 
     24; 
     25; @keyword PNG 
     26; Set this keyword to create PNG format (8-bit with color table). 
     27; 
     28; @keyword PICT 
     29; Set this keyword to create PICT format (8-bit with color table). 
     30; 
     31; @keyword JPEG 
     32; Set this keyword to create JPEG format (24-bit true color). 
     33; 
     34; @keyword TIFF 
     35; Set this keyword to create TIFF format (24-bit true color). 
     36; 
     37; @keyword QUALITY 
     38; If set to a named variable, specifies the quality for 
     39; JPEG output (default 75). Ranges from 0 ("terrible") to 
     40; 100 ("excellent"). Smaller quality values yield higher 
     41; compression ratios and smaller output files. 
     42; 
     43; @keyword DITHER 
     44; If set, dither the output image when creating 8-bit output 
     45; which is read from a 24-bit display (default is no dithering). 
     46; 
     47; @keyword CUBE 
     48; If set, use the color cube method to quantize colors when 
     49; creating 8-bit output which is read from a 24-bit display 
     50; (default is to use the statistical method). This may improve 
     51; the accuracy of colors in the output image, especially white. 
     52; 
     53; @keyword QUIET 
     54; Set this keyword to suppress the information message 
     55; (default is to print an information message). 
     56; 
     57; @restrictions 
     58; The output file is overwritten if it exists. 
     59; 
     60; @restrictions 
     61; requires IDL 5.0 or higher (square bracket array syntax). 
    5162; 
    5263; @examples 
    5364; 
    54 ;openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun 
    55 ;image = bytarr(440, 330) 
    56 ;readu, lun, image 
    57 ;free_lun, lun 
    58 ;loadct, 13 
    59 ;tvscl, image 
    60 ;saveimage, 'hurric.gif' 
     65; IDL> openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun 
     66; IDL> image = bytarr(440, 330) 
     67; IDL> readu, lun, image 
     68; IDL> free_lun, lun 
     69; IDL> loadct, 13 
     70; IDL> tvscl, image 
     71; IDL> saveimage, 'hurric.gif' 
    6172; 
    6273; @history Liam.Gumley@ssec.wisc.edu 
  • trunk/SRC/Picture/showimage.pro

    r134 r136  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; Show the contents of a graphics file in the current window. 
    55; 
     
    1616; @categories Input/Output. 
    1717; 
    18 ; @param FILE {in}{required} Name of the output file (format is identified automatically). 
    19 ; 
    20 ; @keyword DITHER Set this keyword to dither the input image when displaying 
    21 ;             24-bit images on an 8-bit display (default is no dithering). 
    22 ; @keyword CURRENT Set this keyword to display the image in the current window 
    23 ;             (default is to create a new window sized to fit the image). 
    24 ; 
    25 ; @restrictions The color table is modified. 
    26 ; 
    27 ; @restrictions Requires IDL 5.2 or higher (image QUERY functions). 
    28 ; 
    29 ; @examples showimage, filepath('rose.jpg', subdir='examples/data') 
    30 ; 
    31 ; @history Liam.Gumley@ssec.wisc.edu 
     18; @param FILE {in}{required} 
     19; Name of the output file (format is identified automatically). 
     20; 
     21; @keyword DITHER 
     22; Set this keyword to dither the input image when displaying 
     23; 24-bit images on an 8-bit display (default is no dithering). 
     24; 
     25; @keyword CURRENT 
     26; Set this keyword to display the image in the current window 
     27; (default is to create a new window sized to fit the image). 
     28; 
     29; @restrictions 
     30; The color table is modified. 
     31; 
     32; @restrictions 
     33; Requires IDL 5.2 or higher (image QUERY functions). 
     34; 
     35; @examples $ 
     36; IDL> showimage, filepath('rose.jpg', subdir='examples/data') 
     37; 
     38; @history Liam.Gumley\@ssec.wisc.edu 
    3239; http://cimss.ssec.wisc.edu/~gumley 
    3340; 
     
    4653; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    4754; 
    48 ; @version $Id$  
     55; @version $Id$ 
    4956; 
    5057;- 
  • trunk/SRC/Postscript/closeps.pro

    r129 r136  
    66; Close the Postscript mode 
    77; 
    8 ;  when archive_ps ne 0, we add the name and the date 
    9 ;  at the bottom left corner of the postcript page. If the 
    10 ;  postscript is called idl.ps we change its name to number.ps 
    11 ;  (number automatically found to be 1 larger that any of the 
    12 ;  existing ps file) 
     8; when archive_ps ne 0, we add the name and the date at the bottom left corner 
     9; of the postscript page. 
     10; If the postscript is called idl.ps we change its name to number.ps 
     11; (number automatically found to be 1 larger that any of the existing ps file) 
    1312; 
    14 ; @keyword INFOWIDGET A long integer giving the id of the information 
    15 ;           widget (created by openps) that we have de destroy at 
    16 ;           the end of closeps (when the postscript is done) 
     13; @keyword INFOWIDGET 
     14; A long integer giving the id of the information widget (created by openps) 
     15; that we have to destroy at the end of closeps (when the postscript is done). 
    1716; 
    1817; @uses cm_4ps 
     
    8180     ENDIF 
    8281;------------------------------------------------------------ 
    83 ; we annote the postscript 
     82; we annotate the postscript 
    8483;------------------------------------------------------------ 
    8584     date = byte(systime(0))    ; we get the date 
     
    8988   ENDIF 
    9089;------------------------------------------------------------ 
    91 ; close the postcript mode 
     90; close the postscript mode 
    9291   device, /close 
    9392; 
  • trunk/SRC/Postscript/openps.pro

    r129 r136  
    55; 
    66; @file_comments 
    7 ; switch to postcript mode and define it 
     7; switch to postscript mode and define it 
    88; 
    9 ; @param namepsin {in}{optional} name of the postscript file. 
    10 ; Extension '.ps' is added 
    11 ; if missing. It will be stored in the psdir directory. 
     9; @param namepsin {in}{optional} 
     10; name of the postscript file. 
     11; Extension '.ps' is added if missing. It will be stored in the psdir directory. 
    1212; 
    1313; @keyword FILENAME 
    14 ; to define the name of the postcript file through 
    15 ; a keyword rather than with nameps inut argument 
     14; to define the name of the postscript file through 
     15; a keyword rather than with nameps input argument 
    1616; (in this case the keyword can be pass through 
    1717; different routines via _EXTRA keyword). 
     
    2828; 
    2929; @keyword PORTRAIT 
     30; 
    3031; @keyword LANDSCAPE 
    31 ; @keyword KEEPPFONT same as keep_pfont 
    3232; 
    33 ; @keyword LIGHTNESS a scalar used to change the Lightness of the color 
    34 ;            palette to be abble to adjust according to the printer we use, 
    35 ;            the media (paper or slide)... 
    36 ;               lightness < 1 to get lighter colors 
    37 ;                         > 1 to get darker colors 
     33; @keyword KEEPPFONT 
     34; same as keep_pfont 
    3835; 
    39 ; @keyword _EXTRA used to pass any keyword to device procedure. 
     36; @keyword LIGHTNESS 
     37; a scalar used to change the Lightness of the color palette to be able to 
     38; adjust according to the printer we use, the media (paper or slide)... 
     39; > 1 to get darker colors 
     40; 
     41; @keyword _EXTRA 
     42; used to pass any keyword to device procedure. 
    4043; 
    4144; @uses cm_4ps 
     
    7275ENDIF 
    7376;------------------------------------------------------------ 
    74 ; close the postcript device if we are already in postcsrit mode 
     77; close the postscript device if we are already in postscript mode 
    7578   IF !d.name EQ 'PS' THEN device, /close 
    7679; switch to postscript mode 
  • trunk/SRC/Postscript/printps.pro

    r129 r136  
    1212; the archiving is done automatically whereas we ask if the postscript 
    1313; file must be archived or not. 
    14 ; If the postcript name is "idl.ps" (default name) then this name will 
     14; If the postscript name is "idl.ps" (default name) then this name will 
    1515; be changed to number.ps (number automatically found to be 1 larger 
    1616; that any of the existing ps file). 
     
    3939;                       25/8/19999 utilisation des widgets 
    4040;                       8/9/1999 utilisation de cw_bgroup 
    41 ; June 2005: Sebastien Masson: cleaning, english version with new commons 
     41; June 2005: Sebastien Masson: cleaning, English version with new commons 
    4242; 
    4343; @version $Id$ 
     
    138138; we destroy the widget 
    139139  widget_control, event.top, /destroy 
    140 ; if the file was originaly gzipped, then we re-gzip it and exit 
     140; if the file was originally gzipped, then we re-gzip it and exit 
    141141  IF uval.gzip THEN BEGIN 
    142142    spawn, '\gzip ' + uval.nameps 
     
    149149    AND keyword_set(archive_ps) THEN BEGIN 
    150150    IF archive_ps NE 1 AND uval.name EQ 'print' then begin 
    151       wesave = report('Shall we archive the postcript?', /default_no, /question) 
     151      wesave = report('Shall we archive the postscript?', /default_no, /question) 
    152152      IF wesave EQ 0 THEN RETURN 
    153153    ENDIF 
     
    159159       allps = file_basename(allps,'.pdf') 
    160160; find which of these names corresponds to numbers... 
    161 ; get ascii codes of the names 
     161; get ASCII codes of the names 
    162162       testnumb = byte(allps) 
    163163; longest name 
    164164       maxstrlen = (size(testnumb, /dimensions))[0] 
    165 ; ascii codes can be 0 or between byte('0') and byte('9') 
     165; ASCII codes can be 0 or between byte('0') and byte('9') 
    166166       testnumb = testnumb EQ 0 OR $ 
    167167                  (testnumb GE (byte('0'))[0] AND testnumb LE (byte('9'))[0]) 
     
    203203;                       25/8/19999 utilisation des widgets 
    204204;                       8/9/1999 utilisation de cw_bgroup 
    205 ; June 2005: Sebastien Masson: cleaning, english version with new commons 
     205; June 2005: Sebastien Masson: cleaning, English version with new commons 
    206206; 
    207207; @version $Id$ 
  • trunk/SRC/ReadWrite/ncdf_timeget.pro

    r130 r136  
    44;+ 
    55; @file_comments 
    6 ; get the time axis fom a netcdf_file and transforms it in 
    7 ; julian days of IDL. 
     6; get the time axis from a netcdf_file and transforms it in 
     7; Julian days of IDL. 
    88; 
    99; @categories reading ncdf_file 
     
    1616; 
    1717; @keyword YYYYMMDD 
    18 ; active to obtain the date as a longinterger with 
     18; active to obtain the date as a long integer with 
    1919; the format YearYearYearYearMonthMonthDayDay 
    2020; 
     
    2323; 
    2424; @returns 
    25 ; a long array of IDL julian days 
     25; a long array of IDL Julian days 
    2626; 
    2727; @restrictions 
    2828; the calendar variable must have the units attribute 
    29 ; following the syntaxe bellow: 
     29; following the syntax bellow: 
    3030; 
    3131; time_counter:units = "seconds since 0001-01-01 00:00:00" ; 
  • trunk/SRC/ReadWrite/read_grads.pro

    r130 r136  
    1616; 
    1717; @param date2 {in}{optional} 
    18 ; last date. Optionnal, if not scpecified date2=date1 
     18; last date. Optional, if not specified date2=date1 
    1919; 
    2020; @keyword FILENAME 
     
    141141   varid = varid[0] 
    142142   if varid EQ -1 then begin 
    143       print, var+' not found in the variable liste of '+filename 
     143      print, var+' not found in the variable list of '+filename 
    144144      return,  -1 
    145145   ENDIF 
     
    149149;------------------------ 
    150150;------------------------ 
    151 ; find the first file to be read according to the lile list,, the 
     151; find the first file to be read according to the file list, the 
    152152; number of time step in each file and t1 and t2 
    153153;------------------------ 
     
    164164;------------------------ 
    165165;------------------------; 
    166 ; check the existance of the file 
     166; check the existence of the file 
    167167   f2read = isafile(filename = f2read, iodirectory = iodir, _EXTRA = ex) 
    168168; if the file is stored on tape 
     
    306306   triangles_list = triangule() 
    307307;------------------------ 
    308 ; subdomain extration 
     308; subdomain extraction 
    309309 
    310310;------------------------ 
    311 ; time aguments 
     311; time arguments 
    312312;------------------------ 
    313313   time = time[t1:t2] 
  • trunk/SRC/ReadWrite/read_oasis.pro

    r130 r136  
    44;+ 
    55; @file_comments 
    6 ; read the f77 unformated files used in Oasis (version < 2.5) 
     6; read the f77 unformatted files used in Oasis (version < 2.5) 
    77; 
    88; @categories reading 
    99; 
    10 ; @param filename {in}{required} the filename 
     10; @param filename {in}{required}  
     11; the filename 
    1112; 
    12 ; @param varname {in}{required} the name of the variable to be read 
     13; @param varname {in}{required}  
     14; the name of the variable to be read 
    1315; 
    1416; @param jpi {in}{required} 
  • trunk/SRC/ReadWrite/readoldopadistcoast.pro

    r130 r136  
    1010; @categories for OPA before NetCDF 
    1111; 
    12 ; @returns  a structure that contains two elements: tdistcoast (the 
     12; @returns   
     13; a structure that contains two elements: tdistcoast (the 
    1314; distance for the t-points) and fdiscoast (the distance for the 
    1415; f-points). 
  • trunk/SRC/ReadWrite/readoldoparestart.pro

    r130 r136  
    66; @categories for OPA before NetCDF 
    77; 
    8 ; @restrictions bug for etab and etan written on the same record??? 
     8; @restrictions  
     9; bug for etab and etan written on the same record??? 
    910; 
    1011; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     
    210211;CC   ------- 
    211212;CC      Read the previous fields on the file numrst 
    212 ;CC      the first record indicates previous characterics 
     213;CC      the first record indicates previous characteristics 
    213214;CC      after control with the present run, we read : 
    214215;CC      - prognostic variables on the second record 
  • trunk/SRC/ReadWrite/scanctl.pro

    r130 r136  
    146146;------------------------ 
    147147; initial date: y0, m0, d0, h0, mn0 
    148 ;             -> julian day of IDL: julady(m0, d0, y0, h0, mn0, 00) 
     148;             -> Julian day of IDL: julday(m0, d0, y0, h0, mn0, 00) 
    149149;------------------------ 
    150150   t0 = timedef[3] 
     
    197197   ENDCASE 
    198198;------------------------ 
    199 ; increment date and definition of the calendar with IDL julian days 
     199; increment date and definition of the calendar with IDL Julian days 
    200200;------------------------ 
    201201   tstep = timedef[4] 
     
    241241   files = strsplit(files,/extract) 
    242242   if n_elements(files) NE 2 then begin 
    243       print, 'Bad definition of the filename. There shoud be 2 elements:' 
     243      print, 'Bad definition of the filename. There should be 2 elements:' 
    244244      print, 'DEST and 1 filename (that may define many files)' 
    245245      stop 
  • trunk/SRC/ReadWrite/scanoasis.pro

    r130 r136  
    88; @categories know what is inside 
    99; 
    10 ; @param filename {in}{required} the file name 
     10; @param filename {in}{required}  
     11; the file name 
    1112; 
    12 ; @restrictions List the variable names included in a Oasis file 
     13; @restrictions  
     14; List the variable names included in a Oasis file 
    1315; 
    1416; @examples 
  • trunk/SRC/ReadWrite/write_oasis.pro

    r130 r136  
    77; write an Oasis file (version < 2.5) 
    88; 
    9 ; @param filename {in}{required} the filename 
    10 ; @param varname {in}{required} the name of the variable to be written 
    11 ; @param z2d {in}{required} the variable (2D array) to be written 
     9; @param filename {in}{required}  
     10; the filename 
     11; 
     12; @param varname {in}{required}  
     13; the name of the variable to be written 
     14; 
     15; @param z2d {in}{required}  
     16; the variable (2D array) to be written 
    1217; 
    1318; @keyword I2 
     
    1722; to change the default format (R8) of the data to be written. 
    1823; 
    19 ; @keyword APPEND to open the file with the file pointer at the end of 
    20 ;        the file, ready for data to be appended. 
     24; @keyword APPEND  
     25; to open the file with the file pointer at the end of the file, ready for  
     26; data to be appended. 
    2127; 
    22 ; 
    23 ; @restrictions varname is automatically written as a "charactere*8" 
    24 ;              by default z2d is written as an R8 array 
     28; @restrictions  
     29; varname is automatically written as a "character*8" 
     30; by default z2d is written as an R8 array 
    2531; 
    2632; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
  • trunk/SRC/ReadWrite/writebat.pro

    r130 r136  
    99; @categories for OPA 
    1010; 
    11 ; @param zbat {in}{required} the bathymetry, a 2d array 
    12 ; @param filename {in}{required} a string containing the filename, 
     11; @param zbat {in}{required}  
     12; the bathymetry, a 2d array 
     13; 
     14; @param filename {in}{required}  
     15; a string containing the filename 
    1316; 
    1417; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     
    2427; basic checks 
    2528  IF n_params() NE 2 THEN BEGIN 
    26     print, 'bad number of aguments in the call of writebat' 
     29    print, 'bad number of arguments in the call of writebat' 
    2730    return 
    2831  ENDIF 
  • trunk/SRC/Utilities/createfunc.pro

    r128 r136  
    44;+ 
    55; @file_comments 
    6 ; write an idl function, compile it and execute it. 
    7 ; usefull to avoid the use of execute 
     6; write an IDL function, compile it and execute it. 
     7; useful to avoid the use of execute 
    88; 
    9 ; @param command {in}{required} a scalar string defining the result to be 
    10 ; given back by the function. (see examples) 
     9; @param command {in}{required}  
     10; a scalar string defining the result to be given back by the function.  
     11; (see examples) 
    1112; 
    1213; @keyword FILENAMEIN {in} {default=for_createfunc.pro} 
    1314; name of the function to be created. 
    1415; 
    15 ; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 
    16 ;      must be included in the function definition. Warning: the string 
    17 ;      must start with a ',' for example: KWDLIST = ', TOTO = toto' 
     16; @keyword KWDLIST {in}  
     17; a vector string. to specify a list of keywords that must be included in the  
     18; function definition.  
     19; Warning: the string must start with a ','  
     20; for example: KWDLIST = ', TOTO = toto' 
    1821; 
    19 ; @keyword _EXTRA used to pass your keywords to the created function. 
     22; @keyword _EXTRA  
     23; used to pass your keywords to the created function. 
    2024; 
    2125; @restrictions 
  • trunk/SRC/Utilities/createpro.pro

    r128 r136  
    66; write an idl procedure, compile it and execute it. 
    77; 
    8 ; @param command {in}{required} a string array defining the procedure to be created. each element will be a line of the created procedure. 
     8; @param command {in}{required}  
     9; a string array defining the procedure to be created.  
     10; each element will be a line of the created procedure. 
    911; 
    1012; @keyword FILENAMEIN {in} {default=for_createpro.pro} 
    11 ;  name of the procedure to be created. 
     13; name of the procedure to be created. 
    1214; 
    13 ; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 
    14 ;      must be included in the procedure definition. Warning: the string 
    15 ;      must start with a ',' for example: KWDLIST = ', TOTO = toto' 
     15; @keyword KWDLIST {in}  
     16; a vector string.  
     17; to specify a list of keywords that must be included in the procedure  
     18; definition.  
     19; Warning: the string must start with a ','  
     20; for example: KWDLIST = ', TOTO = toto' 
    1621; 
    17 ; @keyword KWDUSED obsolote, please pass directly your keywords through _EXTRA 
     22; @keyword KWDUSED  
     23; obsolete, please pass directly your keywords through _EXTRA 
    1824; 
    19 ; @keyword _EXTRA used to pass your keywords to the created procedure. 
     25; @keyword _EXTRA  
     26; used to pass your keywords to the created procedure. 
    2027; 
    2128; @restrictions 
     
    4855    dummy = report(['keyword KWDUSED has been suppressed,' $ 
    4956                    , 'please pass directly your keywords through _extra,' $ 
    50                     , 'see exaemples in createpro header']) 
     57                    , 'see examples in createpro header']) 
    5158    return 
    5259  ENDIF 
  • trunk/SRC/Utilities/find.pro

    r128 r136  
    1313; @categories find a file 
    1414; 
    15 ; @param filein {in}{required} A scalar or array variable of string type, containing 
    16 ;     file names to match. Input names specifications may contain 
    17 ;     wildcard characters, enabling them to match multiple files 
    18 ;     (see file_search for more informations). By default and if 
    19 ;     necessary, find is looking for filename and also for filename 
    20 ;     completed with '.pro' 
     15; @param filein {in}{required}  
     16; A scalar or array variable of string type, containing 
     17; file names to match. Input names specifications may contain 
     18; wildcard characters, enabling them to match multiple files 
     19; (see file_search for more informations). By default and if 
     20; necessary, find is looking for filename and also for filename 
     21; completed with '.pro' 
    2122; 
    22 ; @keyword FIRSTFOUND activate this keyword to stop looking for the file as 
    23 ;       soon as we found one. 
     23; @keyword FIRSTFOUND  
     24; activate this keyword to stop looking for the file as soon as we found one. 
    2425; 
    25 ; @keyword IODIRECTORY {default=!path} A scalar or array variable of string type, containing 
    26 ;        directories names where we are looking for the file. 
    27 ;        Different directories can be separated by 
    28 ;        path_sep(/search_path) (':' on unix type machine) as it is done 
    29 ;        to define !path. 
    30 ;        Note that if filename's dirname is different from '.', this 
    31 ;        keyword is not taken into account. 
     26; @keyword IODIRECTORY {default=!path}  
     27; A scalar or array variable of string type, containing 
     28; directories names where we are looking for the file. 
     29; Different directories can be separated by 
     30; path_sep(/search_path) (':' on unix type machine) as it is done 
     31; to define !path. 
     32; Note that if filename's dirname is different from '.', this 
     33; keyword is not taken into account. 
    3234; 
    33 ; @keyword LOOKALLDIR activate to look for the file with a recursive search 
    34 ;        in iodir, homedir, !path + the DATA:TestsData directory if it exists. 
     35; @keyword LOOKALLDIR  
     36; activate to look for the file with a recursive search 
     37; in iodir, homedir, !path + the DATA:TestsData directory if it exists. 
    3538; 
    36 ; @keyword NOPRO activate to avoid the automatic search of filename 
    37 ;       completed with '.pro' 
     39; @keyword NOPRO  
     40; activate to avoid the automatic search of filename completed with '.pro' 
    3841; 
    39 ; @keyword ONLYPRO force to look only at file ending with .pro 
     42; @keyword ONLYPRO  
     43; force to look only at file ending with .pro 
    4044; 
    41 ; @keyword ONLYNC force to look only at file ending with .nc 
     45; @keyword ONLYNC  
     46; force to look only at file ending with .nc 
    4247; 
    43 ; @keyword RECURSIVE performs recursive searching of directory hierarchies. 
    44 ;        In a recursive search, find looks recursively for any and all 
    45 ;        subdirectories in the file hierarchy rooted at the IODIRECTORY 
    46 ;       argument. 
     48; @keyword RECURSIVE  
     49; performs recursive searching of directory hierarchies. 
     50; In a recursive search, find looks recursively for any and all 
     51; subdirectories in the file hierarchy rooted at the IODIRECTORY argument. 
    4752; 
    48 ; @keyword REPERTOIRE obsolete. keep for compatibility, use directory keyword 
     53; @keyword REPERTOIRE  
     54; obsolete. keep for compatibility, use directory keyword 
    4955; 
    50 ; @keyword UNIQUE activate to make sure that each element of the output 
    51 ;       vector is unique. 
     56; @keyword UNIQUE  
     57; activate to make sure that each element of the output vector is unique. 
    5258; 
    53 ; @keyword _EXTRA used to pass your keywords 
     59; @keyword _EXTRA  
     60; used to pass your keywords 
    5461; 
    55 ; 
    56 ; @returns A scalar or array variable of string type, containing the 
    57 ;       name (with the full path of the matching files. If no files 
    58 ;       exist with names matching the input arguments, find returns 
    59 ;       the scalar string : 'NOT FOUND' 
     62; @returns  
     63; A scalar or array variable of string type, containing the 
     64; name (with the full path of the matching files. If no files 
     65; exist with names matching the input arguments, find returns 
     66; the scalar string : 'NOT FOUND' 
    6067; 
    6168; @examples 
  • trunk/SRC/Utilities/fitintobox.pro

    r134 r136  
    8989; @param lastz {in}{optional}{default=define by grille.pro} 
    9090; 
    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... 
     91; @keyword WDEPTH  
     92; To specify that we are at W level 
     93; 
     94; @returns  
     95; an array with dimensions matching the domain 
     96; or -1 if there is an error... 
    9597; 
    9698; @uses cm_4mesh 
    9799; @uses cm_4cal 
    98100; 
    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 
     101; @examples  
     102; IDL> help, fitintobox(findgen(jpi,jpj)) 
     103; <Expression>    FLOAT     = Array[41, 3] 
     104; IDL> help, fitintobox(findgen(jpi,jpj,78)) 
     105; Error:  
     106; the array dimensions [180,148,78] are incompatible 
     107; with the the domain dimensions  
     108; [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 
     109; <Expression>    INT       =       -1 
    107110; 
    108111; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
  • trunk/SRC/Utilities/isadirectory.pro

    r128 r136  
    99; @categories io 
    1010; 
    11 ; @param directoryin {in}{optional} a proposed directory. If neither dirname 
    12 ;        input parameter of IODIRECTORY keyword are defined, 
    13 ;        the ask the user to choose a directory. 
     11; @param directoryin {in}{optional}  
     12; a proposed directory. If neither dirname 
     13; input parameter of IODIRECTORY keyword are defined, 
     14; the ask the user to choose a directory. 
    1415; 
    15 ; @keyword IODIRECTORY a proposed directory 
     16; @keyword IODIRECTORY  
     17; a proposed directory 
    1618; 
    17 ; @keyword TITLE the title of the window 
     19; @keyword TITLE  
     20; the title of the window 
    1821; 
    19 ; @keyword _EXTRA used to pass your keywords 
     22; @keyword _EXTRA  
     23; used to pass your keywords 
    2024; 
    21 ; @file_comments all dialog_pickfile keywords (like filter) can be used. 
     25; @file_comments  
     26; all dialog_pickfile keywords (like filter) can be used. 
    2227; 
    23 ; @returns the directory name 
     28; @returns  
     29; the directory name 
    2430; 
    2531; @examples 
  • trunk/SRC/Utilities/isafile.pro

    r128 r136  
    99; @categories io 
    1010; 
    11 ; @param filein {in}{optional} a proposed name. If neither filein 
    12 ;        input parameter of filename keyword are defined, 
    13 ;       the ask the user to choose a file. 
     11; @param filein {in}{optional}  
     12; a proposed name. If neither filein input parameter of filename keyword are  
     13; defined, the ask the user to choose a file. 
    1414; 
    15 ; @keyword FILENAME a proposed filename. 
     15; @keyword FILENAME  
     16; a proposed filename. 
    1617; 
    17 ; @keyword IODIRECTORY a directory where we look for the file. this 
    18 ;           keyword is taken into account only if the dirname 
    19 ;           of filein or filename is '.' 
     18; @keyword IODIRECTORY  
     19; a directory where we look for the file. this 
     20; keyword is taken into account only if the dirname 
     21; of filein or filename is '.' 
    2022; 
    21 ; @keyword NEW to specify that filename is a new file and that 
    22 ;        we should check only its path 
     23; @keyword NEW  
     24; to specify that filename is a new file and that we should check only its  
     25; path 
    2326; 
    24 ; @keyword ONLYPRO force to look only at file ending with .pro 
     27; @keyword ONLYPRO  
     28; force to look only at file ending with .pro 
    2529; 
    26 ; @keyword ONLYNC force to look only at file ending with .nc 
     30; @keyword ONLYNC  
     31; force to look only at file ending with .nc 
    2732; 
    28 ; @keyword RECURSIVE performs recursive searching of directory hierarchies. 
    29 ;        In a recursive search, find looks recursively for any and all 
    30 ;        subdirectories in the file hierarchy rooted at the IODIRECTORY 
    31 ;       argument. 
     33; @keyword RECURSIVE  
     34; performs recursive searching of directory hierarchies. 
     35; In a recursive search, find looks recursively for any and all 
     36; subdirectories in the file hierarchy rooted at the IODIRECTORY argument. 
    3237; 
    33 ; @keyword _EXTRA used to pass your keywords 
     38; @keyword _EXTRA  
     39; used to pass your keywords 
    3440; 
    35 ; @file_comments all find, file_search and dialog_pickfile keywords (like title) can be used 
     41; @file_comments  
     42; all find, file_search and dialog_pickfile keywords (like title) can be used 
    3643; 
    37 ; @returns the filename with its path 
     44; @returns  
     45; the filename with its path 
    3846; 
    3947; @examples 
  • trunk/SRC/Utilities/linearequation.pro

    r134 r136  
    1111; @categories utilities 
    1212;  
    13 ; @param point1 {in}{required} This is the first point of(the) straight  
    14 ; line(s) whose we want to calculate equation(s) 
     13; @param point1 {in}{required}  
     14; This is the first point of(the) straight line(s) whose we want to calculate  
     15; equation(s) 
    1516; 
    16 ; @param point2 {in}{required} This is the second point of(the) straight  
    17 ; line(s) whose we want to calculate equation(s) 
     17; @param point2 {in}{required}  
     18; This is the second point of(the) straight line(s) whose we want to calculate 
     19; equation(s) 
    1820; 
    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; There is 2 possibilities: 
     22;      1) point is a complex or a table of complex, where each element is the coordinates of the point. 
    2123;      2) point is a table of real of dimension 2,number_of_straight_line. 
    2224;         For each row of the table, we have coordinates of the point. 
    2325; 
    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 
     26; @returns  
     27; abc is a table of dimension 3, number_of_straight_line,  
     28; where for each line of the table we obtain the 3 parameters 
     29; a, b and c of the linear equation ax+by+c=0 
    2730; 
    28 ; @examples IDL> abc=linearequation(complex(1,2),[3,4]) 
    29 ;           IDL> print, abc[0]*1+abc[1]*2+abc[2] 
    30 ;           0.00000 
     31; @examples  
     32; IDL> abc=linearequation(complex(1,2),[3,4]) 
     33; IDL> print, abc[0]*1+abc[1]*2+abc[2] 
     34; 0.00000 
    3135; 
    3236; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
  • trunk/SRC/Utilities/lineintersection.pro

    r134 r136  
    1010; @categories utilities 
    1111;  
    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 
     12; @param abc1 {in}{required}  
     13; is the first table of dimension 3, number_of_pairs_of_straight_lines,  
     14; whose each line contain the 3 parameters a,b and c of the first linear  
     15; equation of the type ax+by+c=0 
    1516; 
    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 
     17; @param abc2 {in}{required}  
     18; is second table of dimension 3, number_of_pairs_of_straight_lines,  
     19; whose each line contain the 3 parameters a,b and c of the second linear  
     20; equation of the type ax+by+c=0 
    1921; 
    20 ; @keyword FLOAT To return the output as a table of real numbers instead of vectors of complex (by default) 
     22; @keyword FLOAT  
     23; To return the output as a table of real numbers instead of vectors of  
     24; complex (by default) 
    2125; 
    22 ; @returns 2 possibilities: 
     26; @returns  
     27; 2 possibilities: 
    2328;      1) by default: it is a vector of complex whose each element is the coordinates  
    2429;                     of the intersection point of a pair of straight lines. 
     
    2732;         of the intersection point of a pair of straight line. 
    2833; 
    29 ; @restrictions If the 2 straight line are parallel, we return coordinates (!values.f_nan,!values.f_nan) 
     34; @restrictions  
     35; If the 2 straight line are parallel, we return coordinates  
     36; (!values.f_nan,!values.f_nan) 
    3037; 
    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. 
     38; @restrictions  
     39; Beware of the precision of the machine which make  
     40; that calculated coordinates may not exactly verify  
     41; equations of the pair of straight lines. 
    3442; 
    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 
     43; @examples  
     44; IDL> abc1=linearequation(complex(1,2),[3,4]) 
     45; IDL> abc2=linearequation(complex(1,2),[8,15]) 
     46; IDL> print, lineintersection(abc1, abc2) 
     47; (      1.00000,      2.00000) 
     48; IDL> print, lineintersection(abc1, abc2,/float) 
     49; 1.00000      2.00000 
    4150; 
    4251; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
  • trunk/SRC/Utilities/protype.pro

    r128 r136  
    88; @categories utilities 
    99; 
    10 ; @param file {in} A scalar of string type, the name of the ".pro" file to be tested 
    11 ;    if necessary, the input name is completed with '.pro' 
    12 ;     and its path found in !path 
     10; @param file {in}  
     11; A scalar of string type, the name of the ".pro" file to be tested 
     12; if necessary, the input name is completed with '.pro' 
     13; and its path found in !path 
    1314; 
    14 ; @returns A scalar of string type: 'proc', 'func' or 'batch' 
     15; @returns  
     16; A scalar of string type: 'proc', 'func' or 'batch' 
    1517; 
    1618; @examples 
  • trunk/SRC/Utilities/pwd.pro

    r134 r136  
    99; @categories like unix function 
    1010;  
    11 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     11; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    1212; 
    1313; @version $Id$ 
  • trunk/SRC/Utilities/report.pro

    r134 r136  
    99; To ask a question whose answer is not yes/no,use xquestion. 
    1010; 
    11 ; @param text {in}{required} un string on un vecteur de string. Si le string ne 
     11; @param text {in}{required}  
     12; one string or one vector of string. Si le string ne 
    1213; comporte qu''un element, on cherche les eventuels characteres de 
    1314; retour a la ligne: '!C'. If text is set to an array of strings, each 
    1415; array element is displayed as a separate line of text. 
    1516; 
    16 ; @keyword SIMPLE activate to print only the message without the name 
    17 ;             and the line of the routine (defined by calling routine_name) 
     17; @keyword SIMPLE  
     18; activate to print only the message without the name 
     19; and the line of the routine (defined by calling routine_name) 
    1820; 
    19 ; @keyword _extra used to pass keywords from dialog_message.pro and message.pro 
     21; @keyword _extra  
     22; used to pass keywords from dialog_message.pro and message.pro 
    2023; 
    21 ; @keyword PARENT same as DIALOG_PARENT de dialog_message.pro 
     24; @keyword PARENT  
     25; same as DIALOG_PARENT de dialog_message.pro 
    2226; 
    23 ; @keyword QUESTION Set this keyword to create a "Question" dialog. 
    24 ;                   The default dialog type is "Warning" 
     27; @keyword QUESTION {default="Warning"} 
     28; Set this keyword to create a "Question" dialog. 
    2529; 
    26 ; @keyword DEFAULT_NO Set this keyword to make the "No" button the default  
    27 ;                     selection for "Question" dialog. Normally, the default is yes. 
     30; @keyword DEFAULT_NO {default="Yes"} 
     31; Set this keyword to make the "No" button the default selection for  
     32; "Question" dialog.  
    2833; 
    29 ; @keyword SIMPLE Activate to print the error message without printing  
    30 ;                 the routine name with its full path. 
     34; @keyword SIMPLE  
     35; Activate to print the error message without printing  the routine name with  
     36; its full path. 
    3137; 
    32 ; @returns -1 if the keyword QUESTION is not activated 
    33 ;          If the keyword is activated, return 1 for yes and 0 for no. 
     38; @returns  
     39; -1 if the keyword QUESTION is not activated 
     40; If the keyword is activated, return 1 for yes and 0 for no. 
    3441;  
    35 ; @example If there is not any widget activated: 
     42; @examples  
     43; If there is not any widget activated: 
    3644; 
    37 ;     IDL> help, report('toto tata') 
    38 ;     % $MAIN$: toto tata 
    39 ;     <Expression>    INT       =       -1 
    40 ;     IDL> help, report('does it works ?',/question) 
    41 ;     does it works ? y/n (default answer is y) 
    42 ;     <Expression>    BYTE      =    1 
    43 ;     IDL> help, report('question1: !C does it works ?',/question) 
    44 ;     question1: 
    45 ;     does it works ? y/n (default answer is y) 
    46 ;     <Expression>    BYTE      =    1 
     45; IDL> help, report('toto tata') 
     46; % $MAIN$: toto tata 
     47; <Expression>    INT       =       -1 
     48; IDL> help, report('does it works ?',/question) 
     49; does it works ? y/n (default answer is y) 
     50; <Expression>    BYTE      =    1 
     51; IDL> help, report('question1: !C does it works ?',/question) 
     52; question1: 
     53; does it works ? y/n (default answer is y) 
     54; <Expression>    BYTE      =    1 
    4755; 
    4856; If widgets are already activated, it is the same thing but with widgets! 
    4957; 
    50 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     58; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    5159;                      21/10/1999 
    5260; 
    53 ; @version $ID$ 
     61; @version $Id$ 
    5462; 
    5563;- 
  • trunk/SRC/Utilities/routine_name.pro

    r134 r136  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Give us the name of the routine (procedure or function) where we are. 
    88; 
    99; @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. 
     10; 
     11; @param pilingnum {in}{optional} 
     12; A whole number which give us how many level we have to reascend 
     13; in the piling up of routines and subroutines to find the looked for routine. 
    1314; 
    1415; 
    15 ; @returns a string giving either the full name of the routine (with the path) or '$MAIN$' 
     16; @returns 
     17; a string giving either the full name of the routine (with the path) or 
     18; '$MAIN$' 
    1619; 
    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. 
     20; @restrictions 
     21; This function use the keyword OUTPUT in help.pro and it is specified 
     22; in the online help that the return syntax of this word can change in 
     23; function of the version of the code. This version works with IDL 5.2. 
    2024; 
    21 ; @example IDL> print, routine_name() 
     25; @examples 
     26; IDL> print, routine_name() 
    2227;  /usr1/com/smasson/IDL_RD/UTILITAIRE/report.pro 
    2328;  IDL> print, routine_name(1) 
     
    3035;  $MAIN$ 
    3136; 
    32 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     37; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3338;                      21/10/1999 
    3439; 
     
    4550; 
    4651  help,  /traceback, output = name 
    47   name = strtrim(name, 1)       ; we remove blanks at the beginning of lines and  
    48 ;                               we put elements of the vector stuck ones with  
     52  name = strtrim(name, 1)       ; we remove blanks at the beginning of lines and 
     53;                               we put elements of the vector stuck ones with 
    4954;                               each others to make an unique string. 
    5055  allnames = '' 
    5156  for i = 0, n_elements(name)-1 do allnames = allnames+name[i] 
    5257; 
    53   name = str_sep(allnames, '%') ; we cut it out again.  
     58  name = str_sep(allnames, '%') ; we cut it out again. 
    5459  name = strtrim(name, 2)     ; we remouve blanks in front of and behind 
    5560  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.  
     61; we do not hold back the two first elements who are a blanck  and the line concerning 
     62; routine_name. 
    5863  name = name[2: n_elements(name)-1] 
    5964; we choose the line which concern us. 
  • trunk/SRC/Utilities/testvar.pro

    r134 r136  
    55; 
    66; @file_comments  
    7 ; A  kind of keyword_set but when the value exist, it send it back 
     7; A kind of keyword_set but when the value exist, it send it back 
    88; 
    99; @categories utlities 
    1010; 
    11 ; @keyword var any kind of 
     11; @keyword var  
     12; any kind of 
    1213; 
    13 ; @returns 0 if the variable does not exist  
     14; @returns  
     15; 0 if the variable does not exist  
    1416; 
    15 ; @examples IDL> print, testvar(var=toto) 
    16 ;           0 
    17 ;    IDL> print, testvar(var='toto') 
    18 ;    toto 
     17; @examples  
     18; IDL> print, testvar(var=toto) 
     19; 0 
     20; IDL> print, testvar(var='toto') 
     21; toto 
    1922; 
    2023; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
  • trunk/SRC/Utilities/text_box.pro

    r134 r136  
    55; area in a graphics window.  The message may be split at word 
    66; boundaries into several lines, and the character size and 
    7  ;orientation may be adjusted for the text to fit within the box. 
     7; orientation may be adjusted for the text to fit within the box. 
    88;    
    9 ; @param TEXT {in}{required} ASCII text string containing the message. 
     9; @param TEXT {in}{required}  
     10; ASCII text string containing the message. 
    1011; 
    11 ; @keyword pos  4 element vector specifying the box position and size 
    12 ;               pos[0],pos[1] specify the lower left corner coordinate 
    13 ;               pos[2],pos[3] specify the upper right corner coordinate 
    14 ;               data window normalized coordinates are use 
     12; @keyword pos   
     13; 4 element vector specifying the box position and size 
     14; pos[0],pos[1] specify the lower left corner coordinate 
     15; pos[2],pos[3] specify the upper right corner coordinate 
     16; data window normalized coordinates are use 
    1517; 
    16 ; @keyword fg_color color of box and legend titles (default=0) 
     18; @keyword fg_color 
     19; color of box and legend titles (default=0) 
    1720; 
    18 ; @keyword bg_color background color. Setting BG_COLOR erases the area  
     21; @keyword bg_color  
     22; background color. Setting BG_COLOR erases the area  
    1923;               covered by the text box (filling it with color BG_COLOR) 
    2024;               prior to writing the text.  If both BG_COLOR and !p.color 
     
    2226;               gaurantee a readability. 
    2327;                
    24 ; @keyword right if set, right justify text 
     28; @keyword right  
     29; if set, right justify text 
    2530; 
    26 ; @keyword center if set, center the text 
     31; @keyword center  
     32; if set, center the text 
    2733; 
    28 ; @keyword vert_space {default=1.5}vertical spacing of lines in units of character height 
     34; @keyword vert_space {default=1.5} 
     35; vertical spacing of lines in units of character height 
    2936; 
    30 ; @keyword _EXTRA used to pass your keyword 
     37; @keyword _EXTRA  
     38; used to pass your keyword 
    3139; 
    32 ; @keyword box activate to show the box on graphics window. 
     40; @keyword box  
     41; activate to show the box on graphics window. 
    3342; 
    3443; @history  Paul Ricchiazzi                            7Jul93 
  • trunk/SRC/Utilities/undefine.pro

    r134 r136  
    1111; @categories utilities   
    1212;  
    13 ; @param varname {in}{required} The name of the variable we want erase 
     13; @param varname {in}{required}  
     14; The name of the variable we want erase 
    1415; 
    15 ; @example IDL> a=1 
    16 ;          IDL> undefine,a 
    17 ;          % Compiled module: UNDEFINE. 
    18 ;          IDL> help, a 
    19 ;          A               UNDEFINED = <Undefined> 
     16; @examples 
     17; IDL> a=1 
     18; IDL> undefine,a 
     19; % Compiled module: UNDEFINE. 
     20; IDL> help, a 
     21; A               UNDEFINED = <Undefined> 
    2022; 
    2123; @history trouve sur la page web de D.Fanning  
     
    2729;from Andrew Cool at the DSTO High Frequency Radar Division in 
    2830;Adelaide, Australia. 
     31; 
     32; @version $Id$ 
    2933; 
    3034;- 
  • trunk/SRC/Utilities/xfile.pro

    r134 r136  
    66; @file_comments  
    77; display in a widget an ASCII file. 
    8 ; It is the same thing that xdisplaydife but here, we use it  
     8; It is the same thing that xdisplayfile but here, we use it  
    99; to display the content of a procedure or of a function,  
    1010; even if it is not in the current directory (thanks to the path). 
     
    1212; @categories utilities 
    1313; 
    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). 
     14; @param filename {in}{required}  
     15; It is the name of the procedure or of the function  
     16; we want to display (with or without .pro at the end). 
    1617; 
    17 ; @keyword _extra used to pass your keywords 
     18; @keyword _extra  
     19; used to pass your keywords 
    1820; 
    1921; @examples xfile,'plt' 
    2022; 
    21 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     23; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2224;                       7/1/99 
    23 ;                       6/7/1999: compatibilite mac et windows 
     25;                       6/7/1999: compatibility mac and windows 
    2426; 
    2527; @version $Id$ 
  • trunk/SRC/Utilities/xhelp.pro

    r134 r136  
    66; @categories Widgets. 
    77; 
    8 ; @param Filename {in}{required} A scalar string that contains the filename of the file 
    9 ;               to display.  If FILENAME does not include a complete path 
    10 ;               specification, xhelp will search for the file in 
    11 ;               the current working directory and then each of the 
    12 ;               directories listed in !PATH environment variable.  The 
    13 ;               ".pro" file suffix will be appended if it is not supplied. 
     8; @param Filename {in}{required}  
     9; A scalar string that contains the filename of the file to display.   
     10; If FILENAME does not include a complete path specification, xhelp will  
     11; search for the file in the current working directory and then each of the 
     12; directories listed in !PATH environment variable.  The 
     13; ".pro" file suffix will be appended if it is not supplied. 
    1414; 
    15 ; @keyword _extra used to pass your keywords 
     15; @keyword _extra  
     16; used to pass your keywords 
    1617; 
    17 ; @restrictions Triggers the XMANAGER if it is not already in use. 
     18; @restrictions  
     19; Triggers the XMANAGER if it is not already in use. 
    1820; 
    19 ; @examples Open a file and create a widget to display its contents. 
     21; @examples  
     22; Open a file and create a widget to display its contents. 
    2023; 
    2124; @history Written By Steve Richards, December 1990 
     
    2730;  7/1/99 : legeres mofification par Sebastien Masson : utilisation de 
    2831;  xdisplayfile, de findfile et de _extra. 
    29 ;  6/7/1999: compatibilite mac et windows 
     32;  6/7/1999: compatibility mac and windows 
    3033; 
    3134; @version $Id$ 
     
    5962      pfile = [current, multipath]+ pfile 
    6063   ENDIF 
    61 ; We test each possile name to find where the file is. 
     64; We test each possible name to find where the file is. 
    6265   nfile=n_elements(pfile) 
    6366   n = 0 
Note: See TracChangeset for help on using the changeset viewer.