Changeset 133
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- Location:
- trunk/SRC
- Files:
-
- 5 added
- 2 deleted
- 9 edited
- 33 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/caldat.pro
r132 r133 1 ; $Id$1 ;+ 2 2 ; 3 ; Copyright (c) 1992-2003, Research Systems, Inc. All rights reserved. 4 ; Unauthorized reproduction prohibited. 5 ; 6 7 ;+ 8 ; NAME: 9 ; CALDAT 10 ; 11 ; PURPOSE: 3 ; @file_comments 12 4 ; Return the calendar date and time given julian date. 13 5 ; This is the inverse of the function JULDAY. 14 ; CATEGORY:15 ; Misc.6 ; 7 ; @categories Calendar 16 8 ; 17 ; CALLING SEQUENCE:18 ; CALDAT, Julian, Month, Day, Year, Hour, Minute, Second19 ; See also: julday, the inverse of this function.20 9 ; 21 ; INPUTS: 22 ; JULIAN contains the Julian Day Number (which begins at noon) of the 10 ; @param JULIAN {in}{required} contains the Julian Day Number (which begins at noon) of the 23 11 ; specified calendar date. It should be a long integer. 24 ; OUTPUTS:25 ; (Trailing parameters may be omitted if not required.)26 ; MONTH: Number of the desired month (1 = January, ..., 12 = December).27 12 ; 28 ; DAY: Number of day of the month.13 ; @param MONTH {out} Number of the desired month (1 = January, ..., 12 = December). 29 14 ; 30 ; YEAR: Number of the desired year.15 ; @param DAY {out} Number of day of the month. 31 16 ; 32 ; HOUR: Hour of the day 33 ; Minute: Minute of the day 34 ; Second: Second (and fractions) of the day. 17 ; @param YEAR {out} Number of the desired year. 35 18 ; 36 ; KEYWORD PARAMETERS:19 ; @param HOUR {out} Hour of the day 37 20 ; 38 ; NDAYSPM: for using a calendar with fixed number of days per 39 ; months. defaut value of NDAYSPM=30 21 ; @param Minute {out} Minute of the day 40 22 ; 41 ; COMMON BLOCKS: cm_4cal23 ; @param Second {out} Second (and fractions) of the day. 42 24 ; 43 ; SIDE EFFECTS:44 ; None.45 25 ; 46 ; RESTRICTIONS: 47 ; Accuracy using IEEE double precision numbers is approximately 26 ; @keyword NDAYSPM {default=30} for using a calendar with fixed number of days per 27 ; months. 28 ; 29 ; @uses cm_4cal 30 ; 31 ; 32 ; @restrictions Accuracy using IEEE double precision numbers is approximately 48 33 ; 1/10000th of a second. 49 34 ; 50 ; MODIFICATION HISTORY: 51 ; Translated from "Numerical Recipies in C", by William H. Press, 35 ; @history Translated from "Numerical Recipies in C", by William H. Press, 52 36 ; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 53 37 ; Cambridge University Press, 1988 (second printing). … … 61 45 ; 62 46 ; AB, 3 January 2000, Make seconds output as DOUBLE in array output. 47 ; 48 ; @version $Id$ 63 49 ;- 64 ;65 50 pro CALDAT, julian, month, day, year, hour, minute, second, NDAYSPM = ndayspm 66 51 ;------------------------------------------------------------ -
trunk/SRC/Calendar/julday.pro
r132 r133 1 ; $Id$2 ;3 ; Copyright (c) 1988-2003, Research Systems, Inc. All rights reserved.4 ; Unauthorized reproduction prohibited.5 6 1 ;+ 7 ; NAME: 8 ; JULDAY 9 ; 10 ; PURPOSE: 11 ; Calculate the Julian Day Number for a given month, day, and year. 2 ; 3 ; @file_comments 4 ; Calculate the Julian Day Number for a given month, day, and year. 12 5 ; This is the inverse of the library function CALDAT. 13 6 ; See also caldat, the inverse of this function. 14 7 ; 15 ; CATEGORY: 16 ; Misc. 17 ; 18 ; CALLING SEQUENCE: 19 ; Result = JULDAY([[[[Month, Day, Year], Hour], Minute], Second]) 20 ; 21 ; INPUTS: 22 ; MONTH: Number of the desired month (1 = January, ..., 12 = December). 23 ; 24 ; DAY: Number of day of the month. 25 ; 26 ; YEAR: Number of the desired year.Year parameters must be valid 8 ; @categories Calendar 9 ; 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 27 15 ; values from the civil calendar. Years B.C.E. are represented 28 16 ; as negative integers. Years in the common era are represented 29 17 ; as positive integers. In particular, note that there is no 30 18 ; year 0 in the civil calendar. 1 B.C.E. (-1) is followed by 31 ; 1 C.E. (1). 32 ; 33 ; HOUR: Number of the hour of the day. 34 ; 35 ; MINUTE: Number of the minute of the hour. 36 ; 37 ; SECOND: Number of the second of the minute. 38 ; 39 ; Note: Month, Day, Year, Hour, Minute, and Second can all be arrays. 40 ; The Result will have the same dimensions as the smallest array, or 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 41 28 ; will be a scalar if all arguments are scalars. 42 ; 43 ; OPTIONAL INPUT PARAMETERS: 44 ; Hour, Minute, Second = optional time of day. 45 ; 46 ; KEYWORD PARAMETERS: 47 ; 48 ; NDAYSPM: for using a calendar with fixed number of days per 49 ; months. defaut value of NDAYSPM=30 50 ; 51 ; OUTPUTS: 52 ; JULDAY returns the Julian Day Number (which begins at noon) of the 29 ; 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 53 35 ; specified calendar date. If Hour, Minute, and Second are not specified, 54 36 ; then the result will be a long integer, otherwise the result is a 55 37 ; double precision floating point number. 56 38 ; 57 ; COMMON BLOCKS: cm_4cal 58 ; 59 ; SIDE EFFECTS: 60 ; None. 61 ; 62 ; RESTRICTIONS: 63 ; Accuracy using IEEE double precision numbers is approximately 39 ; @uses cm_4cal 40 ; 41 ; @restrictions Accuracy using IEEE double precision numbers is approximately 64 42 ; 1/10000th of a second, with higher accuracy for smaller (earlier) 65 43 ; Julian dates. 66 44 ; 67 ; MODIFICATION HISTORY: 68 ; Translated from "Numerical Recipies in C", by William H. Press, 45 ; @history Translated from "Numerical Recipies in C", by William H. Press, 69 46 ; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 70 47 ; Cambridge University Press, 1988 (second printing). … … 82 59 ; 83 60 ; CT, April 2000, Now accepts vectors or scalars. 61 ; 62 ; @version $Id$ 84 63 ;- 85 64 ; -
trunk/SRC/Colors/color24.pro
r132 r133 1 1 ;+ 2 ; NAME:3 ; COLOR244 2 ; 5 ; PURPOSE:6 ; 7 ; 3 ; @file_comments 4 ; The purpose of this function is to convert a RGB color triple 5 ; into the equivalent 24-big long integer. 8 6 ; 9 ; CATEGORY: 10 ; Graphics, Color Specification. 7 ; @categories Graphics, Color Specification. 11 8 ; 12 ; CALLING SEQUENCE: 13 ; color = COLOR24(rgb_triple) 14 ; 15 ; INPUTS: 16 ; RGB_TRIPLE: A three-element column or row array representing 9 ; @param RGB_TRIPLE {in}{required} A three-element column or row array representing 17 10 ; a color triple. The values of the elements must be between 18 11 ; 0 and 255. 19 12 ; 20 ; KEYWORD PARAMETERS: 21 ; None. 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) 16 ; where the left two digits represent the blue color, the 17 ; middle two digits represent the green color, and the right 18 ; two digits represent the red color. 22 19 ; 23 ; COMMON BLOCKS: 24 ; None. 25 ; 26 ; SIDE EFFECTS: 27 ; None. 28 ; 29 ; RESTRICTIONS: 30 ; None. 31 ; 32 ; EXAMPLE: 33 ; To convert the color triple for the color YELLOW, 20 ; @examples To convert the color triple for the color YELLOW, 34 21 ; (255, 255, 0), to the hexadecimal value '00FFFF'x 35 22 ; or the decimal number 65535, type: … … 40 27 ; COLORS or GETCOLOR 41 28 ; 42 ; MODIFICATION HISTORY:29 ; @history 43 30 ; Written by: David Fanning, 3 February 96. 31 ; 32 ; @version $Id$ 33 ; 44 34 ;- 45 46 47 35 FUNCTION COLOR24, number 48 36 ; 49 37 compile_opt idl2, strictarrsubs 50 ; 51 52 ; This FUNCTION accepts a [red, green, blue] triple that 53 ; describes a particular color and returns a 24-bit long 54 ; integer that is equivalent to that color. The color is 55 ; described in terms of a hexidecimal number (e.g., FF206A) 56 ; where the left two digits represent the blue color, the 57 ; middle two digits represent the green color, and the right 58 ; two digits represent the red color. 59 ; 60 ; The triple can be either a row or column vector of 3 elements. 61 38 ; 62 39 ON_ERROR, 1 63 40 -
trunk/SRC/Colors/colorbar.pro
r132 r133 1 1 ;+ 2 ; NAME: 3 ; COLORBAR 4 ; 5 ; PURPOSE: 6 ; The purpose of this routine is to add a color bar to the current 7 ; graphics window. 8 ; 9 ; CATEGORY: 10 ; Graphics, Widgets. 11 ; 12 ; CALLING SEQUENCE: 13 ; COLORBAR 14 ; 15 ; INPUTS: 16 ; None. 17 ; 18 ; KEYWORD PARAMETERS: 19 ; 20 ; BOTTOM: The lowest color index of the colors to be loaded in 2 ; 3 ; @file_comments 4 ; The purpose of this routine is to add a color bar to the current 5 ; graphics window. 6 ; 7 ; @categories Graphics, Widgets. 8 ; 9 ; @keyword BOTTOM The lowest color index of the colors to be loaded in 21 10 ; the bar. 22 11 ; 23 ; CB_CHARSIZE:The character size of the color bar annotations. Default is 1.0.24 ; 25 ; CB_CHARTICK:The character thick of the color bar annotations. Default is 1.0.26 ; 27 ; CB_COLOR:The color index of the bar outline and characters. Default12 ; @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 28 17 ; is ncolors - 1 + bottom. 29 18 ; 30 ; CB_LOG:to get logarithmic scale for the colorbar31 ; 32 ; CB_TITLE:This is title for the color bar. The default is to have19 ; @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 33 22 ; no title. 34 23 ; 35 ; DISCRET: Vecteur contenant les incices des couleurs a tracer en barre36 ; de couleur. On obtient ainsi une barre de couleur discrete ne comportant que37 ; les couleurs specifiees ds l'ordre ou elles apparaissent ds le vecteur.38 ; 39 ; DIVISIONS:The number of divisions to divide the bar into. There will24 ; @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 40 29 ; be (divisions + 1) annotations. The default is 2. 41 30 ; 42 ; FORMAT: The format of the bar annotations. Default is '(F6.2)'. 43 ; 44 ; CB_LABEL: C''est un vecteur qui specifie la valeur des sticks 45 ; presents dans la barre de couleur. Il permet qd on utilise 46 ; DISCRET d''avoir des couleurs qui ne s''incrementent pas de 47 ; facon regulieres. 48 ; 49 ; MAX: The maximum data value for the bar annotation. Default is 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 50 38 ; NCOLORS-1. 51 39 ; 52 ; MIN:The minimum data value for the bar annotation. Default is 0.53 ; 54 ; NCOLORS:This is the number of colors in the color bar.55 ; 56 ; NOTITLE: oblige a ne pas mettre de titre meme si cb_title est declare57 ; 58 ; POSITION:A four-element array of normalized coordinates in the same40 ; @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 59 47 ; form as the POSITION keyword on a plot. Default is 60 48 ; [0.88, 0.15, 0.95, 0.95] for a vertical bar and 61 49 ; [0.15, 0.88, 0.95, 0.95] for a horizontal bar. 62 50 ; 63 ; PSCOLOR:This keyword is only applied if the output is being sent to51 ; @keyword PSCOLOR This keyword is only applied if the output is being sent to 64 52 ; a PostScript file. It indicates that the PostScript device 65 53 ; is configured for color output. If this keyword is set, then … … 74 62 ; are outputting to a color PostScript printer. 75 63 ; 76 ; RIGHT:This puts the labels on the right-hand side of a vertical64 ; @keyword RIGHT This puts the labels on the right-hand side of a vertical 77 65 ; color bar. It applies only to vertical color bars. 78 66 ; 79 ; TOP:This puts the labels on top of the bar rather than under it.67 ; @keyword TOP This puts the labels on top of the bar rather than under it. 80 68 ; The keyword only applies if a horizontal color bar is rendered. 81 69 ; 82 ; VERTICAL:Setting this keyword give a vertical color bar. The default70 ; @keyword VERTICAL Setting this keyword give a vertical color bar. The default 83 71 ; is a horizontal color bar. 84 72 ; 85 ; COMMON BLOCKS: 86 ; None. 87 ; 88 ; SIDE EFFECTS: 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 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 93 76 ; PostScript device) is used unless the NCOLORS keyword is used. 94 77 ; 95 ; EXAMPLE: 96 ; To display a horizontal color bar above a contour plot, type: 97 ; 98 ; LOADCT, 5, NCOLORS=100 99 ; CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $ 100 ; C_COLORS=INDGEN(25)*4, NLEVELS=25 101 ; COLORBAR, NCOLORS=100 102 ; 103 ; MODIFICATION HISTORY: 104 ; Written by: David Fanning, 10 JUNE 96. 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 84 ; 85 ; @history Written by: David Fanning, 10 JUNE 96. 105 86 ; 10/27/96: Added the ability to send output to PostScript. DWF 106 87 ; 11/4/96: Substantially rewritten to go to screen or PostScript … … 113 94 ; 3/3/98: ajout du keyword discret par 114 95 ; sebastien (smasson@lodyc.jussieu.fr) 96 ; 97 ; @version $Id$ 98 ; 115 99 ;- 116 100 117 101 PRO COLORBAR, BOTTOM=bottom, CB_CHARSIZE=cb_charsize, CB_CHARTHICK=cb_charthick $ 118 102 , CB_COLOR=cb_color, $ 119 DIVISIONS=divisions, DISCRET =discret,CB_LABEL = cb_label, $103 DIVISIONS=divisions, DISCRETE=discrete,CB_LABEL = cb_label, $ 120 104 FORMAT=format, POSITION=position, MAX=max, MIN=min, NCOLORS=ncolors, $ 121 105 PSCOLOR=pscolor, CB_TITLE=cb_title, VERTICAL=vertical, TOP=top, RIGHT=right, CB_LOG = CB_log, _extra = ex … … 189 173 190 174 IF KEYWORD_SET(vertical) THEN BEGIN 191 IF KEYWORD_SET(discret ) THEN begin192 facteur=256/n_elements(discret )193 discret =reform(replicate(1,facteur) # discret,facteur*n_elements(discret), /overwrite)194 bar = REPLICATE(1B,10) # discret 175 IF KEYWORD_SET(discrete) THEN begin 176 facteur=256/n_elements(discrete) 177 discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite) 178 bar = REPLICATE(1B,10) # discrete 195 179 endif else bar = REPLICATE(1B,10) # BINDGEN(256) 196 180 IF N_ELEMENTS(position) EQ 0 THEN position = [0.88, 0.15, 0.95, 0.95] 197 181 ENDIF ELSE BEGIN 198 IF KEYWORD_SET(discret ) THEN begin199 facteur=256/n_elements(discret )200 discret =reform(replicate(1,facteur) # discret,facteur*n_elements(discret), /overwrite)201 bar = discret # REPLICATE(1B,10)182 IF KEYWORD_SET(discrete) THEN begin 183 facteur=256/n_elements(discrete) 184 discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite) 185 bar = discrete # REPLICATE(1B,10) 202 186 endif else bar = BINDGEN(256) # REPLICATE(1B, 10) 203 187 IF N_ELEMENTS(position) EQ 0 THEN position = [0.15, 0.88, 0.95, 0.95] … … 205 189 206 190 ; Scale the color bar. 207 IF NOT KEYWORD_SET(discret ) THEN $191 IF NOT KEYWORD_SET(discrete) THEN $ 208 192 bar = BYTSCL(bar, TOP=ncolors-1) + bottom 209 193 -
trunk/SRC/Colors/getcolor.pro
r132 r133 1 1 ;+ 2 ; NAME: 3 ; GETCOLOR 4 ; 5 ; PURPOSE: 6 ; The original purpose of this function was to enable the 7 ; user to specify one of the 16 colors supported by the 8 ; McIDAS color map by name. Over time, however, the function 9 ; has become a general purpose function for handling and 10 ; supporting drawing colors in a device-independent way. 11 ; In particular, I have been looking for ways to write color 12 ; handling code that will work transparently on both 8-bit and 13 ; 24-bit machines. On 24-bit machines, the code should work the 14 ; same where color decomposition is turned on or off. 2 ; 3 ; @file_comments 4 ; The original purpose of this function was to enable the 5 ; user to specify one of the 16 colors supported by the 6 ; McIDAS color map by name. Over time, however, the function 7 ; has become a general purpose function for handling and 8 ; supporting drawing colors in a device-independent way. 9 ; In particular, I have been looking for ways to write color 10 ; handling code that will work transparently on both 8-bit and 11 ; 24-bit machines. On 24-bit machines, the code should work the 12 ; same where color decomposition is turned on or off. 15 13 ; 16 14 ; (The 16 supported colors in GETCOLOR come from the McIDAS color 17 15 ; table offered on the IDL newsgroup by Liam Gumley.) 18 16 ; 19 ; CATEGORY: 20 ; Graphics, Color Specification. 21 ; 22 ; CALLING SEQUENCE: 23 ; result = GETCOLOR(color) 24 ; 25 ; OPTIONAL INPUT PARAMETERS: 26 ; COLOR: A string with the "name" of the color. Valid names are: 17 ; @categories Graphics, Color Specification. 18 ; 19 ; @param thisColor {in}{optional} A string with the "name" of the color. Valid names are: 27 20 ; black 28 21 ; magenta … … 53 46 ; IDL 5.2 or higher. 54 47 ; 55 ; INDEX:The color table index where the specified color should be loaded.48 ; @param index {in}{optional} The color table index where the specified color should be loaded. 56 49 ; If this parameter is passed, then the return value of the function is the 57 50 ; index number and not the color triple. (If color decomposition is turned … … 69 62 ; TVLCT, colors, 100 70 63 ; 71 ; 72 ; INPUT KEYWORD PARAMETERS: 73 ; 74 ; NAMES: If this keyword is set, the return value of the function is 64 ; @keyword NAMES If this keyword is set, the return value of the function is 75 65 ; a 16-element string array containing the names of the colors. 76 66 ; These names would be appropriate, for example, in building … … 80 70 ; listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 81 71 ; 82 ; LOAD:If this keyword is set, all 16 colors are automatically loaded72 ; @keyword LOAD If this keyword is set, all 16 colors are automatically loaded 83 73 ; starting at the color index specified by the START keyword. 84 74 ; Note that setting this keyword means that the return value of the … … 92 82 ; byte array or a long integer value. 93 83 ; 94 ; START:The starting color index number if the LOAD keyword is set. This keyword84 ; @keyword START The starting color index number if the LOAD keyword is set. This keyword 95 85 ; value is ignored unless the LOAD keyword is also set. The keyword is also 96 86 ; ignored if the TRUE keyword is set or if color decomposition in on in … … 98 88 ; !D.TABLE_SIZE - 17. 99 89 ; 100 ; TRUE:If this keyword is set, the specified color triple is returned90 ; @keyword TRUE If this keyword is set, the specified color triple is returned 101 91 ; as a 24-bit integer equivalent. The lowest 8 bits correspond to 102 92 ; the red value; the middle 8 bits to the green value; and the … … 105 95 ; were set. 106 96 ; 107 ; COMMON BLOCKS: 108 ; None. 109 ; 110 ; SIDE EFFECTS: 111 ; None. 112 ; 113 ; RESTRICTIONS: 114 ; The TRUE keyword causes the START keyword to be ignored. 97 ; @restrictions The TRUE keyword causes the START keyword to be ignored. 115 98 ; The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be ignored. 116 99 ; The COLOR parameter is ignored if the LOAD keyword is used. … … 119 102 ; returned if color decomposition is ON. 120 103 ; 121 ; EXAMPLE:122 ; 123 ; 124 ; yellow = GETCOLOR('yellow', 100)125 ; PLOT, data, COLOR=yellow104 ; 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 126 109 ; 127 110 ; or, 128 111 ; 129 ; PLOT, data, COLOR=GETCOLOR('yellow', 100)112 ; IDL> PLOT, data, COLOR=GETCOLOR('yellow', 100) 130 113 ; 131 114 ; To do the same thing on a 24-bit color system with decomposed color on, type: 132 115 ; 133 ; PLOT, data, COLOR=GETCOLOR('yellow', /TRUE)116 ; IDL> PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 134 117 ; 135 118 ; or in IDL 5.2 and higher, 136 119 ; 137 ; DEVICE, Decomposed=1138 ; PLOT, data, COLOR=GETCOLOR('yellow')120 ; IDL> DEVICE, Decomposed=1 121 ; IDL> PLOT, data, COLOR=GETCOLOR('yellow') 139 122 ; 140 123 ; To load all 16 colors into the current color table, starting at 141 124 ; color index 200, type: 142 125 ; 143 ; TVLCT, GETCOLOR(), 200126 ; IDL> TVLCT, GETCOLOR(), 200 144 127 ; 145 128 ; To add the color names to a list widget: 146 129 ; 147 ; listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16)130 ; IDL> listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 148 131 ; 149 132 ; To load all 16 colors and have the color indices returned in a structure: 150 133 ; 151 ; DEVICE, Decomposed=0152 ; colors = GetColor(/Load, Start=1)153 ; HELP, colors, /Structure134 ; IDL> DEVICE, Decomposed=0 135 ; IDL> colors = GetColor(/Load, Start=1) 136 ; IDL> HELP, colors, /Structure 154 137 ; PLOT, data, COLOR=colors.yellow 155 138 ; 156 139 ; To get the direct color values as 24-bit integers in color structure fields: 157 140 ; 158 ; DEVICE, Decomposed=1159 ; colors = GetColor(/Load)160 ; PLOT, data, COLOR=colors.yellow141 ; IDL> DEVICE, Decomposed=1 142 ; IDL> colors = GetColor(/Load) 143 ; IDL> PLOT, data, COLOR=colors.yellow 161 144 ; 162 145 ; Note that the START keyword value is ignored if on a 24-bit device, … … 164 147 ; writing code like this: 165 148 ; 166 ; colors = GetColor(/Load) 167 ; PLOT, data, Color=colors.yellow 168 ; 169 ; MODIFICATION HISTORY: 170 ; Written by: David Fanning, 10 February 96. 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 167 ; 168 ; @history Written by: David Fanning, 10 February 96. 171 169 ; Fixed a bug in which N_ELEMENTS was spelled wrong. 7 Dec 96. DWF 172 170 ; Added the McIDAS colors to the program. 24 Feb 99. DWF … … 176 174 ; Added automatic recognition of DECOMPOSED=1 state. 7 June 99. DWF 177 175 ; Added LOAD AND START keywords. 7 June 99. DWF. 176 ; 177 ; @version $Id$ 178 178 ;- 179 180 181 182 FUNCTION COLOR24, number183 ;184 compile_opt idl2, strictarrsubs185 ;186 187 ; This FUNCTION accepts a [red, green, blue] triple that188 ; describes a particular color and returns a 24-bit long189 ; integer that is equivalent to that color. The color is190 ; described in terms of a hexidecimal number (e.g., FF206A)191 ; where the left two digits represent the blue color, the192 ; middle two digits represent the green color, and the right193 ; two digits represent the red color.194 ;195 ; The triple can be either a row or column vector of 3 elements.196 197 ON_ERROR, 1198 199 IF N_ELEMENTS(number) NE 3 THEN $200 MESSAGE, 'Augument must be a three-element vector.'201 202 IF MAX(number) GT 255 OR MIN(number) LT 0 THEN $203 MESSAGE, 'Argument values must be in range of 0-255'204 205 base16 = [[1L, 16L], [256L, 4096L], [65536L, 1048576L]]206 207 num24bit = 0L208 209 FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $210 (Fix(number[j]/16) * base16[1,j])211 212 RETURN, num24bit213 END ; ************************ of COLOR24 ******************************214 215 216 179 217 180 FUNCTION GETCOLOR, thisColor, index, TRUE=truecolor, $ -
trunk/SRC/Colors/lct.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:lct6 5 ; 7 ; PURPOSE:plus court que de taper loadct,file='palette.tbl' 6 ; @file_comments 7 ; Fastest than type loadct,file='palette.tbl' 8 8 ; 9 ; CATEGORY:flemme9 ; @categories graphics, color specification 10 10 ; 11 ; CALLING SEQUENCE:lct[,numerp_couleur]11 ; @param numpal {in}{optional} number of the color palette we want to select in the file palette.tbl 12 12 ; 13 ; INPUTS:optionnel: numero de la couleur que l''on veut ds palette.tbl 14 ; 15 ; KEYWORD PARAMETERS: ceux de loadct 16 ; 17 ; LIGHTNESS: a scalar used to change the Lightness of the color 13 ; @keyword LIGHTNESS a scalar used to change the Lightness of the color 18 14 ; palette to be abble to adjust according to the printer we use, 19 15 ; the media (paper or slide)... … … 21 17 ; > 1 to get darker colors 22 18 ; 23 ; rq: si le mot cle file n''est pas specifie, on cherche un fichier24 ; contenant les palette du nom depalette.tbl.25 ; Ce fichier peut etre dans n''importe quel repertoire du!path19 ; @keyword FILE {default=palette.tbl} is not specified, we are looking a file containing 20 ; palettes named palette.tbl. 21 ; This file can be in any directory of the !path 26 22 ; 27 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 28 ; 30/3/1999 ajout de _extra, de la recherche 29 ; du nom complet et pour que ca marche aussi en 30 ; mode PS et Z 31 ; 6/7/1999: compatibilite mac et windows 23 ; @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. 25 ; 26 ; @keyword _EXTRA Used to pass your keywords 27 ; 28 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 29 ; 30/3/1999: add extra 30 ; 6/7/1999: mac/windows comptibility 31 ; 32 ; @version $Id$ 33 ; 32 34 ;- 33 35 ;------------------------------------------------------------ 34 36 ;------------------------------------------------------------ 35 37 ;------------------------------------------------------------ 36 PRO lct, num ero, GET_NAME = get_name, LIGHTNESS = Lightness, _EXTRA = ex38 PRO lct, numpal, FILE = file, GET_NAME = get_name, LIGHTNESS = Lightness, _EXTRA = ex 37 39 ; 38 40 compile_opt idl2, strictarrsubs 39 41 ; 40 42 @common 41 ; le mot cle file est passe par l''intermediere de EXTRA? 42 ; definition du mon du fichier qui contient les palettes de couleur 43 if n_elements(ex) NE 0 then BEGIN 44 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then nompal=ex.FILE ELSE nompal='palette.tbl' 45 ENDIF ELSE nompal = 'palette.tbl' 46 ; quelle est l''adresse complete de nompal? 43 ; definition of the name of the file containing colors palettes. 44 if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' 45 ; What is the full adress of nametbl? 47 46 thisOS = strupcase(strmid(!version.os_family, 0, 3)) 48 47 CASE thisOS of … … 52 51 ENDCASE 53 52 cd, current = current 54 if strpos(n ompal,sep) lt 0 then BEGIN53 if strpos(nametbl,sep) lt 0 then BEGIN 55 54 if rstrpos(current,sep) NE strlen(current)-1 then current = current+sep 56 55 multipath = str_sep(!path,pathsep) … … 58 57 if rstrpos(multipath[i],sep) NE strlen(multipath[i])-1 then $ 59 58 multipath[i] = multipath[i] +sep 60 n ompal = [current, multipath]+ nompal59 nametbl = [current, multipath]+ nametbl 61 60 ENDIF 62 ; on test tous les noms possibles pour trouver ou est le fichier63 nfile=n_elements(n ompal)61 ; we test all possible name in order to find where file is. 62 nfile=n_elements(nametbl) 64 63 n = 0 65 64 repeat begin 66 res = findfile(n ompal[n])65 res = findfile(nametbl[n]) 67 66 n = n+1 68 endrep until res[0] NE '' OR n EQ n_elements(n ompal)67 endrep until res[0] NE '' OR n EQ n_elements(nametbl) 69 68 if res[0] NE '' then BEGIN 70 n ompal = nompal[n-1]69 nametbl = nametbl[n-1] 71 70 if n_elements(ex) NE 0 then $ 72 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nompal 73 ; si on est en mode POSTSCRIPT, il faut repasser en mode X pour 74 ; changer la palette de couleur 71 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl 72 ; if we are in POSTSCRIPT mode, we have to pass in X mode in order to change the color palette 75 73 oldname = !d.name 76 74 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN … … 89 87 ; 90 88 if arg_present(get_name) then begin 91 if n_elements(num ero) EQ 0 then loadct, file=nompal, GET_NAME = get_name, _EXTRA = ex $92 ELSE loadct,num ero, file=nompal, /silent, GET_NAME = get_name,_EXTRA = ex89 if n_elements(numpal) EQ 0 then loadct, file=nametbl, GET_NAME = get_name, _EXTRA = ex $ 90 ELSE loadct,numpal, file=nametbl, /silent, GET_NAME = get_name,_EXTRA = ex 93 91 ENDIF ELSE BEGIN 94 if n_elements(num ero) EQ 0 then loadct, file=nompal, _EXTRA = ex $95 ELSE loadct,num ero, file=nompal, /silent, _EXTRA = ex92 if n_elements(numpal) EQ 0 then loadct, file=nametbl, _EXTRA = ex $ 93 ELSE loadct,numpal, file=nametbl, /silent, _EXTRA = ex 96 94 ENDELSE 97 95 ; -
trunk/SRC/Colors/newpalette.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:newpalette6 5 ; 7 ; PURPOSE:permet de stocker la palette qui est a l''ecran dans un 8 ; fichier du meme type que celui fournit par defaut dans IDL: 6 ; @file_comments 7 ; Allows to stock the palette which is on the screen 8 ; in a same type file than the one gave by default in IDL 9 9 ; 'colors1.tbl'. 10 10 ; 11 ; CATEGORY:pour garder ses jolies palettes perso.11 ; @categories graphic, color specification 12 12 ; 13 ; CALLING SEQUENCE:newpalette,nom_de_palette13 ; @param namepal {in}{required} It is a string containing the name of the new palettte we want to write. 14 14 ; 15 ; INPUTS:nom_de_palette: c'est un string qui contient le nom de la16 ; nouvelle palette que l''on veut ecrire.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 17 17 ; 18 ; KEYWORD PARAMETERS: 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 19 22 ; 20 ; OVER: c''est un entier qui designe le numero de la palette que l''on 21 ; veut remplacer par la palette a l''ecran. 22 ; 23 ; + ceux de modifyct 23 ; @keyword _extra Used to pass your keywords 24 24 ; 25 ; rq: si le mot cle file n''est pas specifie, on cherche un fichier 26 ; contenant les palettes du nom de palette.tbl. 27 ; Ce fichier peut etre dans n''importe quel repertoire du !path 28 ; Par contre il doit etre en droit d''ecriture 25 ; @history Guillaume Roulet (gr@lodyc.jussieu.fr) 26 ; 30/3/1999 s.masson, add _extra, research of the full name, OVER 27 ; 5/5/1999 s.masson 29 28 ; 30 ; MODIFICATION HISTORY: Guillaume Roulet (gr@lodyc.jussieu.fr) 31 ; 30/3/1999 s.masson, ajout de _extra, de le 32 ; recherche du nom complet, de OVER et du blabla 33 ; 5/5/1999 s.masson, va copie eventuelle du 34 ; fichier contenant les palettes 29 ; @version $Id$ 30 ; 31 ; @todo seb cleaning + traduction 35 32 ;- 36 33 ;------------------------------------------------------------ 37 34 ;------------------------------------------------------------ 38 35 ;------------------------------------------------------------ 39 pro newpalette,nom, OVER = over, _extra = ex 40 ; le mot cle file est passe par l''intermediere de EXTRA? 41 ; definition du mon du fichier qui contient les palettes de couleur 36 pro newpalette,namepal, FILE = file, OVER = over, _extra = ex 42 37 ; 43 38 compile_opt idl2, strictarrsubs 44 39 ; 45 if n_elements(ex) NE 0 then BEGIN 46 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then nompal=ex.FILE ELSE nompal='palette.tbl' 47 ENDIF ELSE nompal = 'palette.tbl' 48 nomcourt = nompal 49 ; quelle est l''adresse complete de nompal? 50 nompal = find(nompal) 51 if nompal[0] NE 'NOT FOUND' then begin 52 nompal = nompal[0] 53 ; nompal nous appartient??? 40 ; definition of the name of the file containing colors palettes. 41 if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' 42 nomcourt = nametbl 43 ; What is the full adress of nametbl? 44 nametbl = find(nametbl) 45 if nametbl[0] NE 'NOT FOUND' then begin 46 nametbl = nametbl[0] 47 ; does nametbl is our? 54 48 spawn, 'whoami', login 55 appartient = strpos(n ompal, login[0])49 appartient = strpos(nametbl, login[0]) 56 50 if appartient EQ -1 then begin 57 ouinon = report('Le fichier '+n ompal+' ne vous appartient pas, Voulez-vous copier le fichier '+nomcourt+' dans le repertoire courant: '+current+' ?', /default_no, /question)51 ouinon = report('Le fichier '+nametbl+' ne vous appartient pas, Voulez-vous copier le fichier '+nomcourt+' dans le repertoire courant: '+current+' ?', /default_no, /question) 58 52 if ouinon then return ELSE BEGIN 59 spawn, 'cp '+n ompal+' '+nomcourt ; on copie60 n ompal = nomcourt61 spawn, 'chmod u+w '+n ompal ; on se donne les droits d''ecriture53 spawn, 'cp '+nametbl+' '+nomcourt ; copy 54 nametbl = nomcourt 55 spawn, 'chmod u+w '+nametbl ; give writing rights 62 56 ENDELSE 63 57 endif 64 ENDIF ELSE BEGIN ; aucun fichier nompal a ete trouve65 n ompal = nomcourt ; on recupe le nompal d''origine66 ouinon = report('le fichier de palettes demande '+n ompal+' n''existe pas ds les repertoires !path. Voulez-vous cree un fichier '+nompal+' dans le repertoire courant', /default_no, /question)58 ENDIF ELSE BEGIN ; no file nametbl found 59 nametbl = nomcourt ; we reclaim the nametbl source 60 ouinon = report('le fichier de palettes demande '+nametbl+' n''existe pas ds les repertoires !path. Voulez-vous cree un fichier '+nametbl+' dans le repertoire courant', /default_no, /question) 67 61 if NOT ouinon then return 68 62 nomfichsource = filepath('colors1.tbl', subdir=['resource', 'colors']) 69 spawn,'cp '+nomfichsource+' '+n ompal ; on copie70 spawn, 'chmod u+w '+n ompal ; on se donne les droits d''ecriture63 spawn,'cp '+nomfichsource+' '+nametbl ; copy 64 spawn, 'chmod u+w '+nametbl ; give writing rights 71 65 ENDELSE 72 66 73 67 if n_elements(ex) NE 0 then $ 74 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = n ompal68 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl 75 69 ; 76 70 tvlct,r,g,b,/get … … 79 73 b=congrid(b,256) 80 74 IF n_elements(over) EQ 0 then over = 255 81 modifyct,over,n om,r,g,b,file=nompal, _extra = ex75 modifyct,over,namepal,r,g,b,file=nametbl, _extra = ex 82 76 ; 83 77 return -
trunk/SRC/Colors/xlct.pro
r132 r133 1 ; $Id$2 ;3 ; Copyright (c) 1991-1998, Research Systems, Inc. All rights reserved.4 ; Unauthorized reproduction prohibited.5 1 6 2 PRO XLCT_PSAVE ;Save/Restore our plotting state. … … 375 371 376 372 ;+ 377 ; NAME: 378 ; XLCT 379 ; PURPOSE: 380 ; comme xloadct mais plus cour a ecrire et appelle par defaut la 381 ; palette palette.tbl qui peut etre situee dans n''importe quel 382 ; repertoire de !path. 383 ; 384 ; CATEGORY: 385 ; Widgets 386 ; CALLING SEQUENCE: 387 ; XLCT 388 ; INPUTS: 389 ; None. 390 ; KEYWORDS: 391 ; FILE: If this keyword is set, the file by the given name is used 373 ; @file_comments 374 ; Like xloadct but fastest to write and call by default the palette 375 ; palette.tbl which can be in any directory 376 ; 377 ; @categories Widgets 378 ; 379 ; @keyword FILE If this keyword is set, the file by the given name is used 392 380 ; instead of the file colors1.tbl in the IDL directory. This 393 381 ; allows multiple IDL users to have their own color table file. 394 ; GROUP =The widget ID of the widget that calls Xlct. When382 ; @keyword GROUP The widget ID of the widget that calls Xlct. When 395 383 ; this ID is specified, a death of the caller results in a 396 384 ; death of Xlct 397 ; 385 ; @keyword NCOLORS = number of colors to use. Use color indices from BOTTOM 398 386 ; to the smaller of !D.TABLE_SIZE-1 and NCOLORS-1. 399 387 ; Default = !D.TABLE_SIZE = all available colors. 400 ; 388 ; @keyword BOTTOM = first color index to use. Use color indices from BOTTOM to 401 389 ; BOTTOM+NCOLORS-1. Default = 0. 402 ; 390 ; @keyword SILENT - Normally, no informational message is printed when 403 391 ; a color map is loaded. If this keyword is present and 404 392 ; zero, this message is printed. 405 ; 393 ; @keyword USE_CURRENT: If set, use the current color tables, regardless of 406 394 ; the contents of the COMMON block COLORS. 407 ; 395 ; @keyword MODAL: If set, then XLCT runs in "modal" mode, meaning that 408 396 ; all other widgets are blocked until the user quits XLCT. 409 397 ; A group leader must be specified (via the GROUP keyword) 410 398 ; for the MODAL keyword to have any effect. The default 411 399 ; is to not run in modal mode. 412 ; 400 ; @keyword BLOCK: Set this keyword to have XMANAGER block when this 413 401 ; application is registered. By default the Xmanager 414 402 ; keyword NO_BLOCK is set to 1 to provide access to the … … 418 406 ; application. For more information see the NO_BLOCK keyword 419 407 ; to XMANAGER. 420 ; 408 ; @keyword UPDATECALLBACK: Set this keyword to a string containing the name of 421 409 ; a user-supplied procedure that will be called when the color 422 410 ; table is updated by XLCT. The procedure may optionally … … 424 412 ; set to the value specified by the optional UPDATECBDATA 425 413 ; keyword. 426 ; 414 ; @keyword UPDATECBDATA: Set this keyword to a value of any type. It will be 427 415 ; passed via the DATA keyword to the user-supplied procedure 428 416 ; specified via the UPDATECALLBACK keyword, if any. If the … … 431 419 ; will be undefined. 432 420 ; 433 ; OUTPUTS: 434 ; None. 435 ; COMMON BLOCKS: 436 ; None. 437 ; SIDE EFFECTS: 438 ; One of the predefined color maps may be loaded. 439 ; RESTRICTIONS: 440 ; This routine uses the LOADCT user library procedure to 421 ; @restrictions One of the predefined color maps may be loaded. 422 ; 423 ; @restrictions This routine uses the LOADCT user library procedure to 441 424 ; do the actual work. 442 ; MODIFICATION HISTORY: 443 ; 5/5/1999 copie de xloadct par Sebastien Masson (smlod@ipsl.jussieu.fr) 425 ; 426 ; @history 5/5/1999 copie de xloadct par Sebastien Masson (smlod@ipsl.jussieu.fr) 427 ; 428 ; @version $Id$ 429 ; 444 430 ;- 445 431 … … 471 457 IF KEYWORD_SET(SILENT_f) THEN silent = SILENT_F ELSE silent = 1 472 458 ;----------------------------------------------------------------------------- 473 ; changements effectues parS.Masson459 ; Changes made by S.Masson 474 460 ;----------------------------------------------------------------------------- 475 461 IF N_ELEMENTS(file) GT 0 THEN filename = file ELSE BEGIN -
trunk/SRC/Colors/xpal.pro
r132 r133 1 ; $Id$2 ;3 ; Copyright (c) 1992-1998, Research Systems, Inc. All rights reserved.4 ; Unauthorized reproduction prohibited.5 1 ;+ 6 ; NAME: 7 ; XPAL 8 ; 9 ; PURPOSE: 10 ; comme xpalette mais plus court a ecrire et possede en plus 11 ; une touche save qui (grace a la routine newpalette) permet de 12 ; sauver la routine que l''on vient de faire. Rq qd on appuie 13 ; sur la touche predefined appelle xlct plutot que xloadct 14 ; 15 ; CATEGORY: 16 ; Color tables, widgets. 17 ; 18 ; CALLING SEQUENCE: 19 ; XPAL 20 ; 21 ; INPUTS: 22 ; No explicit inputs. The current color table is used as a starting 23 ; point. 24 ; 25 ; KEYWORD PARAMETERS: 26 ; BLOCK: Set this keyword to have XMANAGER block when this 2 ; 3 ; @file_comments 4 ; like xpalette but shorter to write and ,moreover, 5 ; possess a hotkey save which (thanks to the newpalette routine) 6 ; allows to save the routine that we have just done. Comment: when we 7 ; press the predefined hotkey, it calls xlct instead of xloadct 8 ; No explicit inputs. The current color table is used as a starting point. 9 ; 10 ; @categories Color tables, widgets. 11 ; 12 ; @keyword BLOCK Set this keyword to have XMANAGER block when this 27 13 ; application is registered. By default the Xmanager 28 14 ; keyword NO_BLOCK is set to 1 to provide access to the … … 32 18 ; application. For more information see the NO_BLOCK keyword 33 19 ; to XMANAGER. 34 ; UPDATECALLBACK:Set this keyword to a string containing the name of20 ; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 35 21 ; a user-supplied procedure that will be called when the color 36 22 ; table is updated by XLOADCT. The procedure may optionally … … 38 24 ; set to the value specified by the optional UPDATECBDATA 39 25 ; keyword. 40 ; UPDATECBDATA:Set this keyword to a value of any type. It will be26 ; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 41 27 ; passed via the DATA keyword to the user-supplied procedure 42 28 ; specified via the UPDATECALLBACK keyword, if any. If the … … 45 31 ; will be undefined. 46 32 ; 47 ; OUTPUTS: 48 ; None. 49 ; 50 ; COMMON BLOCKS: 51 ; COLORS: Contains the current RGB color tables. 52 ; XP_COM: Private to this module. 53 ; 54 ; SIDE EFFECTS: 55 ; XPAL uses two colors from the current color table as 33 ; @uses COLORS: Contains the current RGB color tables. 34 ; @uses XP_COM: Private to this module. 35 ; 36 ; @restrictions XPAL uses two colors from the current color table as 56 37 ; drawing foreground and background colors. These are used 57 38 ; for the RGB plots on the left, and the current index marker on … … 72 53 ; to the display. 73 54 ; 74 ; PROCEDURE: 75 ; The XPAL widget has the following controls: 55 ; @examples The XPAL widget has the following controls: 76 56 ; 77 57 ; Left: Three plots showing the current Red, Green, and Blue vectors. … … 95 75 ; pressed: 96 76 ; 97 ; Done:Exits XPAL.98 ; 99 ; Predefined:Starts XLOADCT to allow selection of one of the77 ; Done: Exits XPAL. 78 ; 79 ; Predefined: Starts XLOADCT to allow selection of one of the 100 80 ; predefined color tables. 101 81 ; 102 ; Help:Supplies help information similar to this header.82 ; Help: Supplies help information similar to this header. 103 83 ; 104 84 ; Redraw: Completely redraws the display using the current … … 117 97 ; index and the mark index are interpolated linearly 118 98 ; to lie between the colors of two endpoints. 119 ; save: permet de sauver la palette qui est 120 ; actuellement a l''ecran. Qd on appuie sur ce 121 ; bouton, un widget apparait qui demande: 122 ; 1) le nom a donner a la palette que l''on veut sauver 123 ; 2) le numero de la palette que l''on veut 124 ; eventuellement ecrase par la nouvelle 125 ; palette.Si aucun numero n''est specifie la 126 ; nouvelle palette estajoutee aux anciennes. 127 ; 3) le nom du fichier qui contient les 128 ; palettes. Rq: suivre eventuellement les 129 ; indications fournis au prompteur. 99 ; save: Allows to save the palette which is currently 100 ; on the screen. When we press this hotkey, there is a 101 ; widget who appear and ask: 102 ; 1) the name of the palette we want to save. 103 ; 2) The number of the palette we may want to erase 104 ; by the new palette. If there is not any number 105 ; specified, the new palette is add to elders. 106 ; 3) The name of the file containing palettes. 107 ; Comment: May follow instructions gave by the prompter. 130 108 ; 131 109 ; … … 147 125 ; horizontally. 148 126 ; 149 ; MODIFICATION HISTORY: 150 ; addaptation de xpalette pour ajouter un bouton save par 127 ; @history addaptation de xpalette pour ajouter un bouton save par 151 128 ; Gima Nicolas (nglod@ipsl.jussieu.fr) et par Masson 152 129 ; Sebastien (smlod@ipsl.jussieu.fr) 130 ; 131 ; $Id$ 132 ; 153 133 ;- 154 134 ; 135 ;+ 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 ;- 155 142 function XP_NEW_COLORS 156 ; Choose the best foreground and background colors for the current157 ; color maps and set !P appropriately. Returns 1 if the colors changed,158 ; 0 otherwise.159 143 ; 160 144 compile_opt idl2, strictarrsubs … … 202 186 endif 203 187 end 204 188 ;+ 189 ; @file_comments XP_XLCTCALLBACK: For visuals with static colormaps, update the graphics 190 ; after a change by XLOADCT. 191 ;- 205 192 pro XP_XLCTCALLBACK 206 ; For visuals with static colormaps, update the graphics207 ; after a change by XLOADCT.208 193 ; 209 194 compile_opt idl2, strictarrsubs … … 230 215 end 231 216 232 233 234 pro XP_REPLOT, color_index, type 235 ; Re-draw the RGB plots. Type has the following possible values. 236 ;; - 'D': Draw the data part of all three plots 217 ;+ 218 ; @file_comments XP_REPLOT: Re-draw the RGB plots. Type has the following possible values. 219 ; - 'D': Draw the data part of all three plots 237 220 ; - 'F': draw all three plots 238 221 ; - 'R': Draw the data part of the Red plot 239 222 ; - 'G': Draw the data part of the Green plot 240 223 ; - 'B': Draw the data part of the Blue plot 224 ;- 225 pro XP_REPLOT, color_index, type 241 226 ; 242 227 compile_opt idl2, strictarrsubs … … 312 297 313 298 314 315 pro XP_CHANGE_COLOR, type, value 316 ; Change current color. Type has the following possible values. 299 ;+ 300 ; @file_comments XP_CHANGE_COLOR: Change current color. Type has the following possible values. 317 301 ; - 'R': Change the R part of the current color 318 302 ; - 'G': ... 319 303 ; - 'B': ... 304 ;- 305 pro XP_CHANGE_COLOR, type, value 320 306 ; 321 307 compile_opt idl2, strictarrsubs … … 553 539 554 540 555 541 ;+ 542 ; 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 ;- 556 567 557 568 … … 597 608 !p.color = nc -1 ;Foreground color 598 609 !p.font = 0 ;Hdw font 599 save_win = !d.window ;Previous window610 save_win = !d.window ;Previous window 600 611 601 612 IF N_ELEMENTS(r_orig) LE 0 THEN BEGIN ;If no common, use current colors -
trunk/SRC/ForOldVersion/updatekwd.pro
r122 r133 35 35 old = [old, 'petitdessin'] & new = [new, 'small'] 36 36 old = [old, 'ysurx'] & new = [new, 'yxaspect'] 37 old = [old, 'discret'] & new = [new, 'discrete'] 37 38 ; old = [old, ''] & new = [new, ''] 38 39 ; supress the first dummy argument and make sure we use lowcase -
trunk/SRC/Interpolation/inrecgrid.pro
r125 r133 2 2 ; 3 3 ; @file_comments 4 ,given - a list of points, (x,y) position4 ; given - a list of points, (x,y) position 5 5 ; - the x and y limits of a rectangular grid 6 6 ; find in which cell is located each given point. -
trunk/SRC/Matrix/cmapply.pro
r132 r133 1 ;; Utility function, adapted from CMPRODUCT 1 2 ;+ 2 ; NAME: 3 ; CMAPPLY 4 ; 5 ; AUTHOR: 6 ; Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770 7 ; craigm@lheamail.gsfc.nasa.gov 8 ; 9 ; PURPOSE: 10 ; Applies a function to specified dimensions of an array 11 ; 12 ; MAJOR TOPICS: 13 ; Arrays 14 ; 15 ; CALLING SEQUENCE: 16 ; XX = CMAPPLY(OP, ARRAY, DIMS, [/DOUBLE], [TYPE=TYPE]) 17 ; 18 ; DESCRIPTION: 19 ; CMAPPLY will apply one of a few select functions to specified 3 ; @todo seb 4 ;- 5 ; 6 function cmapply_product, x 7 ; 8 compile_opt idl2, strictarrsubs 9 ; 10 sz = size(x) 11 n = sz[1] 12 13 while n GT 1 do begin 14 if (n mod 2) EQ 1 then x[0,*] = x[0,*] * x[n-1,*] 15 n2 = floor(n/2) 16 x = x[0:n2-1,*] * x[n2:*,*] 17 n = n2 18 endwhile 19 return, reform(x[0,*], /overwrite) 20 end 21 22 ;; Utility function, used to collect collaped dimensions 23 ;+ 24 ; @todo seb 25 ;- 26 ; 27 pro cmapply_redim, newarr, dimapply, dimkeep, nkeep, totcol, totkeep 28 ; 29 compile_opt idl2, strictarrsubs 30 ; 31 sz = size(newarr) 32 ;; First task: rearrange dimensions so that the dimensions 33 ;; that are "kept" (ie, uncollapsed) are at the back 34 dimkeep = where(histogram(dimapply,min=1,max=sz[0]) ne 1, nkeep) 35 if nkeep EQ 0 then return 36 37 newarr = transpose(temporary(newarr), [dimapply-1, dimkeep]) 38 ;; totcol is the total number of collapsed elements 39 totcol = sz[dimapply[0]] 40 for i = 1, n_elements(dimapply)-1 do totcol = totcol * sz[dimapply[i]] 41 totkeep = sz[dimkeep[0]+1] 42 for i = 1, n_elements(dimkeep)-1 do totkeep = totkeep * sz[dimkeep[i]+1] 43 44 ;; this new array has two dimensions: 45 ;; * the first, all elements that will be collapsed 46 ;; * the second, all dimensions that will be preserved 47 ;; (the ordering is so that all elements to be collapsed are 48 ;; adjacent in memory) 49 newarr = reform(newarr, [totcol, totkeep], /overwrite) 50 end 51 52 ;; Main function 53 ;+ 54 ; 55 ; @file_comments 56 ; Applies a function to specified dimensions of an array 57 ; 58 ; Description: 59 ; 60 ; CMAPPLY will apply one of a few select functions to specified 20 61 ; dimensions of an array. Unlike some IDL functions, you *do* have 21 62 ; a choice of which dimensions that are to be "collapsed" by this … … 59 100 ; elements is large. 60 101 ; 61 ; 62 ; INPUTS: 63 ; 64 ; OP - The operation to perform, as a string. May be upper or lower 102 ; @categories Arrays 103 ; 104 ; @param OP {in}{required} The operation to perform, as a string. May be upper or lower 65 105 ; case. 66 106 ; … … 69 109 ; the user-defined function. 70 110 ; 71 ; ARRAY -An array of values to be operated on. Must not be of type111 ; @param ARRAY {in}{required} An array of values to be operated on. Must not be of type 72 112 ; STRING (7) or STRUCTURE (8). 73 113 ; 74 ; OPTIONAL INPUTS: 75 ; 76 ; DIMS - An array of dimensions that are to be "collapsed", where 114 ; @param DIMS {in}{optional}{default=1 (ie, first dimension)} 115 ; An array of dimensions that are to be "collapsed", where 77 116 ; the the first dimension starts with 1 (ie, same convention 78 117 ; as IDL function TOTAL). Whereas TOTAL only allows one … … 84 123 ; DEFAULT: 1 (ie, first dimension) 85 124 ; 86 ; KEYWORDS: 87 ; 88 ; DOUBLE - Set this if you wish the internal computations to be done 125 ; @keyword DOUBLE Set this if you wish the internal computations to be done 89 126 ; in double precision if necessary. If ARRAY is double 90 127 ; precision (real or complex) then DOUBLE=1 is implied. 91 128 ; DEFAULT: not set 92 129 ; 93 ; TYPE -Set this to the IDL code of the desired output type (refer130 ; @keyword TYPE Set this to the IDL code of the desired output type (refer 94 131 ; to documentation of SIZE()). Internal results will be 95 132 ; rounded to the nearest integer if the output type is an … … 97 134 ; DEFAULT: same is input type 98 135 ; 99 ; FUNCTARGS -If OP is 'USER:...', then the contents of this keyword136 ; @keyword FUNCTARGS If OP is 'USER:...', then the contents of this keyword 100 137 ; are passed to the user function using the _EXTRA 101 138 ; mechanism. This way you can pass additional data to … … 104 141 ; DEFAULT: undefined (i.e., no keywords passed by _EXTRA) 105 142 ; 106 ; RETURN VALUE: 107 ; 108 ; An array of the required TYPE, whose elements are the result of 143 ; @returns An array of the required TYPE, whose elements are the result of 109 144 ; the requested operation. Depending on the operation and number of 110 145 ; elements in the input array, the result may be vulnerable to 111 146 ; overflow or underflow. 112 147 ; 113 ; EXAMPLES: 114 ; Shows how CMAPPLY can be used to total the second dimension of the 148 ; @examples 149 ; 150 ; First example: Shows how CMAPPLY can be used to total the second dimension of the 115 151 ; array called IN. This is equivalent to OUT = TOTAL(IN, 2) 116 152 ; … … 120 156 ; OUT INT = Array[5] 121 157 ; 122 ; Second example .Input is assumed to be an 5x100 array of 1's and158 ; Second example: Input is assumed to be an 5x100 array of 1's and 123 159 ; 0's indicating the status of 5 detectors at 100 points in time. 124 160 ; The desired output is an array of 100 values, indicating whether … … 134 170 ; although there would have been more loop iterations). 135 171 ; 136 ; Third example .Shows sum over first and third dimensions in an172 ; Third example: Shows sum over first and third dimensions in an 137 173 ; array with dimensions 4x4x4: 138 174 ; … … 142 178 ; 408 472 536 600 143 179 ; 144 ; Fourth example .A user-function (MEDIAN) is used:180 ; Fourth example: A user-function (MEDIAN) is used: 145 181 ; 146 182 ; IDL> IN = RANDOMN(SEED,10,10,5) … … 151 187 ; (OUT[i,j] is the median value of IN[i,j,*]) 152 188 ; 153 ; MODIFICATION HISTORY: 154 ; Mar 1998, Written, CM 189 ; @history Mar 1998, Written, CM 155 190 ; Changed usage message to not bomb, 24 Mar 2000, CM 156 191 ; Signficant rewrite for *, MIN and MAX (inspired by Todd Clements … … 163 198 ; Correct bug in MAX/MIN initialization of RESULT, CM, 05 Dec 2002 164 199 ; 165 ; $Id$ 200 ; Author: Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770 201 ; craigm@lheamail.gsfc.nasa.gov 202 ; 203 ; @version $Id$ 166 204 ; 167 205 ;- 168 ; Copyright (C) 1998, 2000, 2002, Craig Markwardt169 ; This software is provided as is without any warranty whatsoever.170 ; Permission to use, copy, modify, and distribute modified or171 ; unmodified copies is granted, provided this copyright and disclaimer172 ; are included unchanged.173 ;-174 175 ;; Utility function, adapted from CMPRODUCT176 function cmapply_product, x177 ;178 compile_opt idl2, strictarrsubs179 ;180 sz = size(x)181 n = sz[1]182 183 while n GT 1 do begin184 if (n mod 2) EQ 1 then x[0,*] = x[0,*] * x[n-1,*]185 n2 = floor(n/2)186 x = x[0:n2-1,*] * x[n2:*,*]187 n = n2188 endwhile189 return, reform(x[0,*], /overwrite)190 end191 192 ;; Utility function, used to collect collaped dimensions193 pro cmapply_redim, newarr, dimapply, dimkeep, nkeep, totcol, totkeep194 ;195 compile_opt idl2, strictarrsubs196 ;197 sz = size(newarr)198 ;; First task: rearrange dimensions so that the dimensions199 ;; that are "kept" (ie, uncollapsed) are at the back200 dimkeep = where(histogram(dimapply,min=1,max=sz[0]) ne 1, nkeep)201 if nkeep EQ 0 then return202 203 newarr = transpose(temporary(newarr), [dimapply-1, dimkeep])204 ;; totcol is the total number of collapsed elements205 totcol = sz[dimapply[0]]206 for i = 1, n_elements(dimapply)-1 do totcol = totcol * sz[dimapply[i]]207 totkeep = sz[dimkeep[0]+1]208 for i = 1, n_elements(dimkeep)-1 do totkeep = totkeep * sz[dimkeep[i]+1]209 210 ;; this new array has two dimensions:211 ;; * the first, all elements that will be collapsed212 ;; * the second, all dimensions that will be preserved213 ;; (the ordering is so that all elements to be collapsed are214 ;; adjacent in memory)215 newarr = reform(newarr, [totcol, totkeep], /overwrite)216 end217 218 ;; Main function219 206 function cmapply, op, array, dimapply, double=dbl, type=type, $ 220 207 functargs=functargs, nocatch=nocatch -
trunk/SRC/Matrix/cmset_op.pro
r132 r133 1 1 ;+ 2 ; NAME: 3 ; CMSET_OP 4 ; 5 ; AUTHOR: 6 ; Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770 7 ; craigm@lheamail.gsfc.nasa.gov 8 ; 9 ; PURPOSE: 10 ; Performs an AND, OR, or XOR operation between two sets 11 ; 12 ; CALLING SEQUENCE: 13 ; SET = CMSET_OP(A, OP, B) 14 ; 15 ; DESCRIPTION: 16 ; 17 ; SET_OP performs three common operations between two sets. The 2 ; @hidden 3 ; 4 ; @todo seb 5 ;- 6 ; 7 ;; Simplified version of CMSET_OP_UNIQ which sorts, and takes the 8 ;; "first" value, whatever that may mean. 9 function cmset_op_uniq, a 10 ; 11 compile_opt idl2, strictarrsubs 12 ; 13 if n_elements(a) LE 1 then return, 0L 14 15 ii = sort(a) & b = a[ii] 16 wh = where(b NE shift(b, +1L), ct) 17 if ct GT 0 then return, ii[wh] 18 19 return, 0L 20 ; 21 end 22 ;+ 23 ; 24 ; @file_comments 25 ; Performs an AND, OR, or XOR operation between two sets 26 ; 27 ; Description: SET_OP performs three common operations between two sets. The 18 28 ; three supported functions of OP are: 19 29 ; … … 55 65 ; benefit. 56 66 ; 57 ; INPUTS:58 ; 59 ; A, B - the two sets to be operated on. A one dimensional array of67 ; @categories array 68 ; 69 ; @param A {in}{required} The two sets to be operated on. A one dimensional array of 60 70 ; either numeric or string type. A and B must be of the same 61 71 ; type. Empty sets are permitted, and are either represented 62 72 ; as an undefined variable, or by setting EMPTY1 or EMPTY2. 63 73 ; 64 ; OP - a string, the operation to be performed. Must be one of 74 ; @param B {in}{required} See A 75 ; 76 ; @param OP {in}{required} a string, the operation to be performed. Must be one of 65 77 ; 'AND', 'OR' or 'XOR' (lower or mixed case is permitted). 66 78 ; Other operations will cause an error message to be produced. 67 79 ; 68 ; KEYWORDS: 69 ; 70 ; NOT1, NOT2 - if set and OP is 'AND', then the complement of A (for 80 ; @keyword NOT1 If set and OP is 'AND', then the complement of A (for 71 81 ; NOT1) or B (for NOT2) will be used in the operation. 72 82 ; NOT1 and NOT2 cannot be set simultaneously. 73 83 ; 74 ; EMPTY1, EMPTY2 - if set, then A (for EMPTY1) or B (for EMPTY2) are 75 ; assumed to be the empty set. The actual values 76 ; passed as A or B are then ignored. 77 ; 78 ; INDEX - if set, then return a list of indices instead of the array 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 79 93 ; values themselves. The "slower" set operations are always 80 94 ; performed in this case. … … 85 99 ; from NA to NA+NB-1 refer to B[I-NA]. 86 100 ; 87 ; COUNT -upon return, the number of elements in the result set.101 ; @keyword COUNT upon return, the number of elements in the result set. 88 102 ; This is only important when the result set is the empty 89 103 ; set, in which case COUNT is set to zero. 90 104 ; 91 ; RETURNS: 92 ; 93 ; The resulting set as a one-dimensional array. The set may be 105 ; @returns The resulting set as a one-dimensional array. The set may be 94 106 ; represented by either an array of data values (default), or an 95 107 ; array of indices (if INDEX is set). Duplicate elements, if any, … … 104 116 ; SET_UTILS.PRO by RSI 105 117 ; 106 ; MODIFICATION HISTORY: 107 ; Written, CM, 23 Feb 2000 118 ; @history Written, CM, 23 Feb 2000 108 119 ; Added empty set capability, CM, 25 Feb 2000 109 120 ; Documentation clarification, CM 02 Mar 2000 … … 133 144 ; range of the input variable (thanks to Will Maddox), CM, 16 Jan 2006 134 145 ; 135 ; $Id: cmset_op.pro,v 1.6 2006/01/16 19:45:22 craigm Exp $ 136 ; 137 ;- 138 ; Copyright (C) 2000, 2004, 2005, 2006, Craig Markwardt 139 ; This software is provided as is without any warranty whatsoever. 140 ; Permission to use, copy, modify, and distribute modified or 141 ; unmodified copies is granted, provided this copyright and disclaimer 142 ; are included unchanged. 143 ;- 144 145 ;; Utility function, similar to UNIQ, but allowing choice of taking 146 ;; first or last unique element, or non-unique elements. 147 ;; Unfortunately this doesn't work because of implementation dependent 148 ;; versions of the SORT() function. 149 146 ; 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 152 ; first or last unique element, or non-unique elements. 153 ; Unfortunately this doesn't work because of implementation dependent 154 ; versions of the SORT() function. 155 ; 150 156 ; function cmset_op_uniq, a, first=first, non=non, count=ct, sort=sortit 151 157 ; if n_elements(a) LE 1 then return, 0L … … 168 174 ; end 169 175 170 ;; Simplified version of CMSET_OP_UNIQ which sorts, and takes the 171 ;; "first" value, whatever that may mean. 172 function cmset_op_uniq, a 173 ; 174 compile_opt idl2, strictarrsubs 175 ; 176 if n_elements(a) LE 1 then return, 0L 177 178 ii = sort(a) & b = a[ii] 179 wh = where(b NE shift(b, +1L), ct) 180 if ct GT 0 then return, ii[wh] 181 182 return, 0L 183 end 176 ; Simplified version of CMSET_OP_UNIQ which sorts, and takes the 177 ; "first" value, whatever that may mean. 178 ; 179 ;- 180 184 181 185 182 function cmset_op, a, op0, b, not1=not1, not2=not2, count=count, $ -
trunk/SRC/Matrix/congridseb.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:CONGRIDSEB 6 ; 7 ; PURPOSE:meme chose que congrid mais qui marche ... 8 ; cf par ex: 5 ; @file_comment 6 ; Like congrid but here, it works... 7 ; example: 9 8 ;IDL> print, congrid([[1,2,3,4],[5,6,7,8]],12,4) 10 9 ; 1 1 1 2 2 2 3 3 3 3 4 4 … … 23 22 ; 5 5 5 6 6 6 7 7 7 8 8 8 24 23 ; 25 ; CATEGORY:bidouille matrices24 ; @categories utilities 26 25 ; 27 ; CALLING SEQUENCE:res=congridseb(tableau,x[,y])26 ; @param tableau {in}{required} A table 1 ou 2d 28 27 ; 29 ; INPUTS:tableau:un tableau 1 ou 2d 30 ; x:dim en x du resultat doit etre un multiple de dim en x de tableau 31 ; y:dim en y du resultat doit etre un multiple de dim en y de tableau 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. 32 30 ; 33 ; KEYWORD PARAMETERS: 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. 34 33 ; 35 ; OUTPUTS:res un tableau de dim x * y34 ; @returns res a table dim x * y 36 35 ; 37 ; COMMON BLOCKS: 38 ; 39 ; SIDE EFFECTS: 40 ; 41 ; RESTRICTIONS: 42 ; 43 ; EXAMPLE: 44 ; 45 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 36 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 46 37 ; 20/3/98 47 38 ; 18/6/1999 supression d''une horrible boucle 39 ; 40 ; @version $Id$ 41 ; 48 42 ;- 49 43 ;------------------------------------------------------------ -
trunk/SRC/Matrix/different.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:different6 5 ; 7 ; PURPOSE:calcule les elements differents de 2 matrices D'ENTIERS POSITIFS 6 ; @file_comments 7 ; calculate the different elements of 2 matrix of positif whole numbers. 8 8 ; 9 ; CATEGORY:calcule sur les matrices9 ; @categories Calculation of matrixes 10 10 ; 11 ; CALLING SEQUENCE:res=different(a,b) 12 ; 13 ; INPUTS:a et b:arrays of positive integers, which need 11 ; @param a {in}{required} arrays of positive integers, which need 14 12 ; not be sorted. Duplicate elements are ignored, as they have no 15 13 ; effect on the result 16 14 ; 17 ; KEYWORD PARAMETERS:15 ; @param b {in}{required} see a 18 16 ; 19 ; OUTPUTS:tableau17 ; @returns tableau 20 18 ; 21 ; COMMON BLOCKS: 22 ; 23 ; SIDE EFFECTS: 24 ; 25 ; The empty set is denoted by an array with the first element equal to 19 ; @restrictions The empty set is denoted by an array with the first element equal to 26 20 ; -1. 27 21 ; 28 ; RESTRICTIONS: 29 ; 30 ; These functions will not be efficient on sparse sets with wide 22 ; @restrictions These functions will not be efficient on sparse sets with wide 31 23 ; ranges, as they trade memory for efficiency. The HISTOGRAM function 32 24 ; is used, which creates arrays of size equal to the range of the 33 25 ; resulting set. 34 26 ; 35 ; EXAMPLE:27 ; @examples 36 28 ; 37 29 ; a = [2,4,6,8] … … 39 31 ; different(a,b) = [ 4, 8] ; Elements in A but not in B 40 32 ; 41 ; MODIFICATION HISTORY:33 ; @history http://www.dfanning.com/tips/set_operations.html 42 34 ; 43 ; http://www.dfanning.com/tips/set_operations.html 35 ; @version $Id$ 36 ; 44 37 ;- 45 38 ;------------------------------------------------------------ -
trunk/SRC/Matrix/inter.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:inter6 5 ; 7 ; PURPOSE:calcule l''intersection de 2 matrices D'ENTIERS POSITIFS 6 ; @file_comments 7 ; calculate the intersection between 2 matrixes of whole numbers 8 8 ; 9 ; CATEGORY:calcule sur les matrices9 ; @categories calculation of matrixes 10 10 ; 11 ; CALLING SEQUENCE:res=inter(a,b) 12 ; 13 ; INPUTS:a et b:arrays of positive integers, which need not to be 11 ; @param a {in}{required} arrays of positive integers, which need not to be 14 12 ; sorted. Duplicate elements are ignored, as they have noeffect on the 15 13 ; result 16 14 ; 17 ; KEYWORD PARAMETERS:15 ; @param b {in}{required} see a 18 16 ; 19 ; OUTPUTS:tableau17 ; @returns tableau 20 18 ; 21 ; COMMON BLOCKS: 22 ; 23 ; SIDE EFFECTS: 24 ; 25 ; The empty set is denoted by an array with the first element equal to 19 ; @restrictions The empty set is denoted by an array with the first element equal to 26 20 ; -1. 27 21 ; 28 ; RESTRICTIONS: 29 ; 30 ; These functions will not be efficient on sparse sets with wide 22 ; @restrictions These functions will not be efficient on sparse sets with wide 31 23 ; ranges, as they trade memory for efficiency. The HISTOGRAM function 32 24 ; is used, which creates arrays of size equal to the range of the 33 25 ; resulting set. 34 26 ; 35 ; EXAMPLE: 27 ; @examples a = [2,4,6,8] 28 ; b = [6,1,3,2] 29 ; inter(a,b) = [ 2, 6] ; Common elements 36 30 ; 37 ; a = [2,4,6,8] 38 ; b = [6,1,3,2] 39 ; inter(a,b) = [ 2, 6] ; Common elements 31 ; @history http://www.dfanning.com/tips/set_operations.html 40 32 ; 41 ; MODIFICATION HISTORY:33 ; @version $Id$ 42 34 ; 43 ; http://www.dfanning.com/tips/set_operations.html44 35 ;- 45 36 ;------------------------------------------------------------ -
trunk/SRC/Matrix/make_selection.pro
r132 r133 1 ; $Id$2 ;-------------------------------------------------------------3 1 ;+ 4 ; NAME:5 ; MAKE_SELECTION (function)6 2 ; 7 ; PURPOSE:8 ; 3 ; file_comments 4 ; Convert an array of selected values to an index 9 5 ; array that identifies the selected values in a list 10 6 ; or data array. 11 7 ; 12 ; CATEGORY: 13 ; Tools 8 ; categories tools 9 ; 10 ; @param NAMES {in}{required} A list or array of values to choose from 14 11 ; 15 ; CALLING SEQUENCE: 16 ; index = MAKE_SELECTION(NAMES,SELNAMES [,keywords]) 12 ; @param SELNAMES {in}{required} A list of selected values 17 13 ; 18 ; INPUTS: 19 ; NAMES -> A list or array of values to choose from 20 ; 21 ; SELNAMES -> A list of selected values 22 ; 23 ; KEYWORD PARAMETERS: 24 ; ONLY_VALID -> Return only indices of found values. Values not 14 ; @keyword ONLY_VALID Return only indices of found values. Values not 25 15 ; found are skipped. Default is to return 1 index value for 26 16 ; each SELNAME, which is -1 if SELNAME is not contained in … … 29 19 ; at all. 30 20 ; 31 ; REQUIRED ->Normally, MAKE_SELECTION will return indices for21 ; @keyword REQUIRED Normally, MAKE_SELECTION will return indices for 32 22 ; all values that are found, simply ignoring the selected 33 23 ; values that are not in the NAMES array (although an error … … 35 25 ; -1 as soon as a selected value is not found. 36 26 ; 37 ; QUIET ->Suppress printing of the error message if a27 ; @keyword QUIET Suppress printing of the error message if a 38 28 ; selected value is not found (the error condition will 39 29 ; still be set). 40 30 ; 41 ; OUTPUTS: 42 ; A (long) array with indices to reference the selected values 31 ; @returns A (long) array with indices to reference the selected values 43 32 ; in the NAMES array. 44 33 ; 45 ; SUBROUTINES: 46 ; 47 ; REQUIREMENTS: 48 ; 49 ; NOTES: 50 ; If the NAMES array contains multiple entries of the same value, 34 ; @restrictions If the NAMES array contains multiple entries of the same value, 51 35 ; only the index to the first entry will be returned. 52 36 ; … … 55 39 ; (See example below) 56 40 ; 57 ; EXAMPLE: 58 ; names = [ 'Alfred','Anton','Peter','John','Mary'] 59 ; index = MAKE_SELECTION(names,['Peter','Mary']) 60 ; print,index 61 ; ; prints 2 4 41 ; @examples names = [ 'Alfred','Anton','Peter','John','Mary'] 42 ; index = MAKE_SELECTION(names,['Peter','Mary']) 43 ; print,index 44 ; ; prints 2 4 62 45 ; 63 ; vals = indgen(20)64 ; index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9])65 ; print,index66 ; ; prints 9 -1 8 7 7 8 946 ; vals = indgen(20) 47 ; index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9]) 48 ; print,index 49 ; ; prints 9 -1 8 7 7 8 9 67 50 ; 68 ; index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/ONLY_VALID)69 ; print,index70 ; ; prints 9 8 7 7 8 951 ; index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/ONLY_VALID) 52 ; print,index 53 ; ; prints 9 8 7 7 8 9 71 54 ; 72 ; index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/REQUIRED)73 ; print,index74 ; ; prints -155 ; index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/REQUIRED) 56 ; print,index 57 ; ; prints -1 75 58 ; 59 ; @history mgs, 28 Aug 1998: VERSION 1.00 60 ; mgs, 29 Aug 1998: - changed behaviour and added ONLY_VALID keyword 76 61 ; 77 ; MODIFICATION HISTORY: 78 ; mgs, 28 Aug 1998: VERSION 1.00 79 ; mgs, 29 Aug 1998: - changed behaviour and added ONLY_VALID keyword 62 ; @version $Id$ 80 63 ; 81 64 ;- -
trunk/SRC/Matrix/union.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:union6 5 ; 7 ; PURPOSE:calcule l''union de 2 matrices D'ENTIERS POSITIFS 6 ; @file_comments 7 ; calculate tne union between 2 matrixes of whole numbers 8 8 ; 9 ; CATEGORY:calcule sur les matrices9 ; @categories calculation of matrixes 10 10 ; 11 ; CALLING SEQUENCE:res=union(a,b) 12 ; 13 ; INPUTS:a et b:arrays of positive integers, which need 11 ; @param a {in}{required} arrays of positive integers, which need 14 12 ; not be sorted. Duplicate elements are ignored, as they have no 15 13 ; effect on the result 16 14 ; 17 ; KEYWORD PARAMETERS:15 ; @param b {in}{required} see a 18 16 ; 19 ; OUTPUTS:tableau17 ; @returns tableau 20 18 ; 21 ; COMMON BLOCKS: 22 ; 23 ; SIDE EFFECTS: 24 ; 25 ; The empty set is denoted by an array with the first element equal to 19 ; @restrictions The empty set is denoted by an array with the first element equal to 26 20 ; -1. 27 21 ; 28 ; RESTRICTIONS: 29 ; 30 ; These functions will not be efficient on sparse sets with wide 22 ; @restrictions These functions will not be efficient on sparse sets with wide 31 23 ; ranges, as they trade memory for efficiency. The HISTOGRAM function 32 24 ; is used, which creates arrays of size equal to the range of the 33 25 ; resulting set. 34 26 ; 35 ; EXAMPLE: 27 ; @examples a = [2,4,6,8] 28 ; b = [6,1,3,2] 29 ; union(a,b) = [ 1, 2, 3, 4, 6, 8] ; Elements in either set 36 30 ; 37 ; a = [2,4,6,8] 38 ; b = [6,1,3,2] 39 ; union(a,b) = [ 1, 2, 3, 4, 6, 8] ; Elements in either set 31 ; @history http://www.dfanning.com/tips/set_operations.html 40 32 ; 41 ; MODIFICATION HISTORY:33 ; @version $Id$ 42 34 ; 43 ; http://www.dfanning.com/tips/set_operations.html44 35 ;- 45 36 ;------------------------------------------------------------ -
trunk/SRC/Obsolete/extrait.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:extrait6 5 ; 7 ; PURPOSE:extraction de sous domaines de matrices. Meme si le sous8 ; domaine est "troue". cf. : l''exemple9 ; Par defaut IDL peut faire des extractions de sous domaines:6 ; @fie-comments 7 ; extractoin of subdomains of matrixes; Even if the subdomain is "pierced" (see the example) 8 ; By default, IDL can make extractions of subdomain: 10 9 ; 11 10 ; IDL> a=indgen(5,5) … … 24 23 ; 15 17 25 24 ; 20 22 26 ; mais25 ; but 27 26 ; IDL> print, a[[0,2],[3,4]] 28 27 ; 15 22 29 ; alors que28 ; while 30 29 ; IDL> print, extrait(a,[0,2],[3,4]) 31 30 ; 15 17 32 31 ; 20 22 33 32 ; 34 ; CATEGORY:bidouille avec les matrices35 33 ; 36 ; CALLING SEQUENCE:res=extrait(tab,indicex[,indicey[,indicez,[indicet]]])34 ; you better use extrac2 37 35 ; 38 ; INPUTS: 39 ; tab: un tableau 1,2,3 ou 4 d 36 ; @obsolete 40 37 ; 41 ; indicex: indicex peut avoir deux formes: 42 ; 1)un vecteur contenant les indices des lignes a garder 43 ; 2)le string '*' dans ce cas touts les lignes sont 44 ; gardees 38 ; @categories utilities 45 39 ; 46 ; indicey/z/t: la meme chose que indicex mais pour les 47 ; dimensions 2,3 et 4. 40 ; @param tab {in}{required} a 1,2,3 or 4 dim table 48 41 ; 49 ; rq: il faut autant de vecteurs indice que tab a de dimensions 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. 50 45 ; 51 ; KEYWORD PARAMETERS:46 ; @param indicey {in}{required} the same thing that indicex but for dim 2. 52 47 ; 53 ; OUTPUTS: 54 ; res: une matice 1,2,3 ou 4d extraite a partir de tab 48 ; @param indicez {in}{required} the same thing that indicex but for dim 3. 49 ; 50 ; @param indicet {in}{required} the same thing that indicex but for dim 4. 55 51 ; 56 ; COMMON BLOCKS:52 ; @returns a matrix 1,2,3 or 4d extract from tab 57 53 ; 58 ; SIDE EFFECTS:res=-1 en cas d''erreur54 ; @restrictions res=-1 in case of mistake 59 55 ; 60 ; RESTRICTIONS: 61 ; 62 ; EXAMPLE: 63 ; j''ai une matrice A de dim 2. je veux en extraire une petite matrice 64 ; 2d interscetion de la ligne 2,3 et 7 et de la colonne 0 et 1 56 ; 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: 65 59 ; 66 60 ; res=extrait(A,[2,3,7],[0,1]) 67 61 ; 68 ; autreex:62 ;other ex: 69 63 ; IDL> print, a 70 64 ; a b c … … 75 69 ; g i 76 70 ; 77 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)71 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 78 72 ; 12/1/1999 79 ; 29/4/1999: correction d''un bug et complement 80 ; de l''en-tete 73 ; 29/4/1999: correction of a bug and complement of the heading 74 ; 75 ; @version $Id$ 76 ; 81 77 ;- 82 78 ;------------------------------------------------------------ … … 88 84 compile_opt idl2, strictarrsubs 89 85 ; 90 taille = size(tab) 91 ;------------------------------------------------------------ 92 ; test du nombre de parametres 93 ; et de la nature de indice (pour LE cas 'x') 94 ;------------------------------------------------------------ 95 if n_params() NE taille[0]+1 THEN $ 96 return, report('il faut autant d''indices que de dimension du tableau') 97 IF n_params() GE 5 THEN BEGIN 98 if size(indicet,/type) EQ 7 then indicet = lindgen(taille[4]) $ 99 ELSE indicet = long(indicet) 100 nt = n_elements(indicet) 101 ENDIF 102 IF n_params() GE 4 THEN BEGIN 103 if size(indicez,/type) EQ 7 then indicez = lindgen(taille[3]) $ 104 ELSE indicez = long(indicez) 105 nz = n_elements(indicez) 106 ENDIF 107 IF n_params() GE 3 THEN BEGIN 108 if size(indicey,/type) EQ 7 then indicey = lindgen(taille[2]) $ 109 ELSE indicey = long(indicey) 110 ny = n_elements(indicey) 111 ENDIF 112 IF n_params() GE 2 THEN BEGIN 113 if size(indicex,/type) EQ 7 then indicex = lindgen(taille[1]) $ 114 ELSE indicex = long(indicex) 115 nx = n_elements(indicex) 116 ENDIF 117 118 ;------------------------------------------------------------ 119 ; construction du tableau d''indice et du resultat suivant la taille 120 ; de tab 121 ;------------------------------------------------------------ 122 case taille[0] of 123 1:res = tab[indicex] 124 2:BEGIN 125 indice = indicex#replicate(1, ny)+taille[1]*replicate(1, nx)#indicey 126 res = tab[indice] 127 END 128 3:BEGIN 129 indice = indicex#replicate(1, ny)+taille[1]*replicate(1, nx)#indicey 130 indice = temporary(indice[*])#replicate(1, nz) $ 131 +taille[1]*taille[2]*replicate(1, nx*ny)#indicez 132 res = tab[reform(indice, nx, ny, nz, /over)] 133 END 134 4:BEGIN 135 indice = indicex#replicate(1, ny)+taille[1]*replicate(1, nx)#indicey 136 indice = temporary(indice[*])#replicate(1, nz) $ 137 +taille[1]*taille[2]*replicate(1, nx*ny)#indicez 138 indice = temporary(indice[*])#replicate(1, nt) $ 139 +taille[1]*taille[2]*taille[3]*replicate(1, nx*ny*nz)#indicet 140 res = tab[reform(indice, nx, ny, nz, nz, /over)] 141 END 142 endcase 143 144 145 ;------------------------------------------------------------ 146 ;------------------------------------------------------------ 147 return, res 86 case n_params() of 87 0:return, extrac2() 88 1:return, extrac2(tab) 89 2:return, extrac2(tab, indicex) 90 3:return, extrac2(tab, indicex, indicey) 91 4:return, extrac2(tab, indicex, indicey, indicez) 92 5:return, extrac2(tab, indicex, indicey, indicez, indicet) 93 endcase 148 94 end -
trunk/SRC/Obsolete/zeroun.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:zeroun 5 ; @file_comments 6 ; Send back a vector or a matrix constituate of 0 and 1 in alternation 6 7 ; 7 ; PURPOSE:renvoie un vecteur ou une matrice constitue de o et de 1 en 8 ; alternance 8 ; you better use zero_one 9 9 ; 10 ; CATEGORY:function, matrices10 ; @obsolete 11 11 ; 12 ; CALLING SEQUENCE:resultat=zeroun(n1 [,n2])12 ; @categories function, matrixes 13 13 ; 14 ; INPUTS: 15 ; n1=nombre d'elements dans la premiere dimension 16 ; n2=nombre d'elements dans la deuxieme dimension 14 ; @param n1 {in}{required} number of elements in the first dimension 15 ; @param n2 {in}{required} numbre of elements in the second dimension 17 16 ; 18 ; KEYWORD PARAMETERS: 17 ; @returns resultat 18 ; 19 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 20 ; 1/12/98 19 21 ; 20 ; OUTPUTS:resultat22 ; @version $Id$ 21 23 ; 22 ; COMMON BLOCKS:23 ;24 ; SIDE EFFECTS:25 ;26 ; RESTRICTIONS:27 ;28 ; EXAMPLE:29 ;30 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)31 ; 1/12/9832 24 ;- 33 25 ;------------------------------------------------------------ … … 38 30 compile_opt idl2, strictarrsubs 39 31 ; 40 CASE N_PARAMS() OF 41 1:return, findgen(n1) mod 2 42 2:BEGIN 43 if fix(n1/2) EQ n1/2. then BEGIN ;nombre pair de colonnes 44 res = findgen(n1+1,n2) mod 2 45 return, res[0:n1-1, *] 46 ENDIF ELSE return, findgen(n1,n2) mod 2 ;nombre impair de colonnes 47 END 48 else: return, report('Mauvais nombre de parametre dans l''appel de ZEROUN') 49 endcase 32 case n_params() of 33 0:return, zero_one() 34 1:return, zero_one(n1) 35 2:return, zero_one(n1, n2) 36 endcase 37 50 38 end -
trunk/SRC/Picture/image_viewer.pro
r132 r133 1 1 ;+ 2 ; NAME: 3 ; IMAGE_VIEWER 4 ; 5 ; PURPOSE: 6 ; The purpose of this program is to provide an interactive tool that can be used 7 ; to view JPEG, BMP, GIF, PNG, and TIFF picture files. Images are loaded into 8 ; memory, so the initial file access may take a while, but once each picture has 9 ; been opened they can all be viewed in a very rapid fashion. 10 ; 11 ; CATEGORY: 12 ; Visualization, Widgets 13 ; 14 ; CALLING SEQUENCE: 15 ; image_viewer 16 ; 17 ; INPUT PARAMETERS: 18 ; None. 19 ; 20 ; KEYWORD PARAMETERS: 21 ; None. 22 ; 23 ; OUTPUTS: 24 ; None. 25 ; 26 ; COMMON BLOCKS: 27 ; None. 28 ; 29 ; SIDE EFFECTS: 30 ; While this program is running in an IDL session it will change the current 2 ; 3 ; @file_comments 4 ; The purpose of this program is to provide an interactive tool that can be used 5 ; to view JPEG, BMP, GIF, PNG, and TIFF picture files. Images are loaded into 6 ; memory, so the initial file access may take a while, but once each picture has 7 ; been opened they can all be viewed in a very rapid fashion. 8 ; 9 ; @categories Visualization, Widgets 10 ; 11 ; @param event {in}{required} 12 ; 13 ; @restrictions While this program is running in an IDL session it will change the current 31 14 ; working directory, enables/disables color decomposition, and sets !QUIET=1, 32 15 ; !ORDER=0, & !P.BACKGROUND=0. These settings are returned to their initial 33 16 ; settings before the program was initiated once it is terminated. 34 17 ; 35 ; RESTRICTIONS: 36 ; This program is supported in IDL version 5.5 and newer. In order to open 18 ; @restrictions This program is supported in IDL version 5.5 and newer. In order to open 37 19 ; GIF files or TIFF files with LZW compression the copy of IDL being used must 38 20 ; be licensed with these features. IDL only supports BMP files in the standard 39 21 ; Windows format and does not support OS2 bitmaps. 40 22 ; 41 ; MODIFICATION HISTORY:42 ; Written by: AEB, 1/02.43 ; -44 45 46 ;********************************************************************************************* 23 ; @history Written by: AEB, 1/02. 24 ; 25 ; @version $Id$ 26 ;********************************************************************************************* 27 ;_ 28 47 29 PRO IMAGE_VIEWER_OPEN_FILES,event 48 30 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open Picture Files" FROM THE MAIN MENU … … 126 108 127 109 ;********************************************************************************************* 110 ;+ 111 ; @param event {in}{required} 112 ;- 128 113 PRO IMAGE_VIEWER_OPEN_FOLDER,event 129 114 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open All In Folder" FROM THE MAIN MENU … … 208 193 209 194 ;********************************************************************************************* 195 ;+ 196 ; @param event {in}{required} 197 ;- 210 198 PRO IMAGE_VIEWER_CANCEL,event 211 199 ;obtain state structure for top-level-base from its UVALUE: … … 221 209 222 210 ;********************************************************************************************* 211 ;+ 212 ; @param event {in}{required} 213 ;- 223 214 PRO IMAGE_VIEWER_TIMER,event 224 215 ;obtain state structure for top-level-base from its UVALUE: … … 893 884 894 885 ;********************************************************************************************* 886 ;+ 887 ; @param event {in}{required} 888 ;- 895 889 PRO IMAGE_VIEWER_EXIT,event 896 890 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Exit" FROM THE MAIN MENU … … 905 899 906 900 ;********************************************************************************************* 901 ;+ 902 ; @param event {in}{required} 903 ;- 907 904 PRO IMAGE_VIEWER_HELP,event 908 905 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "Help > Help on IMAGE_VIEWER" … … 924 921 925 922 ;********************************************************************************************* 923 ;+ 924 ; @param event {in}{required} 925 ;- 926 926 PRO IMAGE_VIEWER_THUMBS,event 927 927 ;THIS PROCEDURE IS CALLED WHEN A USER CLICKS ON ONE OF THE THUMBNAIL PICTURES … … 971 971 972 972 ;********************************************************************************************* 973 ;+ 974 ; @param widjetID {in}{required} 975 ;- 973 976 PRO IMAGE_VIEWER_CLEANUP,widgetID 974 977 ;THIS PROCEDURE IS CALLED WHEN THE PROGRAM IS TERMINATED AND XMANAGER REGISTERS A CLEANUP: … … 999 1002 1000 1003 ;********************************************************************************************* 1004 ;+ 1005 ; @param event {in}{required} 1006 ;- 1001 1007 PRO IMAGE_VIEWER_EVENT,event 1002 1008 ;THIS PROCEDURE IS CALLED WHEN A USER RESIZES THE TOP-LEVEL BASE -
trunk/SRC/Picture/imdisp.pro
r132 r133 1 1 ;------------------------------------------------------------------------------- 2 ;+ 3 ; @hidden 4 ;- 2 5 FUNCTION IMDISP_GETPOS, ASPECT, POSITION=POSITION, MARGIN=MARGIN 3 6 ; … … 47 50 END 48 51 ;------------------------------------------------------------------------------- 52 ;+ 53 ; @hidden 54 ;- 49 55 FUNCTION IMDISP_IMSCALE, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 50 56 NEGATIVE=NEGATIVE … … 78 84 END 79 85 ;------------------------------------------------------------------------------- 86 ;+ 87 ; @hidden 88 ;- 80 89 FUNCTION IMDISP_IMREGRID, DATA, NX, NY, INTERP=INTERP 81 90 ; … … 119 128 END 120 129 ;------------------------------------------------------------------------------- 130 ;+ 131 ; @hidden 132 ;- 121 133 PRO IMDISP_IMSIZE, IMAGE, X0, Y0, XSIZE, YSIZE, ASPECT=ASPECT, $ 122 134 POSITION=POSITION, MARGIN=MARGIN … … 176 188 177 189 END 178 ;------------------------------------------------------------------------------- 179 PRO IMDISP, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 180 MARGIN=MARGIN, INTERP=INTERP, DITHER=DITHER, ASPECT=ASPECT, $ 181 POSITION=POSITION, OUT_POS=OUT_POS, NOSCALE=NOSCALE, NORESIZE=NORESIZE, $ 182 ORDER=ORDER, USEPOS=USEPOS, CHANNEL=CHANNEL, $ 183 BACKGROUND=BACKGROUND, ERASE=ERASE, $ 184 AXIS=AXIS, NEGATIVE=NEGATIVE, _EXTRA=EXTRA_KEYWORDS 185 ; 186 compile_opt idl2, strictarrsubs 187 ; 188 190 ;******************************************************************************* 189 191 ;+ 190 ; NAME: 191 ; IMDISP 192 ; 193 ; PURPOSE: 192 ; 193 ; @file_comments 194 194 ; Display an image on the current graphics device. 195 195 ; IMDISP is an advanced replacement for TV and TVSCL. … … 214 214 ; - Photographic negative images can be displayed via the NEGATIVE keyword. 215 215 ; 216 ; CATEGORY: 217 ; Image display 218 ; 219 ; CALLING SEQUENCE: 220 ; IMDISP, IMAGE 221 ; 222 ; INPUTS: 223 ; IMAGE Array containing image data. 216 ; @categories Image display 217 ; 218 ; @param IMAGE {in}{required} Array containing image data. 224 219 ; Pseudo (indexed) color images must have 2 dimensions. 225 220 ; True color images must have 3 dimensions, in either 226 221 ; [3, NX, NY], [NX, 3, NY], or [NX, NY, 3] form. 227 222 ; 228 ; OPTIONAL INPUTS: 229 ; None. 230 ; 231 ; KEYWORD PARAMETERS: 232 ; RANGE For Pseudo Color images only, a vector with two elements 223 ; @keyword RANGE For Pseudo Color images only, a vector with two elements 233 224 ; specifying the minimum and maximum values of the image 234 225 ; array to be considered when the image is byte-scaled … … 237 228 ; or if the NOSCALE keyword is set. 238 229 ; 239 ; BOTTOMBottom value in the color table to be used230 ; @keyword BOTTOM Bottom value in the color table to be used 240 231 ; for the byte-scaled image 241 232 ; (default is 0). 242 233 ; This keyword is ignored if the NOSCALE keyword is set. 243 234 ; 244 ; NCOLORSNumber of colors in the color table to be used235 ; @keyword NCOLORS Number of colors in the color table to be used 245 236 ; for the byte-scaled image 246 237 ; (default is !D.TABLE_SIZE - BOTTOM). 247 238 ; This keyword is ignored if the NOSCALE keyword is set. 248 239 ; 249 ; MARGINA scalar value specifying the margin to be maintained240 ; @keyword MARGIN A scalar value specifying the margin to be maintained 250 241 ; around the image in normal coordinates 251 242 ; (default is 0.1, or 0.025 if !P.MULTI is set to display 252 243 ; multiple images). 253 244 ; 254 ; INTERPIf set, the resized image will be interpolated using245 ; @keyword INTERP If set, the resized image will be interpolated using 255 246 ; bilinear interpolation 256 247 ; (default is nearest neighbor sampling). 257 248 ; 258 ; DITHERIf set, true color images will be dithered when displayed249 ; @keyword DITHER If set, true color images will be dithered when displayed 259 250 ; on an 8-bit graphics device 260 251 ; (default is no dithering). 261 252 ; 262 ; ASPECTA scalar value specifying the aspect ratio (height/width)253 ; @keyword ASPECT A scalar value specifying the aspect ratio (height/width) 263 254 ; for the displayed image 264 255 ; (default is to maintain native aspect ratio). 265 256 ; 266 ; POSITIONOn input, a 4-element vector specifying the position257 ; @keyword POSITION On input, a 4-element vector specifying the position 267 258 ; of the displayed image in the form [X0,Y0,X1,Y1] in 268 259 ; in normal coordinates … … 271 262 ; offset and size are known (e.g. MAP_IMAGE output). 272 263 ; 273 ; OUT_POSOn output, a 4-element vector specifying the position264 ; @keyword OUT_POS On output, a 4-element vector specifying the position 274 265 ; actually used to display the image. 275 266 ; 276 ; NOSCALEIf set, the image will not be byte-scaled267 ; @keyword NOSCALE If set, the image will not be byte-scaled 277 268 ; (default is to byte-scale the image). 278 269 ; 279 ; NORESIZEIf set, the image will not be resized.270 ; @keyword NORESIZE If set, the image will not be resized. 280 271 ; (default is to resize the image to fit the display). 281 272 ; 282 ; ORDERIf set, the image is displayed from the top down273 ; @keyword ORDER If set, the image is displayed from the top down 283 274 ; (default is to display the image from the bottom up). 284 275 ; Note that the system variable !ORDER is always ignored. 285 276 ; 286 ; USEPOSIf set, the image will be sized to exactly fit a supplied277 ; @keyword USEPOS If set, the image will be sized to exactly fit a supplied 287 278 ; POSITION vector, over-riding ASPECT and MARGIN 288 279 ; (default is to honor ASPECT and MARGIN when a POSITION 289 280 ; vector is supplied). 290 281 ; 291 ; CHANNELDisplay channel (Red, Green, or Blue) to be written.282 ; @keyword CHANNEL Display channel (Red, Green, or Blue) to be written. 292 283 ; 0 => All channels (the default) 293 284 ; 1 => Red channel … … 299 290 ; images can be displayed on any device supported by IMDISP. 300 291 ; 301 ; BACKGROUNDIf set to a positive integer, the background will be filled292 ; @keyword BACKGROUND If set to a positive integer, the background will be filled 302 293 ; with the color defined by BACKGROUND. 303 294 ; 304 ; ERASEIf set, the screen contents will be erased. Note that if295 ; @keyword ERASE If set, the screen contents will be erased. Note that if 305 296 ; !P.MULTI is set to display multiple images, the screen is 306 297 ; always erased when the first image is displayed. 307 298 ; 308 ; AXISIf set, plot axes will be drawn on the image. The default299 ; @keyword AXIS If set, plot axes will be drawn on the image. The default 309 300 ; x and y axis ranges are determined by the size of the image. 310 301 ; When the AXIS keyword is set, IMDISP accepts any keywords 311 302 ; supported by PLOT (e.g. TITLE, COLOR, CHARSIZE etc.). 312 303 ; 313 ; NEGATIVEIf set, a photographic negative of the image is displayed.304 ; @keyword NEGATIVE If set, a photographic negative of the image is displayed. 314 305 ; The values of BOTTOM and NCOLORS are honored. This keyword 315 306 ; allows True color images scanned from color negatives to be … … 318 309 ; is ignored if the NOSCALE keyword is set. 319 310 ; 320 ; OUTPUTS: 321 ; None. 322 ; 323 ; OPTIONAL OUTPUTS: 324 ; None 325 ; 326 ; COMMON BLOCKS: 327 ; None 328 ; 329 ; SIDE EFFECTS: 330 ; The image is displayed on the current graphics device. 331 ; 332 ; RESTRICTIONS: 333 ; Requires IDL 5.0 or higher (square bracket array syntax). 334 ; 335 ; EXAMPLE: 311 ; @restrictions The image is displayed on the current graphics device. 312 ; 313 ; @restrictions Requires IDL 5.0 or higher (square bracket array syntax). 314 ; 315 ; @examples 336 316 ; 337 317 ;;- Load test data … … 472 452 ;map_grid 473 453 ; 474 ; MODIFICATION HISTORY: 475 ; Liam.Gumley@ssec.wisc.edu 454 ; @history Liam.Gumley@ssec.wisc.edu 476 455 ; http://cimss.ssec.wisc.edu/~gumley 477 ; $Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $478 456 ; 479 457 ; Copyright (C) 1999, 2000 Liam E. Gumley … … 492 470 ; along with this program; if not, write to the Free Software 493 471 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 472 ; 473 ; @version $Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $ 474 ; 494 475 ;- 476 ;------------------------------------------------------------------------------- 477 PRO IMDISP, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 478 MARGIN=MARGIN, INTERP=INTERP, DITHER=DITHER, ASPECT=ASPECT, $ 479 POSITION=POSITION, OUT_POS=OUT_POS, NOSCALE=NOSCALE, NORESIZE=NORESIZE, $ 480 ORDER=ORDER, USEPOS=USEPOS, CHANNEL=CHANNEL, $ 481 BACKGROUND=BACKGROUND, ERASE=ERASE, $ 482 AXIS=AXIS, NEGATIVE=NEGATIVE, _EXTRA=EXTRA_KEYWORDS 483 ; 484 compile_opt idl2, strictarrsubs 485 ; 495 486 496 487 rcs_id = '$Id: imdisp.pro,v 1.47 2002/06/05 16:31:07 gumley Exp $' -
trunk/SRC/Picture/saveimage.pro
r132 r133 1 PRO SAVEIMAGE, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, $2 QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE = multiple3 ;4 compile_opt idl2, strictarrsubs5 ;6 7 1 ;+ 8 ; NAME: 9 ; SAVEIMAGE 10 ; 11 ; PURPOSE: 12 ; Save the current graphics window to an output file (GIF by default). 2 ; 3 ; @file_comments 4 ; Save the current graphics window to an output file (GIF by default). 13 5 ; 14 6 ; The output formats supported are: … … 23 15 ; 8-bit or 24-bit output files are done automatically. 24 16 ; 25 ; CATEGORY: 26 ; Input/Output. 27 ; 28 ; CALLING SEQUENCE: 29 ; SAVEIMAGE, FILE 30 ; 31 ; INPUTS: 32 ; FILE Name of the output file (GIF format by default). 33 ; 34 ; OPTIONAL INPUTS: 35 ; None. 36 ; 37 ; KEYWORD PARAMETERS: 38 ; BMP Set this keyword to create BMP format (8-bit with color table). 39 ; PNG Set this keyword to create PNG format (8-bit with color table). 40 ; PICT Set this keyword to create PICT format (8-bit with color table). 41 ; JPEG Set this keyword to create JPEG format (24-bit true color). 42 ; TIFF Set this keyword to create TIFF format (24-bit true color). 43 ; QUALITY If set to a named variable, specifies the quality for 17 ; @categories Input/Output. 18 ; 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 44 32 ; JPEG output (default 75). Ranges from 0 ("terrible") to 45 33 ; 100 ("excellent"). Smaller quality values yield higher 46 34 ; compression ratios and smaller output files. 47 ; DITHER If set, dither the output image when creating 8-bit output 35 ; 36 ;@keyword DITHER If set, dither the output image when creating 8-bit output 48 37 ; which is read from a 24-bit display (default is no dithering). 49 ; CUBE If set, use the color cube method to quantize colors when 38 ; 39 ; @keyword CUBE If set, use the color cube method to quantize colors when 50 40 ; creating 8-bit output which is read from a 24-bit display 51 41 ; (default is to use the statistical method). This may improve 52 42 ; the accuracy of colors in the output image, especially white. 53 ; 43 ; @keyword QUIET Set this keyword to suppress the information message 54 44 ; (default is to print an information message). 55 ; MULTIPLE to write multiple gif image 56 ; 57 ; OUTPUTS: 58 ; None. 59 ; 60 ; OPTIONAL OUTPUTS: 61 ; None 62 ; 63 ; COMMON BLOCKS: 64 ; None 65 ; 66 ; SIDE EFFECTS: 67 ; The output file is overwritten if it exists. 68 ; 69 ; RESTRICTIONS: 70 ; Requires IDL 5.0 or higher (square bracket array syntax). 71 ; 72 ; EXAMPLE: 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). 51 ; 52 ; @examples 73 53 ; 74 54 ;openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun … … 80 60 ;saveimage, 'hurric.gif' 81 61 ; 82 ; MODIFICATION HISTORY: 83 ; Liam.Gumley@ssec.wisc.edu 62 ; @history Liam.Gumley@ssec.wisc.edu 84 63 ; http://cimss.ssec.wisc.edu/~gumley 85 ; $Id$86 ;87 ; Copyright (C) 1999 Liam E. Gumley88 64 ; 89 65 ; This program is free software; you can redistribute it and/or … … 100 76 ; along with this program; if not, write to the Free Software 101 77 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 78 ; 79 ; @version $Id$ 80 ; 102 81 ;- 82 PRO SAVEIMAGE, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, $ 83 QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE = multiple 84 ; 85 compile_opt idl2, strictarrsubs 86 ; 103 87 104 88 rcs_id = '$Id$' -
trunk/SRC/Picture/showimage.pro
r132 r133 1 PRO SHOWIMAGE, FILE, DITHER=DITHER, CURRENT=CURRENT2 ;3 compile_opt idl2, strictarrsubs4 ;5 6 1 ;+ 7 ; NAME: 8 ; SHOWIMAGE 9 ; 10 ; PURPOSE: 11 ; Show the contents of a graphics file in the current window. 2 ; 3 ; @file_comments 4 ; Show the contents of a graphics file in the current window. 12 5 ; 13 6 ; The input formats supported are: … … 21 14 ; to 8-bit or 24-bit images on-screen are done automatically. 22 15 ; 23 ; CATEGORY: 24 ; Input/Output. 25 ; 26 ; CALLING SEQUENCE: 27 ; SHOWIMAGE, FILE 28 ; 29 ; INPUTS: 30 ; FILE Name of the output file (format is identified automatically). 31 ; 32 ; OPTIONAL INPUTS: 33 ; None. 34 ; 35 ; KEYWORD PARAMETERS: 36 ; DITHER Set this keyword to dither the input image when displaying 16 ; @categories Input/Output. 17 ; 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 37 21 ; 24-bit images on an 8-bit display (default is no dithering). 38 ; CURRENTSet this keyword to display the image in the current window22 ; @keyword CURRENT Set this keyword to display the image in the current window 39 23 ; (default is to create a new window sized to fit the image). 40 24 ; 41 ; OUTPUTS: 42 ; None. 43 ; 44 ; OPTIONAL OUTPUTS: 45 ; None 46 ; 47 ; COMMON BLOCKS: 48 ; None 49 ; 50 ; SIDE EFFECTS: 51 ; The color table is modified. 52 ; 53 ; RESTRICTIONS: 54 ; Requires IDL 5.2 or higher (image QUERY functions). 55 ; 56 ; EXAMPLE: 57 ; 58 ;showimage, filepath('rose.jpg', subdir='examples/data') 59 ; 60 ; MODIFICATION HISTORY: 61 ; Liam.Gumley@ssec.wisc.edu 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 62 32 ; http://cimss.ssec.wisc.edu/~gumley 63 ; $Id$64 ;65 ; Copyright (C) 1999 Liam E. Gumley66 33 ; 67 34 ; This program is free software; you can redistribute it and/or … … 78 45 ; along with this program; if not, write to the Free Software 79 46 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 47 ; 48 ; @version $Id$ 49 ; 80 50 ;- 81 51 PRO SHOWIMAGE, FILE, DITHER=DITHER, CURRENT=CURRENT 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 82 55 rcs_id = '$Id$' 83 56 -
trunk/SRC/ToBeReviewed/CALENDRIER/def_month.pro
r114 r133 1 ;+ 2 ; @todo seb 3 ;- 1 4 FUNCTION def_month, timave, date 2 5 ; -
trunk/SRC/ToBeReviewed/COULEURS/palit.pro
r114 r133 1 1 ;+ 2 ; Eclaircit la palette courante en jouant sur la luminosite 2 ; @file_comments 3 ; Clarify the current palette playing with brightness 3 4 ; 4 ; coef = regle l'attenuation des couleurs 5 ; par defaut divise par 2 la luminosite 5 ; @param coef {in}{required} The rule of attenuation of colors divide by 2 the brightness by default 6 6 ; 7 ; coef = 0.1 pour la QMS papier de l'IPSL convient tres bien 7 ; @param red 8 ; 9 ; @param green 10 ; 11 ; @param blue 12 ; 13 ; @todo Seb: compléter param red/green/blue 8 14 ;- 9 15 PRO palit, coef, red, green, blue … … 16 22 l = 1.-coef*(1.-l) 17 23 ; 18 ; Le noir doit rester bien noir!19 ; toutes mes palettes commencent par du noir et finissent par du blanc24 ; Black must stay really black! 25 ; Each palette starts by Black and ends by white 20 26 ; 21 27 l[0] = 0. -
trunk/SRC/ToBeReviewed/IMAGE/animgif.pro
r114 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:animgif6 5 ; 7 ; PURPOSE:construire une animation gif 6 ; @file_comments 7 ; Build a gif animation 8 8 ; 9 ; CATEGORY:pour faire des dessins animes9 ; @categories Animated drawings. 10 10 ; 11 ; CALLING SEQUENCE:animgif, 'toto.gif' 11 ; @param toto.gif {in}{required} It is the name of the gif file containing the animation. 12 ; Comment: this file is placed in the directory defined by iodir. 12 13 ; 13 ; INPUTS:toto.gif: c''est le nom du fichier gif contenant 14 ; l''animation. Rq ce fichier est place dans le repertoire definit par 15 ; iodir. 14 ; @uses common.pro 16 15 ; 17 ; KEYWORD PARAMETERS: 18 ; 19 ; OUTPUTS: 20 ; 21 ; COMMON BLOCKS: 22 ; common.pro 23 ; 24 ; SIDE EFFECTS:on utilise le Z buffer pour aller plus vite!. 25 ; donc si on plante ds animgif il faut faire: 16 ; @restrictions We use the Z buffer to go faster!. 17 ; So, if it failed in animgif, you have to do: 26 18 ; IDL> device, /close 27 19 ; IDL> set_plot, 'x' 28 20 ; IDL> retall 29 21 ; 30 ; RESTRICTIONS: si on veut supprimer le @common,31 ; il faut definir a la main la taille de l''image (les32 ; variables xsize et ysize) ainsi queiodir.22 ; @restrictions If we want to delete the @common, 23 ; we have to define manually the picture's size 24 ; (variables xsize and ysize) just as iodir. 33 25 ; 34 ; EXAMPLE: 26 ; @history Guillaume Roullet (grlod@ipsl.jussieu.fr) 27 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 28 ; 30/4/1999 35 29 ; 36 ; MODIFICATION HISTORY: Guillaume Roullet (grlod@ipsl.jussieu.fr) 37 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 38 ; 30/4/1999 30 ; @version $Id$ 31 ; 39 32 ;- 40 33 ;------------------------------------------------------------ … … 47 40 @common 48 41 ; 49 ; recupere la palette de couleur et la place dans rouge, vert, bleu42 ; It recuperates the color palette and put it in red, green, blue. 50 43 ; 51 44 tvlct, rouge,vert,bleu,/get 52 45 ; 53 ; complete la palette courante sur 256 couleurs46 ; It completes the current palette on 256 colors. 54 47 ; 55 48 red = [rouge, replicate(255, 256-n_elements(rouge))] … … 57 50 blue = [bleu, replicate(255, 256-n_elements(rouge))] 58 51 ; 59 ; bascule sur le z device, permettant de creer l''image sans 60 ; l''afficher 52 ; It rocks on the z device, allowing to create the picture without display it. 61 53 thisOS = !VERSION.OS_FAMILY 62 54 thisOS = STRMID(thisOS, 0, 3) 63 55 thisOS = STRUPCASE(thisOS) 64 56 set_plot, 'z' 65 ; taille de l''image (en nombre de pixel:57 ; size of the picture (in pixel): 66 58 xsize = 30*(min(page_size, max = ma)*key_portrait + ma*(1-key_portrait)) 67 59 ysize = 30*(min(page_size, max = ma)*(1-key_portrait) + ma*key_portrait) 68 60 device, set_resolution = [xsize, ysize] 69 61 ; 70 ; commencement du fichier gif. ecriture d''une image vide62 ; Beginning of the gif file. Writing of an empty picture. 71 63 ; 72 64 reinitplt … … 76 68 ; 77 69 ;---------------------------------------------------------------- 78 ; debut de la partie a changer70 ; Beggining of the part we want to change. 79 71 ;---------------------------------------------------------------- 80 72 ; 81 ; boucle de creation de l''image73 ; Loop of picture's creation. 82 74 ; 83 75 calen = TIMEGEN(366, START=JULDAY(1,1,2000)) … … 107 99 ; plt, norme(nlec('unsurf', date, 'RE3'), nlec('vnsurf', date, 'RE3')), 0, 1.2, int = .1, /noerase 108 100 ; 109 ; Ecriture de l''image dans le fichier .gif101 ; Writing of the picture in the file .gif. 110 102 ; 111 103 write_gif,iodir+nomfic,tvrd(),red, green, blue, /multiple 112 104 ENDFOR 113 105 ;---------------------------------------------------------------- 114 ; fin de la partie a changer106 ; End of the part we want to change. 115 107 ;---------------------------------------------------------------- 116 108 ; 117 ; fermeture du fichier109 ; Closing of the file. 118 110 write_gif,iodir+nomfic,/close 119 ; rebascule en mode terminal X120 device, /close111 ; Rerock on terminal X mode. 112 ; device, /close 121 113 CASE thisOS of 122 114 'MAC': SET_PLOT, thisOS -
trunk/SRC/ToBeReviewed/MATRICE/colle.pro
r114 r133 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; NAME:colle 2 ; @file_comments 3 ; This concatenation function exist in IDL so long 4 ;as we do not try to stick with a dimension superior or equal at 4. 6 5 ; 7 ; PURPOSE: Cette fonction de concatenation existe ds IDL (avec [] cf 8 ; ds le programme ds le case pour direc egale 1,2,3) tant que l''on ne 9 ; cherche pas a coller suivant une dimensionsuperieure ou egale a 4. 6 ; @categories utilities 10 7 ; 11 ; CATEGORY:bidouillage de matrice8 ; @param a0 {in}{required} 12 9 ; 13 ; CALLING SEQUENCE:res=colle(bableau_de_pointeur,direc) ou bien 14 ; res=colle(tab1,tab2,tab3,tab4,.....,direc) 10 ; @param a1 {in}{required} 15 11 ; 16 ; INPUTS: 17 ; 18 ; CAS 1: 19 ; tableau_de_pointeur:comme son nom l''indique c'est un tableau 20 ; de pointeur, dont chaque elements pointe sur tableau a coller 12 ; @param a2 {in}{required} 21 13 ; 22 ; par ex ds un programme, on veut coller n tableaux entre eux 14 ; @param a3 {in}{required} 15 ; 16 ; @param a4 {in}{required} 17 ; 18 ; @param a5 {in}{required} 19 ; 20 ; @param a6 {in}{required} 21 ; 22 ; @param a7 {in}{required} 23 ; 24 ; @param a8 {in}{required} 25 ; 26 ; @param a9 {in}{required} 27 ; 28 ; @param a10 {in}{required} 29 ; 30 ; @param a11 {in}{required} 31 ; 32 ; @param a12 {in}{required} 33 ; 34 ; @param a13 {in}{required} 35 ; 36 ; @param a14 {in}{required} 37 ; 38 ; @param a15 {in}{required} 39 ; 40 ; @param a16 {in}{required} 41 ; 42 ; @param a17 {in}{required} 43 ; 44 ; @param a18 {in}{required} 45 ; 46 ; @param a19 {in}{required} 47 ; 48 ; @param a20 {in}{required} 49 ; 50 ; @param CAS 1 {in}{required} 51 ; table_of_pointer: It is a table of pointers, where each 52 ; element point on a table to stick 53 ; 54 ; For exemple, in a program, we want to stick n table ones with others. 23 55 ; 24 56 ; tab=ptrarr(n,/allocate_heap) … … 28 60 ; res=colle(tab,1) 29 61 ; 30 ; CAS 2:31 ; on donne directement les tableaux a coller32 ; rq: ds ce cas on peut au plus donner 20 tableaux en entree.62 ; @param CAS 2 {in}{required} 63 ; we directly give tables to stick 64 ; Comment: In this case, the plus we can give is 20 tables. 33 65 ; 34 ; ATTENTION : sans le mot cle /SAUVE les arguments en entree 35 ; sont detruits lorsque l''on construit res. ds le cas 1 on 36 ; detruit le tableau de pointeurs et les variables sur 37 ; lesquelles on pointe. 66 ; BEWARE: whitout the keyword /SAUVE entry arguments are 67 ; delete when, we build res. In the first case,we 68 ; delete the table of pointers and variables on which we point. 38 69 ; 39 ; direc: la direction suivant laquelle les coller, 1,2,3...70 ; @param direc {in}{required} The direction on which stick them, 1,2,3... 40 71 ; 41 ; KEYWORD PARAMETERS: 42 ; 43 ; /SAUVE: mot cle qui force a sauvegarder le tableau de 72 ; @keyword SAUVE mot cle qui force a sauvegarder le tableau de 44 73 ; pointeur et les tableaux a coller. 45 74 ; 46 ; OUTPUTS:res=matrice resultat75 ; @returns res=matrice resultat 47 76 ; 48 ; RESTRICTIONS: 49 ; 50 ; EXAMPLE: 51 ; 52 ; IDL> print, colle(replicate(1,2,2,2),indgen(2,2,2),2) 77 ; @examples IDL> print, colle(replicate(1,2,2,2),indgen(2,2,2),2) 53 78 ; 1 1 54 79 ; 1 1 … … 61 86 ; 6 7 62 87 ; 63 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)88 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 64 89 ; 13/1/98 90 ; 91 ; @version $Id$ 92 ; 65 93 ;- 66 ;------------------------------------------------------------67 ;------------------------------------------------------------68 ;------------------------------------------------------------69 ; pour suprimer une variable.70 ;------------------------------------------------------------71 PRO UNDEFINE, varname72 ;73 compile_opt idl2, strictarrsubs74 ;75 tempvar = SIZE(TEMPORARY(varname))76 END77 ;------------------------------------------------------------78 ;------------------------------------------------------------79 94 FUNCTION colle, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, SAUVE = sauve 80 95 ; -
trunk/SRC/ToBeReviewed/UTILITAIRE/get_extra.pro
r114 r133 1 ;+ 2 ; @todo seb 3 ;- 4 ; 1 5 ; elle fait quoi ? 2 6 -
trunk/SRC/ToBeReviewed/UTILITAIRE/oups.pro
r11 r133 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; NAME:oups6 2 ; 7 ; PURPOSE: Sorte de UNDO:8 ; permet de refaire toute la serie de dessin depuis9 ; l''ouverture de la derniere fenetre sans reexecuter la derniere10 ; commande. cf. je fais un dessin avec 10 plt dessus au 10 eme je me11 ; plante, un coup de @oups et je peux refaire mon plt rate!3 ; @file_comments 4 ; Kind of UNDO: 5 ; Allows to redo all the chain of drawing since the opening of the last window without 6 ; reexecute the last order Example: I do a drawing with 10 plot over it, if I make a 7 ; mistake, I execute this program and i can redo the only plot missed. 12 8 ; 13 ; CATEGORY: pour faciliter les dessins9 ; @categories utilities 14 10 ; 15 ; CALLING SEQUENCE: @oups11 ; @restrictions compatible with @ps @vzoom text_box... 16 12 ; 17 ; SIDE EFFECTS: compatible avec @ps @vzoom text_box...13 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 18 14 ; 19 ; RESTRICTIONS:20 15 ; 21 ; EXAMPLE:16 ; @version $Id$ 22 17 ; 23 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)18 ; @todo seb 24 19 ; 25 20 ;- 26 21 ;------------------------------------------------------------ 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 29 ;------------------------------------------------------------ 30 ; il faut fermer le journal! 22 ; Close the journal! 31 23 ;------------------------------------------------------------ 32 24 journal 33 ; on recupere le journal sous la forme d''un vecteur destring:25 ; we recuperate the journal as a vector of string: 34 26 vectjournal = getfile(myuniquetmpdir+'idlsave.pro') 35 ; on coupe la derniere ligne qui estoups27 ; we cut the last line which is oups 36 28 vectjournal = vectjournal[0:n_elements(vectjournal)-2 ] 37 29 ;------------------------------------------------------------ 38 ; on le corrige si besoin est...30 ; we correct it if there is the need... 39 31 ;------------------------------------------------------------ 40 32 for i = 0, n_elements(vectjournal)-1 do $ 41 33 if strpos(vectjournal[i],'text_box' ) EQ -1 then $ 42 34 vectjournal[i] = strtrim(strcompress(vectjournal[i]), 2) 43 ;2 li gnes sont identiques??35 ;2 line are identical ?? 44 36 for i = 0, n_elements(vectjournal)-2 do $ 45 37 if vectjournal[i] EQ vectjournal[i+1] then vectjournal[i] = ' ' … … 62 54 63 55 ; 64 ; on vire la derniere ligne pour tout reexecuter sauf la derniere commande56 ; we erase the last line to reexecute all the programm but the last order. 65 57 ; 66 58 IF strpos(vectjournal[n_elements(vectjournal)-1],';,pos=[' ) NE -1 then $ 67 59 vectjournal[n_elements(vectjournal)-2] = '' $ 68 60 ELSE vectjournal[n_elements(vectjournal)-1] = '' 69 ; on reecritidlsave.pro61 ; we rewrite idlsave.pro 70 62 putfile, myuniquetmpdir+'idlsave.pro', vectjournal 71 ; on compile puis appliqueidlsave63 ; we compile, then we apply idlsave 72 64 cd, current = curdir 73 65 cd, myuniquetmpdir 74 66 @idlsave 75 67 cd, curdir 76 ; le journal vient d'etre reouvert, et on y met les elements de 77 ; vectjournal 68 ; the journal has just been reopened, and we put elements of vectjournal in it. 78 69 for i = 0, n_elements(vectjournal)-1 DO $ 79 70 journal, vectjournal[i] -
trunk/SRC/ToBeReviewed/UTILITAIRE/vzoom.pro
r11 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:vraizoom6 5 ; 7 ; PURPOSE:fait un vari zoom dans un plot, contrairement a la fonction 8 ; ZOOM preecrite par IDL qui ne fait que grossir les pixels 6 ; @file_comments 7 ; Make a real zoom in a plot, contrarly at the function 8 ; ZOOM prewritten by IDL which just get pixels bigger. 9 9 ; 10 ; CATEGORY:petit outil10 ; @categories utilities 11 11 ; 12 ; CALLING SEQUENCE:@vzoom 12 ; @restrictions use the journal. 13 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 14 ; 29/4/1999 13 15 ; 14 ; SIDE EFFECTS:utilise le journal.16 ; @version $Id$ 15 17 ; 16 ; RESTRICTIONS:18 ; @todo seb 17 19 ; 18 ; EXAMPLE:19 ;20 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)21 ; 29/4/199922 20 ;- 23 21 ;------------------------------------------------------------ … … 31 29 y = y[sort(y)] 32 30 domdef, [x, y, vert1, vert2] 33 ; il faut fermer le journal!31 ; we must close the journal! 34 32 journal 35 ; on recupere le journal sous la forme d''un vecteur destring:33 ; we recuperate the journal as a vector of string: 36 34 vectjournal = getfile(myuniquetmpdir+'idlsave.pro') 37 ; on coupe la derniere ligne qui estvraizoom35 ; we cut the last line which is vraizoom 38 36 vectjournal = vectjournal[0:n_elements(vectjournal)-2 ] 39 37 ;------------------------------------------------------------ 40 ; on le corrige si besoin est...38 ; we correct it if there is the need to... 41 39 ;------------------------------------------------------------ 42 40 for i = 0, n_elements(vectjournal)-1 do $ 43 41 if strpos(vectjournal[i],'text_box' ) EQ -1 then $ 44 42 vectjournal[i] = strtrim(strcompress(vectjournal[i]), 2) 45 ;2 li gnes sont identiques??43 ;2 line are identical ?? 46 44 for i = 0, n_elements(vectjournal)-2 do $ 47 45 if vectjournal[i] EQ vectjournal[i+1] then vectjournal[i] = ' ' … … 65 63 66 64 ; 67 ; on reecritidlsave.pro65 ; we rewrite idlsave.pro 68 66 putfile, myuniquetmpdir+'idlsave.pro', vectjournal 69 ; appl iqueidlsave67 ; apply idlsave 70 68 cd, current = curdir 71 69 cd, myuniquetmpdir 72 70 @idlsave 73 71 cd, curdir 74 ; le journal vient d'etre reouvert, et on y met les elements de 75 ; vectjournal 72 ; the journal has just been reopened, and we put in elements of vectjournal. 76 73 for i = 0, n_elements(vectjournal)-1 DO $ 77 74 journal, vectjournal[i] -
trunk/SRC/Utilities/fitintobox.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:fitintobox6 ; 7 ; PURPOSE: check that the input array has size and dimensions5 ; 6 ; @file_comments 7 ; Check that the input array has size and dimensions 8 8 ; compatible with the domain that was defined with the previous call 9 9 ; of domdef. 10 10 ; 11 ; CATEGORY: domain compatibility 12 ; 13 ; CALLING SEQUENCE: 14 ; res = fitintobox(field[, nx, ny, nz, firstx, firsty, firstz 15 ; , lastx, lasty, lastz]) 16 ; 17 ; INPUTS: 18 ; field: an array or a structure that can be read by the function 19 ; litchamp.pro 20 ; 21 ; nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz: 22 ; optional parameters. If not given they will be define with a 23 ; call to the procedure grille.pro 24 ; 25 ; KEYWORD PARAMETERS: none 26 ; 27 ; OUTPUTS: an array with dimensions matching the domain 28 ; or -1 if there is an error... 29 ; 30 ; COMMON BLOCKS: cm_4mesh and cm_4cal 31 ; 32 ; SIDE EFFECTS: 33 ; 34 ; RESTRICTIONS: 35 ; 36 ; EXAMPLE: 37 ; 38 ; IDL> help, fitintobox(findgen(jpi,jpj)) 39 ; <Expression> FLOAT = Array[41, 3] 40 ; IDL> help, fitintobox(findgen(jpi,jpj,78)) 41 ; Error: 42 ; the array dimensions [180,148,78] are incompatible 43 ; with the the domain dimensions 44 ; [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 45 ; <Expression> INT = -1 46 ; 47 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 48 ; 10 juin 2000. 49 ; June 2005: S. Masson rewrite all. 11 ; @categories domain compatibility 12 ; 13 ; @param sz {in}{required} 14 ; 15 ; @param nx {in}{required} 16 ; 17 ; @param ny {in}{required} 18 ; 19 ; @param nz {in}{required} 20 ; 21 ; @param jpi {in}{required} 22 ; 23 ; @param jpj {in}{required} 24 ; 25 ; @param jpk {in}{required} 26 ; 27 ; @param jpt {in}{required} 28 ; 29 ; @returns -1 30 ; 31 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 32 ; 10 juin 2000. 33 ; June 2005: S. Masson rewrite all. 34 ; 35 ; @version $Id$ 36 ; 37 ; @hidden 38 ; 50 39 ;- 51 40 ;------------------------------------------------------------ … … 67 56 RETURN, report(['Error: ' $ 68 57 , 'the array dimensions ' + tostr(sz) + ' are incompatible' $ 69 , 'with the the domain dimensions ' $ 58 , 'with the the domain dimensions ' $ 70 59 , '[jpi/nx, jpj/ny, jpk/nz, jpt] = [' $ 71 60 + strtrim(jpi, 1) + '/' + strtrim(nx, 1) $ … … 74 63 + ', ' + strtrim(jpt, 1) + ']'], /simple) 75 64 END 65 ; 66 ;+ 67 ; 68 ; @categories domain compatibility 69 ; 70 ; @param field {in}{required} an array or a structure that can be read by the function 71 ; litchamp.pro 72 ; 73 ; @param nx {in}{optional}{default=define by grille.pro} 74 ; 75 ; @param ny {in}{optional}{default=define by grille.pro} 76 ; 77 ; @param nz {in}{optional}{default=define by grille.pro} 78 ; 79 ; @param firstx {in}{optional}{default=define by grille.pro} 80 ; 81 ; @param firsty {in}{optional}{default=define by grille.pro} 82 ; 83 ; @param firstz {in}{optional}{default=define by grille.pro} 84 ; 85 ; @param lastx {in}{optional}{default=define by grille.pro} 86 ; 87 ; @param lasty {in}{optional}{default=define by grille.pro} 88 ; 89 ; @param lastz {in}{optional}{default=define by grille.pro} 90 ; 91 ; @keyword WDEPTH To specify that we are at W level 92 ; 93 ; @returns an array with dimensions matching the domain 94 ; or -1 if there is an error... 95 ; 96 ; @uses cm_4mesh 97 ; @uses cm_4cal 98 ; 99 ; @examples IDL> help, fitintobox(findgen(jpi,jpj)) 100 ; <Expression> FLOAT = Array[41, 3] 101 ; IDL> help, fitintobox(findgen(jpi,jpj,78)) 102 ; Error: 103 ; the array dimensions [180,148,78] are incompatible 104 ; with the the domain dimensions 105 ; [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 106 ; <Expression> INT = -1 107 ; 108 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 109 ; 10 juin 2000. 110 ; June 2005: S. Masson rewrite all. 111 ; 112 ; @version $Id$ 113 ;- 76 114 ;------------------------------------------------------------ 77 115 FUNCTION fitintobox, field, nx, ny, nz, firstx, firsty $ -
trunk/SRC/Utilities/linearequation.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: linearequation6 5 ; 7 ; PURPOSE:calcule une equation de droite du type ax+by+c=0 a partir 8 ; des coordonnees de 2 points. Rq: on peut avoir un tableau de couple 9 ; de points. 6 ; @file_comments 7 ; Calculate a linear equation of the type ax+by+c=0 8 ; thanks to coordinates of 2 points. 9 ; comment: we can have a table with pairs of points. 10 10 ; 11 ; CATEGORY:petit truc qui peut etre utile (sans boucles, ca va de soit!) 11 ; @categories utilities 12 ; 13 ; @param point1 {in}{required} This is the first point of(the) straight 14 ; line(s) whose we want to calculate equation(s) 12 15 ; 13 ; CALLING SEQUENCE:abc=linearequation(point1, point2) 14 ; 15 ; INPUTS: point1 et point2 dont deux point de(s) la droite(s) dont on 16 ; veut calculer l(es) equations(s). 17 ; deux possibilites sont possibles: 18 ; 1) point est un complexe ou un tableau de complexes, ou chaque 19 ; element du complexe est les coordonnees du point 20 ; 2) points est un tableau de reels de dimensions 2 21 ; ,nbre_de_droite. ou pour chaque ligne du tableau on a les 22 ; coordonnees du point. 16 ; @param point2 {in}{required} This is the second point of(the) straight 17 ; line(s) whose we want to calculate equation(s) 23 18 ; 24 ; KEYWORD PARAMETERS: 19 ; There is 2 possibilities: 20 ; 1) point is a complex or a table ofcomplex, where each element is the coordinates of the point. 21 ; 2) point is a table of real of dimension 2,number_of_straight_line. 22 ; For each row of the table, we have coordinates of the point. 25 23 ; 26 ; OUTPUTS:abc c''est un tableau de dimensions 3, nbre_de_droite, ou27 ; pour chaque ligne du tableau on obtient les 3 parametres a, b, c de28 ; l'equation de la droiteax+by+c=024 ; @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 29 27 ; 30 ; COMMON BLOCKS: 28 ; @examples IDL> abc=linearequation(complex(1,2),[3,4]) 29 ; IDL> print, abc[0]*1+abc[1]*2+abc[2] 30 ; 0.00000 31 31 ; 32 ; SIDE EFFECTS: 32 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 33 ; 10 juin 2000 33 34 ; 34 ; RESTRICTIONS:35 ; @version $Id$ 35 36 ; 36 ; EXAMPLE:37 ; IDL> abc=linearequation(complex(1,2),[3,4])38 ; IDL> print, abc[0]*1+abc[1]*2+abc[2]39 ; 0.0000040 ;41 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)42 ; 10 juin 200043 37 ;- 44 38 ;------------------------------------------------------------ -
trunk/SRC/Utilities/lineintersection.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: lineintersection6 5 ; 7 ; PURPOSE: Calcule les coordonnees de l''intersection de 2 droites ou 8 ; d''une serie de 2 droites 6 ; @file_comments 7 ; Calculate coordinates of the intersection between 2 straight lines 8 ; or of a succession of 2 straight lines. 9 9 ; 10 ; CATEGORY:petit truc qui peut etre utile (sans boucles, ca va de soit!) 10 ; @categories utilities 11 ; 12 ; @param abc1 {in}{required} is the first table of dimension 3, number_of_pairs_of_straight_lines, 13 ; whose each line contain the 3 parameters a,b and c of the first linear 14 ; equation of the type ax+by+c=0 11 15 ; 12 ; CALLING SEQUENCE: point=lineintersection(abc1, abc2) 13 ; 14 ; INPUTS: abc est un tableau de dimensions 3, 15 ; nbre_de_couple_de_droites, dont chaque ligne contient les 3 16 ; parametres a, b, c de l''equation de droite du type ax+by+c=0 16 ; @param abc2 {in}{required} is second table of dimension 3, number_of_pairs_of_straight_lines, 17 ; whose each line contain the 3 parameters a,b and c of the second linear 18 ; equation of the type ax+by+c=0 17 19 ; 18 ; KEYWORD PARAMETERS: 19 ; /FLOAT: pour retourner l''output sous forme de tableau de 20 ; reel plutot que de vecteur decomplexes (par defaut) 20 ; @keyword FLOAT To return the output as a table of real numbers instead of vectors of complex (by default) 21 21 ; 22 ; OUTPUTS:2 possibilites: 23 ; 1) par defaut: c''est une vecteur de complexe dont chaque 24 ; element est les coordonnees du point d''intersection d''un 25 ; couple de droites. 26 ; 2) si /FLOAT est active, c'est un tableau de reels de 27 ; dimensiones 2, nbre_de_couple_de_droites dont chaque 28 ; ligne est les coordonnees du point d''intersection d''un 29 ; couple de droites 22 ; @returns 2 possibilities: 23 ; 1) by default: it is a vector of complex whose each element is the coordinates 24 ; of the intersection point of a pair of straight lines. 25 ; 2) if FLOAT is activated, it is a table of reals of dimension 2, 26 ; number_of_pairs_of_straight_lines whose each row is the coordinates 27 ; of the intersection point of a pair of straight line. 30 28 ; 31 ; COMMON BLOCKS:29 ; @restrictions If the 2 straight line are parallel, we return coordinates (!values.f_nan,!values.f_nan) 32 30 ; 33 ; SIDE EFFECTS:si les deux droites dont paralleles, on retourne les 34 ; coordonnes (!values.f_nan,!values.f_nan) 31 ; @restrictions Beware of the precision of the machine which make 32 ; that calculated coordinates may not exactly verify 33 ; equations of the pair of straight lines. 35 34 ; 36 ; RESTRICTIONS:attention a la precision de la machine qui fait que 37 ; les coordonnees calcules de verifient peut-etre pas exactement les 38 ; equations du couple de droites. 35 ; @examples IDL> abc1=linearequation(complex(1,2),[3,4]) 36 ; IDL> abc2=linearequation(complex(1,2),[8,15]) 37 ; IDL> print, lineintersection(abc1, abc2) 38 ; ( 1.00000, 2.00000) 39 ; IDL> print, lineintersection(abc1, abc2,/float) 40 ; 1.00000 2.00000 39 41 ; 40 ; EXAMPLE: 41 ; IDL> abc1=linearequation(complex(1,2),[3,4]) 42 ; IDL> abc2=linearequation(complex(1,2),[8,15]) 43 ; IDL> print, lineintersection(abc1, abc2) 44 ; ( 1.00000, 2.00000) 45 ; IDL> print, lineintersection(abc1, abc2,/float) 46 ; 1.00000 2.00000 42 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 43 ; 10 juin 2000 47 44 ; 48 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)49 ; 10 juin 200045 ; @version $Id$ 46 ; 50 47 ;- 51 48 ;------------------------------------------------------------ -
trunk/SRC/Utilities/pwd.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:pwd6 5 ; 7 ; PURPOSE:print the current directory 6 ; @file_comments 7 ; print the current directory 8 8 ; 9 ; CATEGORY:like unix function 9 ; @categories like unix function 10 ; 11 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 10 12 ; 11 ; CALLING SEQUENCE:pwd 12 ; 13 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 13 ; @version $Id$ 14 14 ; 15 15 ;- -
trunk/SRC/Utilities/report.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:report6 5 ; 7 ; PURPOSE: comme dialog_message.pro si il y a deja des widgets actives 8 ; ou comme message.pro si il n''y a pas de widgets actives. pour poser 9 ; des question dont la reponse n''est pas oui/non utiliser xquestion 6 ; @file_comments 7 ; Like dialog_message.pro if there is already some widget 8 ; active or like message.pro if there is not any widget active. 9 ; To ask a question whose answer is not yes/no,use xquestion. 10 10 ; 11 ; CATEGORY: 12 ; 13 ; CALLING SEQUENCE:res = report(text) 14 ; 15 ; INPUTS: text: un string on un vecteur de string. Si le string ne 11 ; @param text {in}{required} un string on un vecteur de string. Si le string ne 16 12 ; comporte qu''un element, on cherche les eventuels characteres de 17 13 ; retour a la ligne: '!C'. If text is set to an array of strings, each 18 14 ; array element is displayed as a separate line of text. 19 15 ; 20 ; KEYWORD PARAMETERS: 21 ; SIMPLE: activate to print only the message without the name 16 ; @keyword SIMPLE activate to print only the message without the name 22 17 ; and the line of the routine (defined by calling routine_name) 23 18 ; 24 ; ceux dialog_message.pro et message.pro avec en + 25 ; PARENT qui fait la meme chose que DIALOG_PARENT de dialog_message.pro 19 ; @keyword _extra used to pass keywords from dialog_message.pro and message.pro 26 20 ; 27 ; OUTPUTS: -1 si le mot cle QUESTION n''est pas activer 28 ; si le mot cle est active la fonction retourne 1 pour yes et 29 ; 0 pour no. 21 ; @keyword PARENT same as DIALOG_PARENT de dialog_message.pro 30 22 ; 31 ; COMMON BLOCKS: 23 ; @keyword QUESTION Set this keyword to create a "Question" dialog. 24 ; The default dialog type is "Warning" 32 25 ; 33 ; SIDE EFFECTS: 26 ; @keyword DEFAULT_NO Set this keyword to make the "No" button the default 27 ; selection for "Question" dialog. Normally, the default is yes. 34 28 ; 35 ; RESTRICTIONS: 29 ; @keyword SIMPLE Activate to print the error message without printing 30 ; the routine name with its full path. 36 31 ; 37 ; EXAMPLE: 32 ; @returns -1 if the keyword QUESTION is not activated 33 ; If the keyword is activated, return 1 for yes and 0 for no. 38 34 ; 39 ; si aucun widget n''est active:35 ; @example If there is not any widget activated: 40 36 ; 41 37 ; IDL> help, report('toto tata') 42 38 ; % $MAIN$: toto tata 43 39 ; <Expression> INT = -1 44 ; IDL> help, report(' ca marche?',/question)45 ; ca marche? y/n (default answer is y)40 ; IDL> help, report('does it works ?',/question) 41 ; does it works ? y/n (default answer is y) 46 42 ; <Expression> BYTE = 1 47 ; IDL> help, report('question1: !C ca marche?',/question)43 ; IDL> help, report('question1: !C does it works ?',/question) 48 44 ; question1: 49 ; ca marche? y/n (default answer is y)45 ; does it works ? y/n (default answer is y) 50 46 ; <Expression> BYTE = 1 51 47 ; 52 ; si des widgets sont deja actives, c''est la meme chose mais avec des 53 ; widgets! 48 ; If widgets are already activated, it is the same thing but with widgets! 54 49 ; 55 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)50 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 56 51 ; 21/10/1999 52 ; 53 ; @version $ID$ 54 ; 57 55 ;- 58 56 ;------------------------------------------------------------ … … 63 61 compile_opt idl2, strictarrsubs 64 62 ; 65 res = -1 ; 66 ; on separe le texte en differentes lignes (separees par !C) si ce 67 ; n''est pas deja fait... 63 res = -1 ; 64 ; we separate the text in different lines (separated by !C) if it is not already done... 68 65 if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim) 69 ; il y a des widgets actifs, c''est facile on appelledialog_massage66 ; there is some widgets activated, it is easy, we call dialog_massage 70 67 if (widget_info(/managed))[0] NE 0 then BEGIN 71 68 res = dialog_message(text, dialog_parent = parent, QUESTION = question $ … … 73 70 if keyword_set(question) THEN res = res EQ 'Yes' ELSE res = -1 74 71 ENDIF ELSE BEGIN 75 ; aucun widget n''est actif76 ; on pose unequestion ?72 ; there is not any widget activated 73 ; do we ask a question ? 77 74 if keyword_set(question) then BEGIN 78 ; quelle est la reponse par defaut ?75 ; what i sthe answer by default ? 79 76 if keyword_set(default_no) then answer = 'n' ELSE answer = 'y' 80 77 default_answer = answer … … 83 80 read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer 84 81 answer = strlowcase(answer) ; 85 ; si la reponse ne convient pas82 ; if the answer is not appropriated 86 83 while answer NE '' and answer NE 'y' and answer NE 'n' do begin 87 84 read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer 88 85 answer = strlowcase(answer) 89 86 ENDWHILE ; 90 ; on ajuste res en fonction de la reponse87 ; we adjust res in function of th answer 91 88 case answer of 92 89 '':res = default_answer EQ 'y' … … 95 92 endcase 96 93 endif ELSE BEGIN 97 ; si on ne pose pas de question on fait juste unprint94 ; If we do not ask any question, we just make a print 98 95 IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': ' 99 96 if n_elements(text) GT 1 THEN $ -
trunk/SRC/Utilities/routine_name.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:routine_name,remonte6 5 ; 7 ; PURPOSE:retourne le nom de la routine (procedure ou function) ds8 ; lequel on se trouve6 ; @file_comments 7 ; Give us the name of the routine (procedure or function) where we are. 9 8 ; 10 ; CATEGORY:utilitaire 9 ; @categories utilities 10 ; 11 ; @param pilingnum {in}{optional} A whole number which give us how many level we have to reascend 12 ; in the piling up of routines and subroutines to find the looked for routine. 11 13 ; 12 ; CALLING SEQUENCE:res=routine_name([remonte])13 ;14 ; INPUTS: remonte: un entier qui donne de combien de niveau on doit15 ; remonter ds l''empillement des routines ewt sous-routines pour16 ; retrouver le nom de la routine cherchee17 14 ; 18 ; KEYWORD PARAMETERS:15 ; @returns a string giving either the full name of the routine (with the path) or '$MAIN$' 19 16 ; 20 ; OUTPUTS:un string donnant soit le nom de la routine en entier (avec 21 ; le path) soit '$MAIN$' 17 ; @restriction This function use the keyword OUTPUT in help.pro and it is specified 18 ; in the online help that the return syntax of this word can change in 19 ; function of the version of the code. This version works with IDL 5.2. 22 20 ; 23 ; COMMON BLOCKS: 24 ; 25 ; SIDE EFFECTS: 26 ; 27 ; RESTRICTIONS: 28 ; cette fonction utilise le mot cle OUTPUT ds help.pro et il est 29 ; specifie ds l''aide en ligne que la syntaxe du retour de ce mot cle 30 ; peut changer suivant la version du code. Cette version marche avec 31 ; IDL 5.2 32 ; 33 ; EXAMPLE: 34 ; 35 ; IDL> print, routine_name() 21 ; @example IDL> print, routine_name() 36 22 ; /usr1/com/smasson/IDL_RD/UTILITAIRE/report.pro 37 23 ; IDL> print, routine_name(1) … … 44 30 ; $MAIN$ 45 31 ; 46 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)32 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 47 33 ; 21/10/1999 34 ; 35 ; @version $Id$ 36 ; 48 37 ;- 49 38 ;------------------------------------------------------------ 50 39 ;------------------------------------------------------------ 51 40 ;------------------------------------------------------------ 52 FUNCTION routine_name, remonte41 FUNCTION routine_name, pilingnum 53 42 ; 54 43 ; … … 56 45 ; 57 46 help, /traceback, output = name 58 name = strtrim(name, 1) ; on enleve les blancs en debut de ligne59 ; on va mettre les elements du vecteur bout a bout pour former un60 ; unique sring47 name = strtrim(name, 1) ; we remove blanks at the beginning of lines and 48 ; we put elements of the vector stuck ones with 49 ; each others to make an unique string. 61 50 allnames = '' 62 51 for i = 0, n_elements(name)-1 do allnames = allnames+name[i] 63 52 ; 64 name = str_sep(allnames, '%') ; on le redecoupe65 name = strtrim(name, 2) ; on eleve les blancs devant et derriere66 name = strcompress(name) ; on compresse les blancs67 ; on ne retient pas les 2 premiers elements qui sont 1 un vide et la68 ; ligne concernant routine_name53 name = str_sep(allnames, '%') ; we cut it out again. 54 name = strtrim(name, 2) ; we remouve blanks in front of and behind 55 name = strcompress(name) ; we compress blanks 56 ; we do not hold back the two first elements who are a blanck and the line concerning 57 ; routine_name. 69 58 name = name[2: n_elements(name)-1] 70 ; on choisit la ligne qui nous concerne71 if NOT keyword_set( remonte) then remonte= 072 if remonteGE n_elements(name) then return, '$MAIN$'73 name = name[ remonte]59 ; we choose the line which concern us. 60 if NOT keyword_set(pilingnum) then pilingnum = 0 61 if pilingnum GE n_elements(name) then return, '$MAIN$' 62 name = name[pilingnum] 74 63 if strpos(name, '$MAIN$') NE -1 then return, '$MAIN$' 75 64 name = str_sep(name, ' ') -
trunk/SRC/Utilities/testvar.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:testvar6 5 ; 7 ; PURPOSE:une sorte de keyword_set mais qd la valeur existe renvoie8 ; celle-ci6 ; @file_comments 7 ; A kind of keyword_set but when the value exist, it send it back 9 8 ; 10 ; CATEGORY:comme keyword_set9 ; @categories utlities 11 10 ; 12 ; CALLING SEQUENCE:res=testvar(var=variable) 13 ; 14 ; INPUTS:rien 11 ; @keyword var any kind of 15 12 ; 16 ; KEYWORD PARAMETERS:var : n''importe quoi13 ; @returns 0 if the variable does not exist 17 14 ; 18 ; OUTPUTS:0 si la variable n''existe pas 19 ; 20 ; COMMON BLOCKS: 21 ; 22 ; SIDE EFFECTS: 23 ; 24 ; RESTRICTIONS: 25 ; 26 ; EXAMPLE: 27 ; 28 ; IDL> print, testvar(var=toto) 15 ; @examples IDL> print, testvar(var=toto) 29 16 ; 0 30 17 ; IDL> print, testvar(var='toto') 31 18 ; toto 32 19 ; 33 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)20 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 34 21 ; 14/12/1999 22 ; 23 ; @version $Id$ 24 ; 35 25 ;- 36 26 ;------------------------------------------------------------ -
trunk/SRC/Utilities/text_box.pro
r132 r133 1 1 ;+ 2 ; Name : text_box3 2 ; 4 ; Purpose : Writes a text message within a box in a graphics window. 3 ; @file_comments 4 ; This procedure writes a short text message within a box-shaped 5 ; area in a graphics window. The message may be split at word 6 ; boundaries into several lines, and the character size and 7 ;orientation may be adjusted for the text to fit within the box. 8 ; 9 ; @param TEXT {in}{required} ASCII text string containing the message. 5 10 ; 6 ; Description: This procedure writes a short text message within a box-shaped 7 ; area in a graphics window. The message may be split at word 8 ; boundaries into several lines, and the character size and 9 ; orientation may be adjusted for the text to fit within the box. 10 ; 11 ; Useage: text_box,text,pos=pos,color=color,$ 12 ; justify=justify,vert_space=vert_space 13 ; 14 ; Inputs 15 ; TEXT ASCII text string containing the message. 16 ; 17 ; keywords 18 ; pos 4 element vector specifying the box position and size 11 ; @keyword pos 4 element vector specifying the box position and size 19 12 ; pos[0],pos[1] specify the lower left corner coordinate 20 13 ; pos[2],pos[3] specify the upper right corner coordinate 21 14 ; data window normalized coordinates are use 22 15 ; 23 ; fg_colorcolor of box and legend titles (default=0)16 ; @keyword fg_color color of box and legend titles (default=0) 24 17 ; 25 ; bg_colorbackground color. Setting BG_COLOR erases the area18 ; @keyword bg_color background color. Setting BG_COLOR erases the area 26 19 ; covered by the text box (filling it with color BG_COLOR) 27 20 ; prior to writing the text. If both BG_COLOR and !p.color … … 29 22 ; gaurantee a readability. 30 23 ; 31 ; right if set, right justify text 32 ; center if set, center the text 24 ; @keyword right if set, right justify text 33 25 ; 34 ; vert_space vertical spacing of lines in units of character height 35 ; (default = 1.5) 26 ; @keyword center if set, center the text 36 27 ; 28 ; @keyword vert_space {default=1.5}vertical spacing of lines in units of character height 37 29 ; 38 ; author: Paul Ricchiazzi 7Jul93 30 ; @keyword _EXTRA used to pass your keyword 31 ; 32 ; @keyword box activate to show the box on graphics window. 33 ; 34 ; @history Paul Ricchiazzi 7Jul93 39 35 ; Institute for Computational Earth System Science 40 36 ; University of California, Santa Barbara 37 ; 38 ; @version $Id$ 39 ; 41 40 ;- 42 41 PRO text_box,text,pos=pos,fg_color=fg_color,bg_color=bg_color,$ -
trunk/SRC/Utilities/undefine.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: undefine6 5 ; 7 ; PURPOSE: effacer une variable 8 ; meme chose que delvar mais utiulisable ds un programme et 9 ; utilisable que pour une variable a la fois 6 ; @file_comments 7 ; erase a variable 8 ; same thing that delvar but usable in a program and usable 9 ; for one variable simultaneously 10 10 ; 11 ; CATEGORY: 11 ; @categories utilities 12 ; 13 ; @param varname {in}{required} The name of the variable we want erase 12 14 ; 13 ; CALLING SEQUENCE: UNDEFINE, varname 14 ; 15 ; INPUTS: varname: la variable a detruire 15 ; @example IDL> a=1 16 ; IDL> undefine,a 17 ; % Compiled module: UNDEFINE. 18 ; IDL> help, a 19 ; A UNDEFINED = <Undefined> 16 20 ; 17 ; EXAMPLE: 18 ; 19 ; IDL> a=1 20 ; IDL> undefine,a 21 ; % Compiled module: UNDEFINE. 22 ; IDL> help, a 23 ; A UNDEFINED = <Undefined> 24 ; 25 ; MODIFICATION HISTORY: trouve sur la page web de D.Fanning 21 ; @history trouve sur la page web de D.Fanning 26 22 ; http://www.dfanning.com : 27 23 ;QUESTION: How do I make an IDL variable have a type "undefined"? -
trunk/SRC/Utilities/xfile.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: xfile6 5 ; 7 ; PURPOSE: affiche ds un widget un fichier ASCII. 8 ; c''est la meme chose que xdisplaydife mais ici on l''utilise pour 9 ; visualiser le contenu d''une procedure ou d''une fonction 10 ; meme si elle n''est pas ds le repertoire courant (grace a !path) 6 ; @file_comments 7 ; display in a widget an ASCII file. 8 ; It is the same thing that xdisplaydife but here, we use it 9 ; to display the content of a procedure or of a function, 10 ; even if it is not in the current directory (thanks to the path). 11 11 ; 12 ; CATEGORY: help12 ; @categories utilities 13 13 ; 14 ; CALLING SEQUENCE: xfile,'nom_fichier' 14 ; @param filename {in}{required} It is the name of the procedure or of the function 15 ; we want to display (with or without .pro at the end). 15 16 ; 16 ; INPUTS: 17 ; nom_fichier:le nom d''une procedure ou d''une fonction a 18 ; visualiser avec ou sans le .pro a la fin 17 ; @keyword _extra used to pass your keywords 19 18 ; 20 ; KEYWORD PARAMETERS:ceux de xdisplayfile19 ; @examples xfile,'plt' 21 20 ; 22 ; EXAMPLE:xfile,'plt' 23 ; 24 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 21 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 25 22 ; 7/1/99 26 23 ; 6/7/1999: compatibilite mac et windows 24 ; 25 ; @version $Id$ 26 ; 27 27 ;- 28 28 ;------------------------------------------------------------ … … 35 35 pfile = strlowcase(filename) 36 36 ; 37 ; il faut trouver le nom complet37 ; we have to find the full name. 38 38 ; 39 39 if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro" … … 57 57 endrep until res[0] NE '' OR i EQ n_elements(pfile) 58 58 if res[0] NE '' then BEGIN 59 ; on ouvre le fichier ds unwidget59 ; we open the file in a widget 60 60 xdisplayfile, pfile[i-1], _extra = ex 61 61 ENDIF ELSE ras = report('le fichier demande n''existe pas...') -
trunk/SRC/Utilities/xhelp.pro
r132 r133 1 1 ;+ 2 ; NAME:3 ; xhelp4 2 ; 5 ; PURPOSE:6 ; 3 ; @file_comments 4 ; Display an IDL procedure header using widgets and the widget manager. 7 5 ; 8 ; CATEGORY: 9 ; Widgets. 6 ; @categories Widgets. 10 7 ; 11 ; CALLING SEQUENCE: 12 ; xhelp, Filename,_extra=ex 13 ; 14 ; INPUTS: 15 ; Filename: A scalar string that contains the filename of the file 8 ; @param Filename {in}{required} A scalar string that contains the filename of the file 16 9 ; to display. If FILENAME does not include a complete path 17 10 ; specification, xhelp will search for the file in … … 20 13 ; ".pro" file suffix will be appended if it is not supplied. 21 14 ; 22 ; KEYWORD PARAMETERS: 23 ; Ceux de xdisplayfile 15 ; @keyword _extra used to pass your keywords 24 16 ; 25 ; OUTPUTS: 26 ; No explicit outputs. A file viewing widget is created. 17 ; @restrictions Triggers the XMANAGER if it is not already in use. 27 18 ; 28 ; SIDE EFFECTS: 29 ; Triggers the XMANAGER if it is not already in use. 19 ; @examples Open a file and create a widget to display its contents. 30 20 ; 31 ; RESTRICTIONS: 32 ; None. 33 ; 34 ; PROCEDURE: 35 ; Open a file and create a widget to display its contents. 36 ; 37 ; MODIFICATION HISTORY: 38 ; Written By Steve Richards, December 1990 21 ; @history Written By Steve Richards, December 1990 39 22 ; Graceful error recovery, DMS, Feb, 1992. 40 23 ; Modified to extract .pro documentation headers, PJR/ESRG mar94 41 ; 42 ; author: Paul Ricchiazzi jun93 43 ; Institute for Computational Earth System Science 44 ; University of California, Santa Barbara 45 ; 24 ; Paul Ricchiazzi jun93 25 ; Institute for Computational Earth System Science 26 ; University of California, Santa Barbara 46 27 ; 7/1/99 : legeres mofification par Sebastien Masson : utilisation de 47 28 ; xdisplayfile, de findfile et de _extra. 48 29 ; 6/7/1999: compatibilite mac et windows 30 ; 31 ; @version $Id$ 32 ; 49 33 ;- 50 34 PRO xhelp, filename, _extra=ex … … 53 37 ; 54 38 55 ; filename est bien unstring?39 ; Are we sure filename is a string? 56 40 cquoidonc = size(filename, /type) 57 41 if cquoidonc NE 7 then begin … … 59 43 return 60 44 endif 61 ; il faut trouver le nom complet45 ; We have to find the full name 62 46 pfile=FILENAME 63 47 if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro" … … 75 59 pfile = [current, multipath]+ pfile 76 60 ENDIF 77 ; on test tous les noms possibles pour trouver ou est le fichier61 ; We test each possile name to find where the file is. 78 62 nfile=n_elements(pfile) 79 63 n = 0 … … 83 67 endrep until res[0] NE '' OR n EQ n_elements(pfile) 84 68 if res[0] NE '' then BEGIN 85 openr, unit,pfile[n-1], /get_lun ; o uverture du fichier86 ; on selectionne le morceaux en-tete69 openr, unit,pfile[n-1], /get_lun ; opening of the file 70 ; we select the heading piece 87 71 a = strarr(1000) ;Maximum # of lines 88 72 xsize=0 … … 104 88 ras = report('le programme a etait mal ecrit, il n''y a pas d''en-tete... utiliser xfile.pro.') ELSE BEGIN 105 89 a = a[0:i-1] 106 ; on ecrit le contenu de a ds unwidget90 ; we wrote the a's content in a widget 107 91 xdisplayfile,'toto',text = a,title=pfile[n-1], _extra = ex 108 92 ENDELSE
Note: See TracChangeset
for help on using the changeset viewer.