Changeset 11 for trunk/ToBeReviewed
- Timestamp:
- 04/27/06 11:05:35 (18 years ago)
- Location:
- trunk/ToBeReviewed/UTILITAIRE
- Files:
-
- 1 added
- 14 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ToBeReviewed/UTILITAIRE/fitintobox.pro
r9 r11 5 5 ; NAME:fitintobox 6 6 ; 7 ; PURPOSE:verifie qu''un tableau correspond bien au domaine 4d 8 ; specifie lors du dernier domdef et pat jpt. 7 ; PURPOSE: check that the input array has size and dimensions 8 ; compatible with the domain that was defined with the previous call 9 ; of domdef. 9 10 ; 10 ; CATEGORY: pour les debuts de noumbreux programme (blindage)11 ; CATEGORY: domain compatibility 11 12 ; 12 ; CALLING SEQUENCE:res=fitintobox(field) 13 ; CALLING SEQUENCE: 14 ; res = fitintobox(field[, nx, ny, nz, firstx, firsty, firstz 15 ; , lastx, lasty, lastz]) 13 16 ; 14 ; INPUTS:field un tableau ou une structure verifiant les 15 ; caracteristiques speficfies ds litchamp.pro 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 16 26 ; 17 ; KEYWORD PARAMETERS: 27 ; OUTPUTS: an array with dimensions matching the domain 28 ; or -1 if there is an error... 18 29 ; 19 ; OUTPUTS:un tableau a la taille du domaine 4d. 20 ; 21 ; COMMON BLOCKS:common.pro 30 ; COMMON BLOCKS: cm_4mesh and cm_4cal 22 31 ; 23 32 ; SIDE EFFECTS: 24 33 ; 25 ; RESTRICTIONS:utilise pour se reperer dans l''espace les variables 26 ; globales jpi,jpj,jpk,premier...,dernier...,nx...,ny...,nz,... 27 ; pour differencier un tableau 3d xyz d''un tableau 3d xyt, on utilise 28 ; jpt qui doit etre egale a 1 ds le cas xyz et different de 1 dans 29 ; l''autre cas. 34 ; RESTRICTIONS: 30 35 ; 31 36 ; EXAMPLE: 32 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 ; 33 47 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 34 48 ; 10 juin 2000. 49 ; June 2005: S. Masson rewrite all. 35 50 ;- 36 51 ;------------------------------------------------------------ 37 52 ;------------------------------------------------------------ 38 53 ;------------------------------------------------------------ 39 FUNCTION fitintobox, field 40 @common 54 FUNCTION err_mess, sz, jpi, nx, jpj, ny, jpk, nz, jpt 55 IF n_elements(sz EQ 1) THEN $ 56 RETURN, report(['Error: ' $ 57 , 'the vector size (' + tostr(sz) + ') is incompatible' $ 58 , 'with the the domain dimensions ' $ 59 , '[jpi/nx, jpj/ny, jpk/nz, jpt] = [' $ 60 + strtrim(jpi, 1) + '/' + strtrim(nx, 1) $ 61 + ', ' + strtrim(jpj, 1) + '/' + strtrim(ny, 1) $ 62 + ', ' + strtrim(jpk, 1) + '/' + strtrim(nz, 1) $ 63 + ', ' + strtrim(jpt, 1) + ']'], /simple) 64 RETURN, report(['Error: ' $ 65 , 'the array dimensions ' + tostr(sz) + ' are incompatible' $ 66 , 'with the the domain dimensions ' $ 67 , '[jpi/nx, jpj/ny, jpk/nz, jpt] = [' $ 68 + strtrim(jpi, 1) + '/' + strtrim(nx, 1) $ 69 + ', ' + strtrim(jpj, 1) + '/' + strtrim(ny, 1) $ 70 + ', ' + strtrim(jpk, 1) + '/' + strtrim(nz, 1) $ 71 + ', ' + strtrim(jpt, 1) + ']'], /simple) 72 END 73 ;------------------------------------------------------------ 74 FUNCTION fitintobox, field, nx, ny, nz, firstx, firsty $ 75 , firstz, lastx, lasty, lastz, WDEPTH = wdepth 76 ;------------------------------------------------------------ 77 ; include commons 78 @cm_4mesh 79 @cm_4cal 80 IF NOT keyword_set(key_forgetold) THEN BEGIN 81 @updatenew 82 ENDIF 41 83 ;--------------------- 42 array = litchamp(field) 43 grille, mask, glam, gphi, gdep, nx, ny,nz,premierx,premiery,premierz,dernierx, derniery, dernierz 84 arr = litchamp(field) 85 IF n_params() EQ 1 THEN grille, -1, -1, -1, -1, nx, ny, nz $ 86 , firstx, firsty, firstz, lastx, lasty, lastz, WDEPTH = wdepth 87 ;-------------------------------------------------------------- 88 ;-------------------------------------------------------------- 89 ; case according the number of dimensions of the array 90 ;-------------------------------------------------------------- 91 ;-------------------------------------------------------------- 92 sz = size(arr) 93 case sz[0] of 94 ;-------------------------------------------------------------- 95 0:BEGIN ; scalar 96 ;-------------------------------------------------------------- 97 return, report('Error: scalar value = ' + strtrim(arr, 1), /simple) 98 END 99 ;-------------------------------------------------------------- 100 1:BEGIN ; 1D arrays 101 ;-------------------------------------------------------------- 102 CASE 1 OF 103 ; x arrays 104 sz[1] EQ jpi :arr = (temporary(arr))[firstx:lastx ] 105 sz[1] EQ nx : 106 ; y arrays 107 sz[1] EQ jpj :arr = (temporary(arr))[ firsty:lasty ] 108 sz[1] EQ ny : 109 ; z arrays 110 sz[1] EQ jpk :arr = (temporary(arr))[ firstz:lastz ] 111 sz[1] EQ nz : 112 ; t arrays 113 sz[1] EQ jpt : 114 ELSE:return, err_mess(sz[1], jpi, nx, jpj, ny, jpk, nz, jpt) 115 ENDCASE 116 END 117 ;-------------------------------------------------------------- 118 2:BEGIN ; 2D arrays 119 ;-------------------------------------------------------------- 120 CASE 1 OF 121 ; xy arrays 122 sz[1] EQ jpi AND sz[2] EQ jpj :arr = (temporary(arr))[firstx:lastx, firsty:lasty ] 123 sz[1] EQ jpi AND sz[2] EQ ny :arr = (temporary(arr))[firstx:lastx, * ] 124 sz[1] EQ nx AND sz[2] EQ jpj :arr = (temporary(arr))[ *, firsty:lasty ] 125 sz[1] EQ nx AND sz[2] EQ ny :arr = (temporary(arr))[ *, * ] 126 ; x(y)z arrays 127 sz[1] EQ jpi AND ny EQ 1 AND sz[2] EQ jpk :arr = (temporary(arr))[firstx:lastx, firstz:lastz ] 128 sz[1] EQ jpi AND ny EQ 1 AND sz[2] EQ nz :arr = (temporary(arr))[firstx:lastx, * ] 129 sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ jpk :arr = (temporary(arr))[ *, firstz:lastz ] 130 sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ nz : 131 ; (x)yz arrays 132 nx EQ 1 AND sz[1] EQ jpj AND sz[2] EQ jpk :arr = (temporary(arr))[ firsty:lasty, firstz:lastz ] 133 nx EQ 1 AND sz[1] EQ jpj AND sz[2] EQ nz :arr = (temporary(arr))[ firsty:lasty, * ] 134 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ jpk :arr = (temporary(arr))[ *, firstz:lastz ] 135 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz : 136 ; xt arrays 137 sz[1] EQ jpi AND sz[2] EQ jpt:arr = (temporary(arr))[firstx:lastx , *] 138 sz[1] EQ nx AND sz[2] EQ jpt: 139 ; yt arrays 140 sz[1] EQ jpj AND sz[2] EQ jpt:arr = (temporary(arr))[ firsty:lasty , *] 141 sz[1] EQ ny AND sz[2] EQ jpt: 142 ; zt arrays 143 sz[1] EQ jpk AND sz[2] EQ jpt:arr = (temporary(arr))[ firstz:lastz, *] 144 sz[1] EQ nz AND sz[2] EQ jpt: 145 ELSE:return, err_mess(sz[1:2], jpi, nx, jpj, ny, jpk, nz, jpt) 146 ENDCASE 147 END 148 ;-------------------------------------------------------------- 149 3:BEGIN ; 3D arrays 150 ;-------------------------------------------------------------- 151 CASE 1 OF 152 ; xyz arrays 153 sz[1] EQ jpi AND sz[2] EQ jpj AND sz[3] EQ jpk :arr = (temporary(arr))[firstx:lastx, firsty:lasty, firstz:lastz ] 154 sz[1] EQ jpi AND sz[2] EQ ny AND sz[3] EQ jpk :arr = (temporary(arr))[firstx:lastx, *, firstz:lastz ] 155 sz[1] EQ nx AND sz[2] EQ jpj AND sz[3] EQ jpk :arr = (temporary(arr))[ *, firsty:lasty, firstz:lastz ] 156 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpk :arr = (temporary(arr))[ *, *, firstz:lastz ] 157 sz[1] EQ jpi AND sz[2] EQ jpj AND sz[3] EQ nz :arr = (temporary(arr))[firstx:lastx, firsty:lasty, * ] 158 sz[1] EQ jpi AND sz[2] EQ ny AND sz[3] EQ nz :arr = (temporary(arr))[firstx:lastx, *, * ] 159 sz[1] EQ nx AND sz[2] EQ jpj AND sz[3] EQ nz :arr = (temporary(arr))[ *, firsty:lasty, * ] 160 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ nz : 161 ; xyt arrays 162 sz[1] EQ jpi AND sz[2] EQ jpj AND sz[3] EQ jpt:arr = (temporary(arr))[firstx:lastx, firsty:lasty, *] 163 sz[1] EQ jpi AND sz[2] EQ ny AND sz[3] EQ jpt:arr = (temporary(arr))[firstx:lastx, *, *] 164 sz[1] EQ nx AND sz[2] EQ jpj AND sz[3] EQ jpt:arr = (temporary(arr))[ *, firsty:lasty, *] 165 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpt: 166 ; (x)yzt arrays 167 nx EQ 1 AND sz[1] EQ jpj AND sz[2] EQ jpk AND sz[3] EQ jpt:arr = (temporary(arr))[ firsty:lasty, firstz:lastz, *] 168 nx EQ 1 AND sz[1] EQ jpj AND sz[2] EQ nz AND sz[3] EQ jpt:arr = (temporary(arr))[ firsty:lasty, *, *] 169 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ jpk AND sz[3] EQ jpt:arr = (temporary(arr))[ *, firstz:lastz, *] 170 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt: 171 ; x(y)zt arrays 172 sz[1] EQ jpi AND ny EQ 1 AND sz[2] EQ jpk AND sz[3] EQ jpt:arr = (temporary(arr))[firstx:lastx, firstz:lastz, *] 173 sz[1] EQ jpi AND ny EQ 1 AND sz[2] EQ nz AND sz[3] EQ jpt:arr = (temporary(arr))[firstx:lastx, *, *] 174 sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ jpk AND sz[3] EQ jpt:arr = (temporary(arr))[ *, firstz:lastz, *] 175 sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ nz AND sz[3] EQ jpt: 176 ELSE:return, err_mess(sz[1:3], jpi, nx, jpj, ny, jpk, nz, jpt) 177 ENDCASE 178 END 179 ;-------------------------------------------------------------- 180 4:BEGIN ; 4D arrays 181 ;-------------------------------------------------------------- 182 CASE 1 OF 183 ; xyzt arrays 184 sz[1] EQ jpi AND sz[2] EQ jpj AND sz[3] EQ jpk AND sz[4] EQ jpt:arr = (temporary(arr))[firstx:lastx, firsty:lasty, firstz:lastz, *] 185 sz[1] EQ jpi AND sz[2] EQ ny AND sz[3] EQ jpk AND sz[4] EQ jpt:arr = (temporary(arr))[firstx:lastx, *, firstz:lastz, *] 186 sz[1] EQ nx AND sz[2] EQ jpj AND sz[3] EQ jpk AND sz[4] EQ jpt:arr = (temporary(arr))[ *, firsty:lasty, firstz:lastz, *] 187 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpk AND sz[4] EQ jpt:arr = (temporary(arr))[ *, *, firstz:lastz, *] 188 sz[1] EQ jpi AND sz[2] EQ jpj AND sz[3] EQ nz AND sz[4] EQ jpt:arr = (temporary(arr))[firstx:lastx, firsty:lasty, *, *] 189 sz[1] EQ jpi AND sz[2] EQ ny AND sz[3] EQ nz AND sz[4] EQ jpt:arr = (temporary(arr))[firstx:lastx, *, *, *] 190 sz[1] EQ nx AND sz[2] EQ jpj AND sz[3] EQ nz AND sz[4] EQ jpt:arr = (temporary(arr))[ *, firsty:lasty, *, *] 191 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ nz AND sz[4] EQ jpt: 192 ELSE:return, err_mess(sz[1:4], jpi, nx, jpj, ny, jpk, nz, jpt) 193 ENDCASE 194 END 195 ELSE:return, report('Error: fitintobox is managing arrays with a maximum of 4 dimensions', /simple) 196 ENDCASE 44 197 45 ;--------------------- 46 taille=size(array) 47 case 1 of 48 ;---------------------------------------------------------------------------- 49 ;xy 50 ;---------------------------------------------------------------------------- 51 taille[0] EQ 2:BEGIN 52 case 1 of 53 taille[1] eq nx and taille[2] eq ny: 54 taille[1] eq jpi and taille[2] eq jpj:array=array[premierx:dernierx, premiery:derniery] 55 else:return, report('Probleme d''adequation entre les tailles !C du domaine nx*ny '+strtrim(nx, 1)+'*'+strtrim(ny, 1)+' !C et du tableau '+strtrim(taille[1], 1)+'*'+strtrim(taille[2], 1)) 56 endcase 57 END 58 ;---------------------------------------------------------------------------- 59 ;xyz 60 ;---------------------------------------------------------------------------- 61 taille[0] EQ 3 AND jpt EQ 1:BEGIN 62 case 1 of 63 taille[1] eq nx and taille[2] eq ny and taille[3] eq nz: 64 taille[1] eq nx and taille[2] eq ny and taille[3] eq jpk: $ 65 array=array[*, *, premierz:dernierz] 66 taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpk: $ 67 array=array[premierx:dernierx, premiery:derniery, premierz:dernierz] 68 taille[1] eq nx and taille[2] eq ny and taille[3] eq jpk: $ 69 array=array[premierx:dernierx, premiery:derniery, *] 70 else:return, report('Probleme d''adequation entre les tailles !C du domaine nx*ny*nz '+strtrim(nx, 1)+'*'+strtrim(ny, 1)+'*'+strtrim(nz, 1)+' !C et du tableau '+strtrim(taille[1], 1)+'*'+strtrim(taille[2], 1)+'*'+strtrim(taille[3], 1)) 71 endcase 72 END 73 ;---------------------------------------------------------------------------- 74 ;xyt 75 ;---------------------------------------------------------------------------- 76 taille[0] EQ 3 AND jpt NE 1:BEGIN 77 case 1 of 78 taille[1] eq nx and taille[2] eq ny AND taille[3] eq jpt: 79 taille[1] eq jpi and taille[2] eq jpj AND taille[3] eq jpt:array=array[premierx:dernierx, premiery:derniery, *] 80 else:return, report('Probleme d''adequation entre les tailles !C du domaine nx*ny*jpt '+strtrim(nx, 1)+'*'+strtrim(ny, 1)+'*'+strtrim(jpt, 1)+'!C et du tableau '+strtrim(taille[1], 1)+'*'+strtrim(taille[2], 1)+'*'+strtrim(taille[3], 1)) 81 endcase 82 END 83 ;---------------------------------------------------------------------------- 84 ;xyzt 85 ;---------------------------------------------------------------------------- 86 taille[0] EQ 4:BEGIN 87 case 1 of 88 taille[1] eq nx and taille[2] eq ny and taille[3] eq nz AND taille[4] eq jpt: 89 taille[1] eq nx and taille[2] eq ny and taille[3] eq jpk AND taille[4] eq jpt: $ 90 array=array[*, *, premierz:dernierz, *] 91 taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpk AND taille[4] eq jpt: $ 92 array=array[premierx:dernierx, premiery:derniery, premierz:dernierz, *] 93 taille[1] eq nx and taille[2] eq ny and taille[3] eq jpk AND taille[4] eq jpt: $ 94 array=array[premierx:dernierx, premiery:derniery, *, *] 95 else:return, report('Probleme d''adequation entre les tailles !C du domainenx*ny*nz*jpt '+strtrim(nx, 1)+'*'+strtrim(ny, 1)+'*'+strtrim(nz, 1)+'*'+strtrim(jpt, 1)+' !C et du tableau '+strtrim(taille[1], 1)+'*'+strtrim(taille[2], 1)+'*'+strtrim(taille[3], 1)+'*'+strtrim(taille[4], 1)) 96 endcase 97 END 98 endcase 99 ;---------------------------------------------------------------------------- 100 101 102 return, array 198 return, arr 103 199 end -
trunk/ToBeReviewed/UTILITAIRE/oups.pro
r9 r11 32 32 journal 33 33 ; on recupere le journal sous la forme d''un vecteur de string: 34 vectjournal = getfile( homedir+'idlsave.pro')34 vectjournal = getfile(myuniquetmpdir+'idlsave.pro') 35 35 ; on coupe la derniere ligne qui est oups 36 36 vectjournal = vectjournal[0:n_elements(vectjournal)-2 ] … … 68 68 ELSE vectjournal[n_elements(vectjournal)-1] = '' 69 69 ; on reecrit idlsave.pro 70 putfile, homedir+'idlsave.pro', vectjournal70 putfile, myuniquetmpdir+'idlsave.pro', vectjournal 71 71 ; on compile puis applique idlsave 72 cd, homedir 72 cd, current = curdir 73 cd, myuniquetmpdir 73 74 @idlsave 75 cd, curdir 74 76 ; le journal vient d'etre reouvert, et on y met les elements de 75 77 ; vectjournal 76 78 for i = 0, n_elements(vectjournal)-1 DO $ 77 printf, !journal, vectjournal[i]79 journal, vectjournal[i] 78 80 79 81 -
trunk/ToBeReviewed/UTILITAIRE/report.pro
r9 r11 18 18 ; array element is displayed as a separate line of text. 19 19 ; 20 ; KEYWORD PARAMETERS: ceux dialog_message.pro et message.pro avec en + 20 ; KEYWORD PARAMETERS: 21 ; SIMPLE: activate to print only the message without the name 22 ; and the line of the routine (defined by calling routine_name) 23 ; 24 ; ceux dialog_message.pro et message.pro avec en + 21 25 ; PARENT qui fait la meme chose que DIALOG_PARENT de dialog_message.pro 22 26 ; … … 55 59 ;------------------------------------------------------------ 56 60 ;------------------------------------------------------------ 57 FUNCTION report, text, DEFAULT_NO = default_no, PARENT = parent, QUESTION = question, _extra = ex61 FUNCTION report, text, DEFAULT_NO = default_no, PARENT = parent, QUESTION = question, SIMPLE = simple, _extra = ex 58 62 res = -1 ; 59 ; on separe le text en differentes lignes (separees par !C) si ce63 ; on separe le texte en differentes lignes (separees par !C) si ce 60 64 ; n''est pas deja fait... 61 65 if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim) … … 89 93 endif ELSE BEGIN 90 94 ; si on ne pose pas de question on fait juste un print 95 IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': ' 91 96 if n_elements(text) GT 1 THEN $ 92 for i = 0, n_elements(text)-2 do print, '% '+routine_name(1)+': '+text[i]93 print, '% '+routine_name(1)+': '+text[n_elements(text)-1]97 for i = 0, n_elements(text)-2 do print, prefix+text[i] 98 print, prefix+text[n_elements(text)-1] 94 99 ENDELSE 95 100 ENDELSE -
trunk/ToBeReviewed/UTILITAIRE/routine_name.pro
r9 r11 52 52 FUNCTION routine_name, remonte 53 53 ; 54 version=strmid(!version.release,0,3) 55 if version EQ '5.2' OR version EQ '5.3' OR version EQ '5.4' OR version EQ '5.5' OR version EQ '5.6' then begin 56 help, /traceback, output = name 57 name = strtrim(name, 1) ; on enleve les blancs en debut de ligne 58 ; on vat mettre les elements du vecteur bout a bout pour former un 54 help, /traceback, output = name 55 name = strtrim(name, 1) ; on enleve les blancs en debut de ligne 56 ; on va mettre les elements du vecteur bout a bout pour former un 59 57 ; unique sring 60 61 58 allnames = '' 59 for i = 0, n_elements(name)-1 do allnames = allnames+name[i] 62 60 ; 63 64 name = strtrim(name, 2); on eleve les blancs devant et derriere65 name = strcompress(name); on compresse les blancs61 name = str_sep(allnames, '%') ; on le redecoupe 62 name = strtrim(name, 2) ; on eleve les blancs devant et derriere 63 name = strcompress(name) ; on compresse les blancs 66 64 ; on ne retient pas les 2 premiers elements qui sont 1 un vide et la 67 65 ; ligne concernant routine_name 68 66 name = name[2: n_elements(name)-1] 69 67 ; on choisit la ligne qui nous concerne 70 if NOT keyword_set(remonte) then remonte = 0 71 if remonte GE n_elements(name) then return, '$MAIN$' 72 name = name[remonte] 73 if strpos(name, '$MAIN$') NE -1 then return, '$MAIN$' 74 name = str_sep(name, ' ') 75 if n_elements(name) LT 3 then name = name[0] ELSE name = 'L.'+name[1]+' '+name[2] 76 ENDIF ELSE BEGIN 77 print, 'attention la fonction routine_name a ete ecrite pour les versions: IDL 5.2, IDL 5.2.1, 5.3 ou 5.4. ou 5.4.1 ou 5.5 ou 5.6 Verifier qu''elle marche bien avec la version '+!version.release 78 return, 'Error' 79 ENDELSE 80 return, name 68 if NOT keyword_set(remonte) then remonte = 0 69 if remonte GE n_elements(name) then return, '$MAIN$' 70 name = name[remonte] 71 if strpos(name, '$MAIN$') NE -1 then return, '$MAIN$' 72 name = str_sep(name, ' ') 73 if n_elements(name) LT 3 then name = name[0] ELSE name = 'L.'+name[1]+' '+name[2] 74 ; 75 return, name 81 76 end -
trunk/ToBeReviewed/UTILITAIRE/vzoom.pro
r9 r11 30 30 y = [y1, y2] 31 31 y = y[sort(y)] 32 domdef, [x, y, prof1, prof2]32 domdef, [x, y, vert1, vert2] 33 33 ; il faut fermer le journal! 34 34 journal 35 35 ; on recupere le journal sous la forme d''un vecteur de string: 36 vectjournal = getfile( homedir+'idlsave.pro')36 vectjournal = getfile(myuniquetmpdir+'idlsave.pro') 37 37 ; on coupe la derniere ligne qui est vraizoom 38 38 vectjournal = vectjournal[0:n_elements(vectjournal)-2 ] … … 66 66 ; 67 67 ; on reecrit idlsave.pro 68 putfile, homedir+'idlsave.pro', vectjournal68 putfile, myuniquetmpdir+'idlsave.pro', vectjournal 69 69 ; applique idlsave 70 cd, homedir 70 cd, current = curdir 71 cd, myuniquetmpdir 71 72 @idlsave 73 cd, curdir 72 74 ; le journal vient d'etre reouvert, et on y met les elements de 73 75 ; vectjournal 74 76 for i = 0, n_elements(vectjournal)-1 DO $ 75 printf, !journal, vectjournal[i]77 journal, vectjournal[i] 76 78 77 79
Note: See TracChangeset
for help on using the changeset viewer.