Changeset 136 for trunk/SRC/Utilities
- Timestamp:
- 07/10/06 17:20:19 (18 years ago)
- Location:
- trunk/SRC/Utilities
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Utilities/createfunc.pro
r128 r136 4 4 ;+ 5 5 ; @file_comments 6 ; write an idlfunction, compile it and execute it.7 ; useful lto avoid the use of execute6 ; write an IDL function, compile it and execute it. 7 ; useful to avoid the use of execute 8 8 ; 9 ; @param command {in}{required} a scalar string defining the result to be 10 ; given back by the function. (see examples) 9 ; @param command {in}{required} 10 ; a scalar string defining the result to be given back by the function. 11 ; (see examples) 11 12 ; 12 13 ; @keyword FILENAMEIN {in} {default=for_createfunc.pro} 13 14 ; name of the function to be created. 14 15 ; 15 ; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 16 ; must be included in the function definition. Warning: the string 17 ; must start with a ',' for example: KWDLIST = ', TOTO = toto' 16 ; @keyword KWDLIST {in} 17 ; a vector string. to specify a list of keywords that must be included in the 18 ; function definition. 19 ; Warning: the string must start with a ',' 20 ; for example: KWDLIST = ', TOTO = toto' 18 21 ; 19 ; @keyword _EXTRA used to pass your keywords to the created function. 22 ; @keyword _EXTRA 23 ; used to pass your keywords to the created function. 20 24 ; 21 25 ; @restrictions -
trunk/SRC/Utilities/createpro.pro
r128 r136 6 6 ; write an idl procedure, compile it and execute it. 7 7 ; 8 ; @param command {in}{required} a string array defining the procedure to be created. each element will be a line of the created procedure. 8 ; @param command {in}{required} 9 ; a string array defining the procedure to be created. 10 ; each element will be a line of the created procedure. 9 11 ; 10 12 ; @keyword FILENAMEIN {in} {default=for_createpro.pro} 11 ; 13 ; name of the procedure to be created. 12 14 ; 13 ; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 14 ; must be included in the procedure definition. Warning: the string 15 ; must start with a ',' for example: KWDLIST = ', TOTO = toto' 15 ; @keyword KWDLIST {in} 16 ; a vector string. 17 ; to specify a list of keywords that must be included in the procedure 18 ; definition. 19 ; Warning: the string must start with a ',' 20 ; for example: KWDLIST = ', TOTO = toto' 16 21 ; 17 ; @keyword KWDUSED obsolote, please pass directly your keywords through _EXTRA 22 ; @keyword KWDUSED 23 ; obsolete, please pass directly your keywords through _EXTRA 18 24 ; 19 ; @keyword _EXTRA used to pass your keywords to the created procedure. 25 ; @keyword _EXTRA 26 ; used to pass your keywords to the created procedure. 20 27 ; 21 28 ; @restrictions … … 48 55 dummy = report(['keyword KWDUSED has been suppressed,' $ 49 56 , 'please pass directly your keywords through _extra,' $ 50 , 'see exa emples in createpro header'])57 , 'see examples in createpro header']) 51 58 return 52 59 ENDIF -
trunk/SRC/Utilities/find.pro
r128 r136 13 13 ; @categories find a file 14 14 ; 15 ; @param filein {in}{required} A scalar or array variable of string type, containing 16 ; file names to match. Input names specifications may contain 17 ; wildcard characters, enabling them to match multiple files 18 ; (see file_search for more informations). By default and if 19 ; necessary, find is looking for filename and also for filename 20 ; completed with '.pro' 15 ; @param filein {in}{required} 16 ; A scalar or array variable of string type, containing 17 ; file names to match. Input names specifications may contain 18 ; wildcard characters, enabling them to match multiple files 19 ; (see file_search for more informations). By default and if 20 ; necessary, find is looking for filename and also for filename 21 ; completed with '.pro' 21 22 ; 22 ; @keyword FIRSTFOUND activate this keyword to stop looking for the file as23 ; 23 ; @keyword FIRSTFOUND 24 ; activate this keyword to stop looking for the file as soon as we found one. 24 25 ; 25 ; @keyword IODIRECTORY {default=!path} A scalar or array variable of string type, containing 26 ; directories names where we are looking for the file. 27 ; Different directories can be separated by 28 ; path_sep(/search_path) (':' on unix type machine) as it is done 29 ; to define !path. 30 ; Note that if filename's dirname is different from '.', this 31 ; keyword is not taken into account. 26 ; @keyword IODIRECTORY {default=!path} 27 ; A scalar or array variable of string type, containing 28 ; directories names where we are looking for the file. 29 ; Different directories can be separated by 30 ; path_sep(/search_path) (':' on unix type machine) as it is done 31 ; to define !path. 32 ; Note that if filename's dirname is different from '.', this 33 ; keyword is not taken into account. 32 34 ; 33 ; @keyword LOOKALLDIR activate to look for the file with a recursive search 34 ; in iodir, homedir, !path + the DATA:TestsData directory if it exists. 35 ; @keyword LOOKALLDIR 36 ; activate to look for the file with a recursive search 37 ; in iodir, homedir, !path + the DATA:TestsData directory if it exists. 35 38 ; 36 ; @keyword NOPRO activate to avoid the automatic search of filename37 ; 39 ; @keyword NOPRO 40 ; activate to avoid the automatic search of filename completed with '.pro' 38 41 ; 39 ; @keyword ONLYPRO force to look only at file ending with .pro 42 ; @keyword ONLYPRO 43 ; force to look only at file ending with .pro 40 44 ; 41 ; @keyword ONLYNC force to look only at file ending with .nc 45 ; @keyword ONLYNC 46 ; force to look only at file ending with .nc 42 47 ; 43 ; @keyword RECURSIVE performs recursive searching of directory hierarchies.44 ; In a recursive search, find looks recursively for any and all45 ; subdirectories in the file hierarchy rooted at the IODIRECTORY46 ; 48 ; @keyword RECURSIVE 49 ; performs recursive searching of directory hierarchies. 50 ; In a recursive search, find looks recursively for any and all 51 ; subdirectories in the file hierarchy rooted at the IODIRECTORY argument. 47 52 ; 48 ; @keyword REPERTOIRE obsolete. keep for compatibility, use directory keyword 53 ; @keyword REPERTOIRE 54 ; obsolete. keep for compatibility, use directory keyword 49 55 ; 50 ; @keyword UNIQUE activate to make sure that each element of the output51 ; 56 ; @keyword UNIQUE 57 ; activate to make sure that each element of the output vector is unique. 52 58 ; 53 ; @keyword _EXTRA used to pass your keywords 59 ; @keyword _EXTRA 60 ; used to pass your keywords 54 61 ; 55 ; 56 ; @returnsA scalar or array variable of string type, containing the57 ; 58 ; 59 ; 62 ; @returns 63 ; A scalar or array variable of string type, containing the 64 ; name (with the full path of the matching files. If no files 65 ; exist with names matching the input arguments, find returns 66 ; the scalar string : 'NOT FOUND' 60 67 ; 61 68 ; @examples -
trunk/SRC/Utilities/fitintobox.pro
r134 r136 89 89 ; @param lastz {in}{optional}{default=define by grille.pro} 90 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... 91 ; @keyword WDEPTH 92 ; To specify that we are at W level 93 ; 94 ; @returns 95 ; an array with dimensions matching the domain 96 ; or -1 if there is an error... 95 97 ; 96 98 ; @uses cm_4mesh 97 99 ; @uses cm_4cal 98 100 ; 99 ; @examples IDL> help, fitintobox(findgen(jpi,jpj)) 100 ; <Expression> FLOAT = Array[41, 3] 101 ; IDL> help, fitintobox(findgen(jpi,jpj,78)) 102 ; Error: 103 ; the array dimensions [180,148,78] are incompatible 104 ; with the the domain dimensions 105 ; [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 106 ; <Expression> INT = -1 101 ; @examples 102 ; IDL> help, fitintobox(findgen(jpi,jpj)) 103 ; <Expression> FLOAT = Array[41, 3] 104 ; IDL> help, fitintobox(findgen(jpi,jpj,78)) 105 ; Error: 106 ; the array dimensions [180,148,78] are incompatible 107 ; with the the domain dimensions 108 ; [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/41, 148/3, 31/31, 1] 109 ; <Expression> INT = -1 107 110 ; 108 111 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) -
trunk/SRC/Utilities/isadirectory.pro
r128 r136 9 9 ; @categories io 10 10 ; 11 ; @param directoryin {in}{optional} a proposed directory. If neither dirname 12 ; input parameter of IODIRECTORY keyword are defined, 13 ; the ask the user to choose a directory. 11 ; @param directoryin {in}{optional} 12 ; a proposed directory. If neither dirname 13 ; input parameter of IODIRECTORY keyword are defined, 14 ; the ask the user to choose a directory. 14 15 ; 15 ; @keyword IODIRECTORY a proposed directory 16 ; @keyword IODIRECTORY 17 ; a proposed directory 16 18 ; 17 ; @keyword TITLE the title of the window 19 ; @keyword TITLE 20 ; the title of the window 18 21 ; 19 ; @keyword _EXTRA used to pass your keywords 22 ; @keyword _EXTRA 23 ; used to pass your keywords 20 24 ; 21 ; @file_comments all dialog_pickfile keywords (like filter) can be used. 25 ; @file_comments 26 ; all dialog_pickfile keywords (like filter) can be used. 22 27 ; 23 ; @returns the directory name 28 ; @returns 29 ; the directory name 24 30 ; 25 31 ; @examples -
trunk/SRC/Utilities/isafile.pro
r128 r136 9 9 ; @categories io 10 10 ; 11 ; @param filein {in}{optional} a proposed name. If neither filein12 ; input parameter of filename keyword are defined,13 ; 11 ; @param filein {in}{optional} 12 ; a proposed name. If neither filein input parameter of filename keyword are 13 ; defined, the ask the user to choose a file. 14 14 ; 15 ; @keyword FILENAME a proposed filename. 15 ; @keyword FILENAME 16 ; a proposed filename. 16 17 ; 17 ; @keyword IODIRECTORY a directory where we look for the file. this 18 ; keyword is taken into account only if the dirname 19 ; of filein or filename is '.' 18 ; @keyword IODIRECTORY 19 ; a directory where we look for the file. this 20 ; keyword is taken into account only if the dirname 21 ; of filein or filename is '.' 20 22 ; 21 ; @keyword NEW to specify that filename is a new file and that 22 ; we should check only its path 23 ; @keyword NEW 24 ; to specify that filename is a new file and that we should check only its 25 ; path 23 26 ; 24 ; @keyword ONLYPRO force to look only at file ending with .pro 27 ; @keyword ONLYPRO 28 ; force to look only at file ending with .pro 25 29 ; 26 ; @keyword ONLYNC force to look only at file ending with .nc 30 ; @keyword ONLYNC 31 ; force to look only at file ending with .nc 27 32 ; 28 ; @keyword RECURSIVE performs recursive searching of directory hierarchies.29 ; In a recursive search, find looks recursively for any and all30 ; subdirectories in the file hierarchy rooted at the IODIRECTORY31 ; 33 ; @keyword RECURSIVE 34 ; performs recursive searching of directory hierarchies. 35 ; In a recursive search, find looks recursively for any and all 36 ; subdirectories in the file hierarchy rooted at the IODIRECTORY argument. 32 37 ; 33 ; @keyword _EXTRA used to pass your keywords 38 ; @keyword _EXTRA 39 ; used to pass your keywords 34 40 ; 35 ; @file_comments all find, file_search and dialog_pickfile keywords (like title) can be used 41 ; @file_comments 42 ; all find, file_search and dialog_pickfile keywords (like title) can be used 36 43 ; 37 ; @returns the filename with its path 44 ; @returns 45 ; the filename with its path 38 46 ; 39 47 ; @examples -
trunk/SRC/Utilities/linearequation.pro
r134 r136 11 11 ; @categories utilities 12 12 ; 13 ; @param point1 {in}{required} This is the first point of(the) straight 14 ; line(s) whose we want to calculate equation(s) 13 ; @param point1 {in}{required} 14 ; This is the first point of(the) straight line(s) whose we want to calculate 15 ; equation(s) 15 16 ; 16 ; @param point2 {in}{required} This is the second point of(the) straight 17 ; line(s) whose we want to calculate equation(s) 17 ; @param point2 {in}{required} 18 ; This is the second point of(the) straight line(s) whose we want to calculate 19 ; equation(s) 18 20 ; 19 ; 20 ; 1) point is a complex or a table of complex, where each element is the coordinates of the point.21 ; There is 2 possibilities: 22 ; 1) point is a complex or a table of complex, where each element is the coordinates of the point. 21 23 ; 2) point is a table of real of dimension 2,number_of_straight_line. 22 24 ; For each row of the table, we have coordinates of the point. 23 25 ; 24 ; @returns abc is a table of dimension 3, number_of_straight_line, 25 ; where for each lign of the table we obtain the 3 parameters 26 ; a, b and c of the linear equation ax+by+c=0 26 ; @returns 27 ; abc is a table of dimension 3, number_of_straight_line, 28 ; where for each line of the table we obtain the 3 parameters 29 ; a, b and c of the linear equation ax+by+c=0 27 30 ; 28 ; @examples IDL> abc=linearequation(complex(1,2),[3,4]) 29 ; IDL> print, abc[0]*1+abc[1]*2+abc[2] 30 ; 0.00000 31 ; @examples 32 ; IDL> abc=linearequation(complex(1,2),[3,4]) 33 ; IDL> print, abc[0]*1+abc[1]*2+abc[2] 34 ; 0.00000 31 35 ; 32 36 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) -
trunk/SRC/Utilities/lineintersection.pro
r134 r136 10 10 ; @categories utilities 11 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 12 ; @param abc1 {in}{required} 13 ; is the first table of dimension 3, number_of_pairs_of_straight_lines, 14 ; whose each line contain the 3 parameters a,b and c of the first linear 15 ; equation of the type ax+by+c=0 15 16 ; 16 ; @param abc2 {in}{required} is second table of dimension 3, number_of_pairs_of_straight_lines, 17 ; whose each line contain the 3 parameters a,b and c of the second linear 18 ; equation of the type ax+by+c=0 17 ; @param abc2 {in}{required} 18 ; is second table of dimension 3, number_of_pairs_of_straight_lines, 19 ; whose each line contain the 3 parameters a,b and c of the second linear 20 ; equation of the type ax+by+c=0 19 21 ; 20 ; @keyword FLOAT To return the output as a table of real numbers instead of vectors of complex (by default) 22 ; @keyword FLOAT 23 ; To return the output as a table of real numbers instead of vectors of 24 ; complex (by default) 21 25 ; 22 ; @returns 2 possibilities: 26 ; @returns 27 ; 2 possibilities: 23 28 ; 1) by default: it is a vector of complex whose each element is the coordinates 24 29 ; of the intersection point of a pair of straight lines. … … 27 32 ; of the intersection point of a pair of straight line. 28 33 ; 29 ; @restrictions If the 2 straight line are parallel, we return coordinates (!values.f_nan,!values.f_nan) 34 ; @restrictions 35 ; If the 2 straight line are parallel, we return coordinates 36 ; (!values.f_nan,!values.f_nan) 30 37 ; 31 ; @restrictions Beware of the precision of the machine which make 32 ; that calculated coordinates may not exactly verify 33 ; equations of the pair of straight lines. 38 ; @restrictions 39 ; Beware of the precision of the machine which make 40 ; that calculated coordinates may not exactly verify 41 ; equations of the pair of straight lines. 34 42 ; 35 ; @examples IDL> abc1=linearequation(complex(1,2),[3,4]) 36 ; IDL> abc2=linearequation(complex(1,2),[8,15]) 37 ; IDL> print, lineintersection(abc1, abc2) 38 ; ( 1.00000, 2.00000) 39 ; IDL> print, lineintersection(abc1, abc2,/float) 40 ; 1.00000 2.00000 43 ; @examples 44 ; IDL> abc1=linearequation(complex(1,2),[3,4]) 45 ; IDL> abc2=linearequation(complex(1,2),[8,15]) 46 ; IDL> print, lineintersection(abc1, abc2) 47 ; ( 1.00000, 2.00000) 48 ; IDL> print, lineintersection(abc1, abc2,/float) 49 ; 1.00000 2.00000 41 50 ; 42 51 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) -
trunk/SRC/Utilities/protype.pro
r128 r136 8 8 ; @categories utilities 9 9 ; 10 ; @param file {in} A scalar of string type, the name of the ".pro" file to be tested 11 ; if necessary, the input name is completed with '.pro' 12 ; and its path found in !path 10 ; @param file {in} 11 ; A scalar of string type, the name of the ".pro" file to be tested 12 ; if necessary, the input name is completed with '.pro' 13 ; and its path found in !path 13 14 ; 14 ; @returns A scalar of string type: 'proc', 'func' or 'batch' 15 ; @returns 16 ; A scalar of string type: 'proc', 'func' or 'batch' 15 17 ; 16 18 ; @examples -
trunk/SRC/Utilities/pwd.pro
r134 r136 9 9 ; @categories like unix function 10 10 ; 11 ; @history Sebastien Masson (smasson @lodyc.jussieu.fr)11 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 12 12 ; 13 13 ; @version $Id$ -
trunk/SRC/Utilities/report.pro
r134 r136 9 9 ; To ask a question whose answer is not yes/no,use xquestion. 10 10 ; 11 ; @param text {in}{required} un string on un vecteur de string. Si le string ne 11 ; @param text {in}{required} 12 ; one string or one vector of string. Si le string ne 12 13 ; comporte qu''un element, on cherche les eventuels characteres de 13 14 ; retour a la ligne: '!C'. If text is set to an array of strings, each 14 15 ; array element is displayed as a separate line of text. 15 16 ; 16 ; @keyword SIMPLE activate to print only the message without the name 17 ; and the line of the routine (defined by calling routine_name) 17 ; @keyword SIMPLE 18 ; activate to print only the message without the name 19 ; and the line of the routine (defined by calling routine_name) 18 20 ; 19 ; @keyword _extra used to pass keywords from dialog_message.pro and message.pro 21 ; @keyword _extra 22 ; used to pass keywords from dialog_message.pro and message.pro 20 23 ; 21 ; @keyword PARENT same as DIALOG_PARENT de dialog_message.pro 24 ; @keyword PARENT 25 ; same as DIALOG_PARENT de dialog_message.pro 22 26 ; 23 ; @keyword QUESTION Set this keyword to create a "Question" dialog.24 ; The default dialog type is "Warning"27 ; @keyword QUESTION {default="Warning"} 28 ; Set this keyword to create a "Question" dialog. 25 29 ; 26 ; @keyword DEFAULT_NO Set this keyword to make the "No" button the default 27 ; selection for "Question" dialog. Normally, the default is yes. 30 ; @keyword DEFAULT_NO {default="Yes"} 31 ; Set this keyword to make the "No" button the default selection for 32 ; "Question" dialog. 28 33 ; 29 ; @keyword SIMPLE Activate to print the error message without printing 30 ; the routine name with its full path. 34 ; @keyword SIMPLE 35 ; Activate to print the error message without printing the routine name with 36 ; its full path. 31 37 ; 32 ; @returns -1 if the keyword QUESTION is not activated 33 ; If the keyword is activated, return 1 for yes and 0 for no. 38 ; @returns 39 ; -1 if the keyword QUESTION is not activated 40 ; If the keyword is activated, return 1 for yes and 0 for no. 34 41 ; 35 ; @example If there is not any widget activated: 42 ; @examples 43 ; If there is not any widget activated: 36 44 ; 37 ; 38 ; 39 ; 40 ; 41 ; 42 ; 43 ; 44 ; 45 ; 46 ; 45 ; IDL> help, report('toto tata') 46 ; % $MAIN$: toto tata 47 ; <Expression> INT = -1 48 ; IDL> help, report('does it works ?',/question) 49 ; does it works ? y/n (default answer is y) 50 ; <Expression> BYTE = 1 51 ; IDL> help, report('question1: !C does it works ?',/question) 52 ; question1: 53 ; does it works ? y/n (default answer is y) 54 ; <Expression> BYTE = 1 47 55 ; 48 56 ; If widgets are already activated, it is the same thing but with widgets! 49 57 ; 50 ; @history Sebastien Masson (smasson @lodyc.jussieu.fr)58 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 51 59 ; 21/10/1999 52 60 ; 53 ; @version $I D$61 ; @version $Id$ 54 62 ; 55 63 ;- -
trunk/SRC/Utilities/routine_name.pro
r134 r136 4 4 ;+ 5 5 ; 6 ; @file_comments 6 ; @file_comments 7 7 ; Give us the name of the routine (procedure or function) where we are. 8 8 ; 9 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. 10 ; 11 ; @param pilingnum {in}{optional} 12 ; A whole number which give us how many level we have to reascend 13 ; in the piling up of routines and subroutines to find the looked for routine. 13 14 ; 14 15 ; 15 ; @returns a string giving either the full name of the routine (with the path) or '$MAIN$' 16 ; @returns 17 ; a string giving either the full name of the routine (with the path) or 18 ; '$MAIN$' 16 19 ; 17 ; @restriction This function use the keyword OUTPUT in help.pro and it is specified 18 ; in the online help that the return syntax of this word can change in 19 ; function of the version of the code. This version works with IDL 5.2. 20 ; @restrictions 21 ; This function use the keyword OUTPUT in help.pro and it is specified 22 ; in the online help that the return syntax of this word can change in 23 ; function of the version of the code. This version works with IDL 5.2. 20 24 ; 21 ; @example IDL> print, routine_name() 25 ; @examples 26 ; IDL> print, routine_name() 22 27 ; /usr1/com/smasson/IDL_RD/UTILITAIRE/report.pro 23 28 ; IDL> print, routine_name(1) … … 30 35 ; $MAIN$ 31 36 ; 32 ; @history Sebastien Masson (smasson @lodyc.jussieu.fr)37 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 33 38 ; 21/10/1999 34 39 ; … … 45 50 ; 46 51 help, /traceback, output = name 47 name = strtrim(name, 1) ; we remove blanks at the beginning of lines and 48 ; we put elements of the vector stuck ones with 52 name = strtrim(name, 1) ; we remove blanks at the beginning of lines and 53 ; we put elements of the vector stuck ones with 49 54 ; each others to make an unique string. 50 55 allnames = '' 51 56 for i = 0, n_elements(name)-1 do allnames = allnames+name[i] 52 57 ; 53 name = str_sep(allnames, '%') ; we cut it out again. 58 name = str_sep(allnames, '%') ; we cut it out again. 54 59 name = strtrim(name, 2) ; we remouve blanks in front of and behind 55 60 name = strcompress(name) ; we compress blanks 56 ; we do not hold back the two first elements who are a blanck and the line concerning 57 ; routine_name. 61 ; we do not hold back the two first elements who are a blanck and the line concerning 62 ; routine_name. 58 63 name = name[2: n_elements(name)-1] 59 64 ; we choose the line which concern us. -
trunk/SRC/Utilities/testvar.pro
r134 r136 5 5 ; 6 6 ; @file_comments 7 ; A 7 ; A kind of keyword_set but when the value exist, it send it back 8 8 ; 9 9 ; @categories utlities 10 10 ; 11 ; @keyword var any kind of 11 ; @keyword var 12 ; any kind of 12 13 ; 13 ; @returns 0 if the variable does not exist 14 ; @returns 15 ; 0 if the variable does not exist 14 16 ; 15 ; @examples IDL> print, testvar(var=toto) 16 ; 0 17 ; IDL> print, testvar(var='toto') 18 ; toto 17 ; @examples 18 ; IDL> print, testvar(var=toto) 19 ; 0 20 ; IDL> print, testvar(var='toto') 21 ; toto 19 22 ; 20 23 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) -
trunk/SRC/Utilities/text_box.pro
r134 r136 5 5 ; area in a graphics window. The message may be split at word 6 6 ; boundaries into several lines, and the character size and 7 ;orientation may be adjusted for the text to fit within the box.7 ; orientation may be adjusted for the text to fit within the box. 8 8 ; 9 ; @param TEXT {in}{required} ASCII text string containing the message. 9 ; @param TEXT {in}{required} 10 ; ASCII text string containing the message. 10 11 ; 11 ; @keyword pos 4 element vector specifying the box position and size 12 ; pos[0],pos[1] specify the lower left corner coordinate 13 ; pos[2],pos[3] specify the upper right corner coordinate 14 ; data window normalized coordinates are use 12 ; @keyword pos 13 ; 4 element vector specifying the box position and size 14 ; pos[0],pos[1] specify the lower left corner coordinate 15 ; pos[2],pos[3] specify the upper right corner coordinate 16 ; data window normalized coordinates are use 15 17 ; 16 ; @keyword fg_color color of box and legend titles (default=0) 18 ; @keyword fg_color 19 ; color of box and legend titles (default=0) 17 20 ; 18 ; @keyword bg_color background color. Setting BG_COLOR erases the area 21 ; @keyword bg_color 22 ; background color. Setting BG_COLOR erases the area 19 23 ; covered by the text box (filling it with color BG_COLOR) 20 24 ; prior to writing the text. If both BG_COLOR and !p.color … … 22 26 ; gaurantee a readability. 23 27 ; 24 ; @keyword right if set, right justify text 28 ; @keyword right 29 ; if set, right justify text 25 30 ; 26 ; @keyword center if set, center the text 31 ; @keyword center 32 ; if set, center the text 27 33 ; 28 ; @keyword vert_space {default=1.5}vertical spacing of lines in units of character height 34 ; @keyword vert_space {default=1.5} 35 ; vertical spacing of lines in units of character height 29 36 ; 30 ; @keyword _EXTRA used to pass your keyword 37 ; @keyword _EXTRA 38 ; used to pass your keyword 31 39 ; 32 ; @keyword box activate to show the box on graphics window. 40 ; @keyword box 41 ; activate to show the box on graphics window. 33 42 ; 34 43 ; @history Paul Ricchiazzi 7Jul93 -
trunk/SRC/Utilities/undefine.pro
r134 r136 11 11 ; @categories utilities 12 12 ; 13 ; @param varname {in}{required} The name of the variable we want erase 13 ; @param varname {in}{required} 14 ; The name of the variable we want erase 14 15 ; 15 ; @example IDL> a=1 16 ; IDL> undefine,a 17 ; % Compiled module: UNDEFINE. 18 ; IDL> help, a 19 ; A UNDEFINED = <Undefined> 16 ; @examples 17 ; IDL> a=1 18 ; IDL> undefine,a 19 ; % Compiled module: UNDEFINE. 20 ; IDL> help, a 21 ; A UNDEFINED = <Undefined> 20 22 ; 21 23 ; @history trouve sur la page web de D.Fanning … … 27 29 ;from Andrew Cool at the DSTO High Frequency Radar Division in 28 30 ;Adelaide, Australia. 31 ; 32 ; @version $Id$ 29 33 ; 30 34 ;- -
trunk/SRC/Utilities/xfile.pro
r134 r136 6 6 ; @file_comments 7 7 ; display in a widget an ASCII file. 8 ; It is the same thing that xdisplay dife but here, we use it8 ; It is the same thing that xdisplayfile but here, we use it 9 9 ; to display the content of a procedure or of a function, 10 10 ; even if it is not in the current directory (thanks to the path). … … 12 12 ; @categories utilities 13 13 ; 14 ; @param filename {in}{required} It is the name of the procedure or of the function 15 ; we want to display (with or without .pro at the end). 14 ; @param filename {in}{required} 15 ; It is the name of the procedure or of the function 16 ; we want to display (with or without .pro at the end). 16 17 ; 17 ; @keyword _extra used to pass your keywords 18 ; @keyword _extra 19 ; used to pass your keywords 18 20 ; 19 21 ; @examples xfile,'plt' 20 22 ; 21 ; @history Sebastien Masson (smasson @lodyc.jussieu.fr)23 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 22 24 ; 7/1/99 23 ; 6/7/1999: compatibilit e mac etwindows25 ; 6/7/1999: compatibility mac and windows 24 26 ; 25 27 ; @version $Id$ -
trunk/SRC/Utilities/xhelp.pro
r134 r136 6 6 ; @categories Widgets. 7 7 ; 8 ; @param Filename {in}{required} A scalar string that contains the filename of the file9 ; to display. If FILENAME does not include a complete path10 ; specification, xhelp will search for the file in11 ; 12 ; 13 ; 8 ; @param Filename {in}{required} 9 ; A scalar string that contains the filename of the file to display. 10 ; If FILENAME does not include a complete path specification, xhelp will 11 ; search for the file in the current working directory and then each of the 12 ; directories listed in !PATH environment variable. The 13 ; ".pro" file suffix will be appended if it is not supplied. 14 14 ; 15 ; @keyword _extra used to pass your keywords 15 ; @keyword _extra 16 ; used to pass your keywords 16 17 ; 17 ; @restrictions Triggers the XMANAGER if it is not already in use. 18 ; @restrictions 19 ; Triggers the XMANAGER if it is not already in use. 18 20 ; 19 ; @examples Open a file and create a widget to display its contents. 21 ; @examples 22 ; Open a file and create a widget to display its contents. 20 23 ; 21 24 ; @history Written By Steve Richards, December 1990 … … 27 30 ; 7/1/99 : legeres mofification par Sebastien Masson : utilisation de 28 31 ; xdisplayfile, de findfile et de _extra. 29 ; 6/7/1999: compatibilit e mac etwindows32 ; 6/7/1999: compatibility mac and windows 30 33 ; 31 34 ; @version $Id$ … … 59 62 pfile = [current, multipath]+ pfile 60 63 ENDIF 61 ; We test each possi le name to find where the file is.64 ; We test each possible name to find where the file is. 62 65 nfile=n_elements(pfile) 63 66 n = 0
Note: See TracChangeset
for help on using the changeset viewer.