Changeset 114 for trunk/SRC/ToBeReviewed
- Timestamp:
- 06/19/06 16:14:56 (18 years ago)
- Location:
- trunk/SRC/ToBeReviewed
- Files:
-
- 218 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/curl.pro
r25 r114 58 58 ;------------------------------------------------------------ 59 59 FUNCTION curl, uu, vv 60 ; 61 compile_opt idl2, strictarrsubs 62 ; 60 63 @common 61 64 tempsun = systime(1) ; pour key_performance … … 142 145 ;------------------------------------------------------------ 143 146 if NOT keyword_set(key_periodic) OR nx NE jpi then begin 144 psi (0, *, *)= !values.f_nan145 psi (nx-1, *, *)= !values.f_nan147 psi[0, *, *] = !values.f_nan 148 psi[nx-1, *, *] = !values.f_nan 146 149 endif 147 psi (*, 0, *)= !values.f_nan148 psi (*, ny-1, *)= !values.f_nan150 psi[*, 0, *] = !values.f_nan 151 psi[*, ny-1, *] = !values.f_nan 149 152 ; 150 153 if n_elements(valmask) EQ 0 THEN valmask = 1e20 … … 222 225 ;------------------------------------------------------------ 223 226 if NOT keyword_set(key_periodic) OR nx NE jpi then begin 224 psi (0, *, *)= !values.f_nan225 psi (nx-1, *, *)= !values.f_nan227 psi[0, *, *] = !values.f_nan 228 psi[nx-1, *, *] = !values.f_nan 226 229 endif 227 psi (*, 0, *)= !values.f_nan228 psi (*, ny-1, *)= !values.f_nan230 psi[*, 0, *] = !values.f_nan 231 psi[*, ny-1, *] = !values.f_nan 229 232 if n_elements(valmask) EQ 0 THEN valmask = 1e20 230 233 terref = where(tabf EQ 0) … … 295 298 ;------------------------------------------------------------ 296 299 if NOT keyword_set(key_periodic) OR nx NE jpi then begin 297 psi (0, *)= !values.f_nan298 psi (nx-1, *)= !values.f_nan300 psi[0, *] = !values.f_nan 301 psi[nx-1, *] = !values.f_nan 299 302 endif 300 psi (*, 0)= !values.f_nan301 psi (*, ny-1)= !values.f_nan303 psi[*, 0] = !values.f_nan 304 psi[*, ny-1] = !values.f_nan 302 305 ; 303 306 if n_elements(valmask) EQ 0 THEN valmask = 1e20 -
trunk/SRC/ToBeReviewed/CALCULS/depth2floatlevel.pro
r25 r114 42 42 ;------------------------------------------------------------ 43 43 FUNCTION depth2floatlevel, tab, NOMASK = nomask 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 tempsun = systime(1) ; pour key_performance 45 48 @common -
trunk/SRC/ToBeReviewed/CALCULS/depth2level.pro
r25 r114 50 50 FUNCTION depth2level, tab, LOWER = lower, UPPER = upper, CLOSER = closer $ 51 51 , NOMASK = nomask, _extra = ex 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 tempsun = systime(1) ; pour key_performance 53 56 @common -
trunk/SRC/ToBeReviewed/CALCULS/depth2mask.pro
r25 r114 47 47 FUNCTION depth2mask, tab, _extra = ex 48 48 ;------------------------------------------------------------ 49 ; 50 compile_opt idl2, strictarrsubs 51 ; 49 52 tempsun = systime(1) ; pour key_performance 50 53 @common -
trunk/SRC/ToBeReviewed/CALCULS/determ2.pro
r25 r114 33 33 ;- 34 34 FUNCTION determ2, a, b, c, d 35 ; 36 compile_opt idl2, strictarrsubs 37 ; 35 38 CASE n_params() OF 36 39 1:res = a[0, 0, *]*a[1, 1, *]-a[0, 1, *]*a[1, 0, *] -
trunk/SRC/ToBeReviewed/CALCULS/determ3.pro
r25 r114 38 38 ;- 39 39 FUNCTION determ3, in00, in01, in02, in10, in11, in12, in20, in21, in22 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 IF n_params() EQ 1 THEN BEGIN 41 44 in00save = temporary(in00) -
trunk/SRC/ToBeReviewed/CALCULS/div.pro
r25 r114 54 54 ;------------------------------------------------------------ 55 55 FUNCTION div, uu, vv 56 ; 57 compile_opt idl2, strictarrsubs 58 ; 56 59 tempsun = systime(1) ; pour key_performance 57 60 @common … … 139 142 ;------------------------------------------------------------ 140 143 if NOT keyword_set(key_periodic) OR nx NE jpi then begin 141 zdiv (0, *, *)= !values.f_nan142 zdiv (nx-1, *, *)= !values.f_nan144 zdiv[0, *, *] = !values.f_nan 145 zdiv[nx-1, *, *] = !values.f_nan 143 146 endif 144 zdiv (*, 0, *)= !values.f_nan145 zdiv (*, ny-1, *)= !values.f_nan147 zdiv[*, 0, *] = !values.f_nan 148 zdiv[*, ny-1, *] = !values.f_nan 146 149 ; 147 150 zdiv = temporary(zdiv) … … 213 216 ;------------------------------------------------------------ 214 217 if NOT keyword_set(key_periodic) OR nx NE jpi then begin 215 zdiv (0, *, *)= !values.f_nan216 zdiv (nx-1, *, *)= !values.f_nan218 zdiv[0, *, *] = !values.f_nan 219 zdiv[nx-1, *, *] = !values.f_nan 217 220 endif 218 zdiv (*, 0, *)= !values.f_nan219 zdiv (*, ny-1, *)= !values.f_nan221 zdiv[*, 0, *] = !values.f_nan 222 zdiv[*, ny-1, *] = !values.f_nan 220 223 ; 221 224 if n_elements(valmask) EQ 0 THEN valmask = 1e20 … … 286 289 ;------------------------------------------------------------ 287 290 if NOT keyword_set(key_periodic) OR nx NE jpi then begin 288 zdiv (0, *)= !values.f_nan289 zdiv (nx-1, *)= !values.f_nan291 zdiv[0, *] = !values.f_nan 292 zdiv[nx-1, *] = !values.f_nan 290 293 endif 291 zdiv (*, 0)= !values.f_nan292 zdiv (*, ny-1)= !values.f_nan294 zdiv[*, 0] = !values.f_nan 295 zdiv[*, ny-1] = !values.f_nan 293 296 ; 294 297 zdiv = temporary(zdiv)*1e6 -
trunk/SRC/ToBeReviewed/CALCULS/floatlevel2depth.pro
r25 r114 40 40 ;------------------------------------------------------------ 41 41 FUNCTION floatlevel2depth, tab, NOMASK = nomask 42 ; 43 compile_opt idl2, strictarrsubs 44 ; 42 45 tempsun = systime(1) ; pour key_performance 43 46 @common -
trunk/SRC/ToBeReviewed/CALCULS/fsfzpt.pro
r97 r114 14 14 ;- 15 15 FUNCTION fsfzpt, pfs, pfp 16 ; 17 compile_opt idl2, strictarrsubs 18 ; 16 19 RETURN, ( -0.0575 + 1.710523e-3 * sqrt(pfs) - 2.154996e-4 * pfs ) * pfs - 7.53e-4 * pfp 17 20 END -
trunk/SRC/ToBeReviewed/CALCULS/grad.pro
r25 r114 32 32 ;------------------------------------------------------------ 33 33 FUNCTION grad, field, direc 34 ; 35 compile_opt idl2, strictarrsubs 36 ; 34 37 @common 35 38 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/CALCULS/grossemoyenne.pro
r25 r114 113 113 , _extra = ex 114 114 ;--------------------------------------------------------- 115 ; 116 compile_opt idl2, strictarrsubs 117 ; 115 118 @cm_4mesh 116 119 @cm_4data … … 613 616 terre = where(divi EQ 0) 614 617 IF terre[0] NE -1 THEN BEGIN 615 res (temporary(terre))= 1e+20618 res[temporary(terre)] = 1e+20 616 619 ENDIF 617 620 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/CALCULS/hdyn.pro
r25 r114 69 69 ;------------------------------------------------------------ 70 70 FUNCTION hdyn, tabsn, tabtn, TREF = tref, SREF = sref, PROFREF = profref, LEVEL = level, GILL = gill, SURFACE_LEVEL = surface_level 71 ; 72 compile_opt idl2, strictarrsubs 73 ; 71 74 tempsun = systime(1) ; pour key_performance 72 75 @common -
trunk/SRC/ToBeReviewed/CALCULS/level2depth.pro
r25 r114 38 38 ;------------------------------------------------------------ 39 39 FUNCTION level2depth, tab, NOMASK = nomask 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 tempsun = systime(1) ; pour key_performance 41 44 @common -
trunk/SRC/ToBeReviewed/CALCULS/level2index.pro
r25 r114 43 43 ; level etant donne, pour chaque points de level on connait i, j et k, 44 44 ; on peut donc calculer l''indice. 45 ; 46 compile_opt idl2, strictarrsubs 47 ; 45 48 taille = size(level) 46 49 nx = taille[1] -
trunk/SRC/ToBeReviewed/CALCULS/level2mask.pro
r25 r114 42 42 FUNCTION level2mask, tab 43 43 ;------------------------------------------------------------ 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 tempsun = systime(1) ; pour key_performance 45 48 @common -
trunk/SRC/ToBeReviewed/CALCULS/moyenne.pro
r25 r114 95 95 , _extra = ex 96 96 ;--------------------------------------------------------- 97 ; 98 compile_opt idl2, strictarrsubs 99 ; 97 100 @cm_4mesh 98 101 @cm_4data … … 575 578 terre = where(divi EQ 0) 576 579 IF terre[0] NE -1 THEN BEGIN 577 res (terre)= 1e+20580 res[terre] = 1e+20 578 581 ENDIF 579 582 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/CALCULS/norme.pro
r25 r114 70 70 FUNCTION norme, composanteu, composantev, BOXZOOM = boxzoom, DIREC = direc, _extra = ex 71 71 ;--------------------------------------------------------- 72 ; 73 compile_opt idl2, strictarrsubs 74 ; 72 75 @cm_4mesh 73 76 @cm_4data … … 197 200 ; construction de u et v aux pts T 198 201 ;----------------------------------------------------------- 199 a=u (0,*,*)202 a=u[0,*,*] 200 203 u=(u+shift(u,1,0,0))/2. 201 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*,*)=a202 a=v (*,0,*)204 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*,*]=a 205 a=v[*,0,*] 203 206 v=(v+shift(v,0,1,0))/2. 204 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0,*)=a207 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*]=a 205 208 ;---------------------------------------------------------------------------- 206 209 ; attribution du mask et des tableau de longitude et latitude … … 215 218 if landv[0] NE -1 then v[landv] = 0 216 219 res=sqrt(u^2+v^2) 217 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*, *)=!values.f_nan218 res (*,0, *)=!values.f_nan220 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*, *]=!values.f_nan 221 res[*,0, *]=!values.f_nan 219 222 mask = where(mask eq 0) 220 IF mask[0] NE -1 THEN res (mask)= valmask223 IF mask[0] NE -1 THEN res[mask] = valmask 221 224 ; moyennes en tous genres 222 225 domdef, (glamt[indice2d])[0, 0], (glamu[indice2d])[nx-1, 0],(gphit[indice2d])[0, 0], (gphiv[indice2d])[0, ny-1], vert1, vert2, /meme … … 257 260 ; construction de u et v aux pts T 258 261 ;----------------------------------------------------------- 259 a=u (0,*,*)262 a=u[0,*,*] 260 263 u=(u+shift(u,1,0,0))/2. 261 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*,*)=a262 a=v (*,0,*)264 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*,*]=a 265 a=v[*,0,*] 263 266 v=(v+shift(v,0,1,0))/2. 264 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0,*)=a267 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*]=a 265 268 ;---------------------------------------------------------------------------- 266 269 ; attribution du mask et des tableau de longitude et latitude … … 280 283 if landv[0] NE -1 then v[landv] = 0 281 284 res=sqrt(u^2+v^2) 282 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*, *)=!values.f_nan283 res (*,0, *)=!values.f_nan285 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*, *]=!values.f_nan 286 res[*,0, *]=!values.f_nan 284 287 mask = where(mask eq 0) 285 288 IF mask[0] NE -1 THEN BEGIN … … 288 291 mask = (temporary(mask))[*]#replicate(1, jpt) 289 292 mask =temporary(mask[*]) + temporary(coeftps[*]) 290 res (temporary(mask))= valmask293 res[temporary(mask)] = valmask 291 294 ENDIF 292 295 ; moyennes en tous genres … … 344 347 ; construction de u et v aux pts T 345 348 ;----------------------------------------------------------- 346 a=u (0,*,*,*)349 a=u[0,*,*,*] 347 350 u=(u+shift(u,1,0,0,0))/2. 348 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*,*,*)=a349 a=v (*,0,*,*)351 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*,*,*]=a 352 a=v[*,0,*,*] 350 353 v=(v+shift(v,0,1,0,0))/2. 351 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0,*,*)=a354 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*,*]=a 352 355 ;---------------------------------------------------------------------------- 353 356 ; attribution du mask et des tableau de longitude et latitude … … 362 365 if landv[0] NE -1 then v[landv] = 0 363 366 res=sqrt(u^2+v^2) 364 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*, *, *)=!values.f_nan365 res (*,0, *, *)=!values.f_nan367 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*, *, *]=!values.f_nan 368 res[*,0, *, *]=!values.f_nan 366 369 mask = where(mask eq 0) 367 370 IF mask[0] NE -1 THEN BEGIN … … 370 373 mask = (temporary(mask))[*]#replicate(1, jpt) 371 374 mask =temporary(mask[*]) + temporary(coeftps[*]) 372 res (temporary(mask))= valmask375 res[temporary(mask)] = valmask 373 376 ENDIF 374 377 ; moyennes en tous genres … … 416 419 ; construction de u et v aux pts T 417 420 ;----------------------------------------------------------- 418 a=u (0,*)421 a=u[0,*] 419 422 u=(u+shift(u,1,0))/2. 420 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*)=a421 a=v (*,0)423 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*]=a 424 a=v[*,0] 422 425 v=(v+shift(v,0,1))/2. 423 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0)=a426 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0]=a 424 427 ;---------------------------------------------------------------------------- 425 428 ; attribution du mask et des tableau de longitude et latitude … … 439 442 if landv[0] NE -1 then v[landv] = 0 440 443 res=sqrt(u^2+v^2) 441 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*)=!values.f_nan442 res (*,0)=!values.f_nan444 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*]=!values.f_nan 445 res[*,0]=!values.f_nan 443 446 mask = where(mask eq 0) 444 IF mask[0] NE -1 THEN res (mask)= valmask447 IF mask[0] NE -1 THEN res[mask] = valmask 445 448 ; moyennes en tous genres 446 449 domdef, (glamt[indice2d])[0, 0], (glamu[indice2d])[nx-1, 0],(gphit[indice2d])[0, 0], (gphiv[indice2d])[0, ny-1], vert1, vert2, /meme -
trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro
r25 r114 53 53 ;------------------------------------------------------------ 54 54 FUNCTION projectondepth, arrayin, depthin 55 ; 56 compile_opt idl2, strictarrsubs 57 ; 55 58 tempsun = systime(1) ; pour key_performance 56 59 @common -
trunk/SRC/ToBeReviewed/CALCULS/remplit.pro
r97 r114 17 17 ;- 18 18 FUNCTION remplit, zinput, NAN = nan, NITER = niter, BASIQUE = basique, mask = mask, FILLXDIR = fillxdir, FILLYDIR = fillydir, FILLVAL = fillval, _extra = ex 19 ; 20 compile_opt idl2, strictarrsubs 21 ; 19 22 @common 20 23 tempsun = systime(1) ; pour key_performance -
trunk/SRC/ToBeReviewed/CALCULS/rhon.pro
r97 r114 9 9 ;- 10 10 FUNCTION rhon, sn, tn, INSITU = insitu, SIGMA_N = sigma_n 11 ; 12 compile_opt idl2, strictarrsubs 13 ; 11 14 @common 12 15 tempsun = systime(1) ; pour key_performance … … 77 80 END 78 81 endcase 79 if n_elements(sigma_n) NE 0 then zh = 1000.*sigma_n ELSE zh = gdept (jk)82 if n_elements(sigma_n) NE 0 then zh = 1000.*sigma_n ELSE zh = gdept[jk] 80 83 ; ... square root salinity 81 84 zsr= sqrt(abs(zs)) … … 90 93 case taille[0] of 91 94 0: zrhop = (zr4*zs + zr3*zsr + zr2)*zs + zr1 92 1: zrhop (jk)= (zr4*zs + zr3*zsr + zr2)*zs + zr195 1: zrhop[jk]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 93 96 2:BEGIN 94 97 if jpt EQ 1 then zrhop = (zr4*zs + zr3*zsr + zr2)*zs + zr1 $ 95 ELSE zrhop (jk, *)= (zr4*zs + zr3*zsr + zr2)*zs + zr198 ELSE zrhop[jk, *]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 96 99 END 97 100 3:BEGIN 98 if jpt EQ 1 then zrhop (*, *,jk)= (zr4*zs + zr3*zsr + zr2)*zs + zr1 $101 if jpt EQ 1 then zrhop[*, *,jk]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 $ 99 102 ELSE zrhop = (zr4*zs + zr3*zsr + zr2)*zs + zr1 100 103 END 101 4: zrhop (*, *,jk, *)= (zr4*zs + zr3*zsr + zr2)*zs + zr1104 4: zrhop[*, *,jk, *]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 102 105 endcase 103 106 … … 121 124 case taille[0] of 122 125 0: zrhop = zrhop / (1.0-zh/(zk0-zh*(za-zh*zb))) 123 1: zrhop (jk) = zrhop(jk)/ (1.0-zh/(zk0-zh*(za-zh*zb)))126 1: zrhop[jk] = zrhop[jk] / (1.0-zh/(zk0-zh*(za-zh*zb))) 124 127 2:BEGIN 125 128 if jpt EQ 1 then zrhop = zrhop / (1.0-zh/(zk0-zh*(za-zh*zb))) $ 126 ELSE zrhop (jk, *) = zrhop(jk, *)/ (1.0-zh/(zk0-zh*(za-zh*zb)))129 ELSE zrhop[jk, *] = zrhop[jk, *] / (1.0-zh/(zk0-zh*(za-zh*zb))) 127 130 END 128 131 3:BEGIN 129 if jpt EQ 1 then zrhop (*, *,jk) = zrhop(*, *,jk)/ (1.0-zh/(zk0-zh*(za-zh*zb))) $132 if jpt EQ 1 then zrhop[*, *,jk] = zrhop[*, *,jk] / (1.0-zh/(zk0-zh*(za-zh*zb))) $ 130 133 ELSE zrhop = zrhop / (1.0-zh/(zk0-zh*(za-zh*zb))) 131 134 END 132 4: zrhop (*, *,jk, *) = zrhop(*, *,jk, *)/ (1.0-zh/(zk0-zh*(za-zh*zb)))135 4: zrhop[*, *,jk, *] = zrhop[*, *,jk, *] / (1.0-zh/(zk0-zh*(za-zh*zb))) 133 136 endcase 134 137 -
trunk/SRC/ToBeReviewed/CALENDRIER/def_month.pro
r9 r114 2 2 ; 3 3 ; translate month number in string 4 ; 5 ; 6 compile_opt idl2, strictarrsubs 4 7 ; 5 8 IF strpos(date, '_') GT -1 THEN date = strmid(date, 0, strpos(date, '_')) -
trunk/SRC/ToBeReviewed/COULEURS/color24.pro
r19 r114 46 46 47 47 FUNCTION COLOR24, number 48 ; 49 compile_opt idl2, strictarrsubs 50 ; 48 51 49 52 ; This FUNCTION accepts a [red, green, blue] triple that … … 69 72 num24bit = 0L 70 73 71 FOR j=0,2 DO num24bit = num24bit + ((number (j) MOD 16) * base16(0,j)) + $72 (Fix(number (j)/16) * base16(1,j))74 FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $ 75 (Fix(number[j]/16) * base16[1,j]) 73 76 74 77 RETURN, num24bit -
trunk/SRC/ToBeReviewed/COULEURS/colorbar.pro
r19 r114 121 121 PSCOLOR=pscolor, CB_TITLE=cb_title, VERTICAL=vertical, TOP=top, RIGHT=right, CB_LOG = CB_log, _extra = ex 122 122 ; Is the PostScript device selected? 123 ; 124 compile_opt idl2, strictarrsubs 125 ; 123 126 124 127 postScriptDevice = (!D.NAME EQ 'PS') … … 207 210 ; Get starting locations in DEVICE coordinates. 208 211 209 xstart = position (0)* !D.X_VSIZE210 ystart = position (1)* !D.Y_VSIZE212 xstart = position[0] * !D.X_VSIZE 213 ystart = position[1] * !D.Y_VSIZE 211 214 212 215 ; Get the size of the bar in DEVICE coordinates. 213 216 214 xsize = (position (2) - position(0)) * !D.X_VSIZE215 ysize = (position (3) - position(1)) * !D.Y_VSIZE217 xsize = (position[2] - position[0]) * !D.X_VSIZE 218 ysize = (position[3] - position[1]) * !D.Y_VSIZE 216 219 217 220 ; For PostScript output only, draw the annotation in !P.COLOR -
trunk/SRC/ToBeReviewed/COULEURS/getcolor.pro
r19 r114 181 181 182 182 FUNCTION COLOR24, number 183 ; 184 compile_opt idl2, strictarrsubs 185 ; 183 186 184 187 ; This FUNCTION accepts a [red, green, blue] triple that … … 204 207 num24bit = 0L 205 208 206 FOR j=0,2 DO num24bit = num24bit + ((number (j) MOD 16) * base16(0,j)) + $207 (Fix(number (j)/16) * base16(1,j))209 FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $ 210 (Fix(number[j]/16) * base16[1,j]) 208 211 209 212 RETURN, num24bit … … 214 217 FUNCTION GETCOLOR, thisColor, index, TRUE=truecolor, $ 215 218 NAMES=colornames, LOAD=load, START=start 219 ; 220 compile_opt idl2, strictarrsubs 221 ; 216 222 217 223 ; Set up the color vectors. … … 315 321 316 322 varInfo = SIZE(thisColor) 317 IF varInfo (varInfo(0) + 1)NE 7 THEN $323 IF varInfo[varInfo[0] + 1] NE 7 THEN $ 318 324 MESSAGE, 'The color name must be a string.' 319 325 thisColor = STRUPCASE(thisColor) … … 326 332 ; set the index to a YELLOW color, and continue. 327 333 328 IF colorIndex (0)LT 0 THEN BEGIN334 IF colorIndex[0] LT 0 THEN BEGIN 329 335 MESSAGE, "Can't find color. Returning YELLOW.", /INFORMATIONAL 330 336 colorIndex = 3 … … 333 339 ; Get the color triple. 334 340 335 r = rvalue (colorIndex)336 g = gvalue (colorIndex)337 b = bvalue (colorIndex)341 r = rvalue[colorIndex] 342 g = gvalue[colorIndex] 343 b = bvalue[colorIndex] 338 344 returnColor = REFORM([r, g, b], 1, 3) 339 345 -
trunk/SRC/ToBeReviewed/COULEURS/lct.pro
r19 r114 35 35 ;------------------------------------------------------------ 36 36 PRO lct, numero, GET_NAME = get_name, LIGHTNESS = Lightness, _EXTRA = ex 37 ; 38 compile_opt idl2, strictarrsubs 39 ; 37 40 @common 38 41 ; le mot cle file est passe par l''intermediere de EXTRA? -
trunk/SRC/ToBeReviewed/COULEURS/newpalette.pro
r19 r114 40 40 ; le mot cle file est passe par l''intermediere de EXTRA? 41 41 ; definition du mon du fichier qui contient les palettes de couleur 42 ; 43 compile_opt idl2, strictarrsubs 44 ; 42 45 if n_elements(ex) NE 0 then BEGIN 43 46 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then nompal=ex.FILE ELSE nompal='palette.tbl' -
trunk/SRC/ToBeReviewed/COULEURS/palit.pro
r97 r114 8 8 ;- 9 9 PRO palit, coef, red, green, blue 10 ; 11 compile_opt idl2, strictarrsubs 12 ; 10 13 IF n_elements(coef) EQ 0 THEN coef = 0.5 11 14 IF n_elements(red) EQ 0 THEN tvlct, red, green, blue, /get -
trunk/SRC/ToBeReviewed/COULEURS/xlct.pro
r19 r114 6 6 PRO XLCT_PSAVE ;Save/Restore our plotting state. 7 7 ; Swaps our state with the current state each time its called. 8 ; 9 compile_opt idl2, strictarrsubs 10 ; 8 11 9 12 COMMON xlct_com, r0, g0, b0, tfun, state, filename, cps, psave, pnt, $ … … 25 28 26 29 pro xlct_alert_caller 30 ; 31 compile_opt idl2, strictarrsubs 32 ; 27 33 COMMON xlct_com, r0, g0, b0, tfun, state, filename, cps, psave, pnt, $ 28 34 top, bot, silent, chop, lock, g_lbl, vbot, vtop, g_slider, $ … … 51 57 ; Redraw the ramp image. 52 58 PRO xlct_show 59 ; 60 compile_opt idl2, strictarrsubs 61 ; 53 62 COMMON xlct_com, r0, g0, b0, tfun, state, filename, cps, psave, pnt, $ 54 63 top, bot, silent, chop, lock, g_lbl, vbot, vtop, g_slider, $ … … 68 77 69 78 PRO xlct_draw_cps, i, c 79 ; 80 compile_opt idl2, strictarrsubs 81 ; 70 82 COMMON colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr 71 83 COMMON xlct_com, r0, g0, b0, tfun, state, filename, cps, psave, pnt, $ … … 86 98 87 99 PRO xlct_transfer, UPDATE=update 100 ; 101 compile_opt idl2, strictarrsubs 102 ; 88 103 COMMON colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr 89 104 COMMON xlct_com, r0, g0, b0, tfun, state, filename, cps, psave, pnt, $ … … 115 130 116 131 PRO xlct_event, event 132 ; 133 compile_opt idl2, strictarrsubs 134 ; 117 135 COMMON colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr 118 136 COMMON xlct_com, r0, g0, b0, tfun, state, filename, cps, psave, pnt, $ … … 430 448 MODAL=modal, BLOCK=block, UPDATECALLBACK=updt_cb_name, $ 431 449 UPDATECBDATA=updt_cb_data 450 ; 451 compile_opt idl2, strictarrsubs 452 ; 432 453 433 454 COMMON colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr -
trunk/SRC/ToBeReviewed/COULEURS/xpal.pro
r19 r114 157 157 ; color maps and set !P appropriately. Returns 1 if the colors changed, 158 158 ; 0 otherwise. 159 ; 160 compile_opt idl2, strictarrsubs 161 ; 159 162 common xp_com, xpw, state 160 163 … … 176 179 177 180 pro XP_ALERT_CALLER 181 ; 182 compile_opt idl2, strictarrsubs 183 ; 178 184 179 185 common xp_com, xpw, state … … 200 206 ; For visuals with static colormaps, update the graphics 201 207 ; after a change by XLOADCT. 208 ; 209 compile_opt idl2, strictarrsubs 210 ; 202 211 if ((COLORMAP_APPLICABLE(redrawRequired) GT 0) and $ 203 212 (redrawRequired GT 0)) then begin … … 208 217 209 218 pro XP_REDRAW 219 ; 220 compile_opt idl2, strictarrsubs 221 ; 210 222 211 223 common xp_com, xpw, state … … 227 239 ; - 'G': Draw the data part of the Green plot 228 240 ; - 'B': Draw the data part of the Blue plot 241 ; 242 compile_opt idl2, strictarrsubs 243 ; 229 244 230 245 common xp_com, xpw, state … … 303 318 ; - 'G': ... 304 319 ; - 'B': ... 320 ; 321 compile_opt idl2, strictarrsubs 322 ; 305 323 common xp_com, xpw, state 306 324 common colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr … … 348 366 349 367 pro XP_BUTTON_EVENT, event 368 ; 369 compile_opt idl2, strictarrsubs 370 ; 350 371 351 372 common xp_com, xpw, state … … 461 482 462 483 PRO xp_button_event_event, ev 484 ; 485 compile_opt idl2, strictarrsubs 486 ; 463 487 COMMON basecommon, bas212, bas222, bas232 464 488 WIDGET_CONTROL, ev.id, GET_UVALUE = uval … … 485 509 486 510 pro XP_EVENT, event 511 ; 512 compile_opt idl2, strictarrsubs 513 ; 487 514 488 515 common xp_com, xpw, state … … 532 559 pro XPAL, group=group, BLOCK=block, UPDATECALLBACK=updt_cb_name, $ 533 560 UPDATECBDATA=updt_cb_data 561 ; 562 compile_opt idl2, strictarrsubs 563 ; 534 564 535 565 -
trunk/SRC/ToBeReviewed/GRILLE/changegrid.pro
r69 r114 1 1 function changegrid, newgrid 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 @cm_4mesh -
trunk/SRC/ToBeReviewed/GRILLE/cmpgrid.pro
r74 r114 1 1 FUNCTION cmpgrid, newgrid 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 @common -
trunk/SRC/ToBeReviewed/GRILLE/decoupeterre.pro
r14 r114 50 50 PRO decoupeterre, mask, glam, gphi, gdep, TYPE = type, TRI = tri, INDICEZOOM = indicezoom, COINMONTE = coinmonte, COINDESCEND = coindescend, WDEPTH = wdepth, REALSECTION = realsection, USETRI = usetri, _extra = ex 51 51 ;--------------------------------------------------------- 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 @cm_4mesh 53 56 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/domdef.pro
r96 r114 105 105 ;------------------------------------------------------------ 106 106 ; include commons 107 ; 108 compile_opt idl2, strictarrsubs 109 ; 107 110 @cm_4mesh 108 111 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/GRILLE/f2v.pro
r13 r114 39 39 FUNCTION f2v, temp 40 40 ;--------------------------------------------------------- 41 ; 42 compile_opt idl2, strictarrsubs 43 ; 41 44 @cm_4mesh 42 45 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/fmask.pro
r13 r114 26 26 FUNCTION fmask 27 27 ;--------------------------------------------------------- 28 ; 29 compile_opt idl2, strictarrsubs 30 ; 28 31 @cm_4mesh 29 32 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/GRILLE/grille.pro
r69 r114 64 64 ;------------------------------------------------------------ 65 65 ; include commons 66 ; 67 compile_opt idl2, strictarrsubs 68 ; 66 69 @cm_4mesh 67 70 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/t2v.pro
r13 r114 39 39 FUNCTION t2v, temp 40 40 ;--------------------------------------------------------- 41 ; 42 compile_opt idl2, strictarrsubs 43 ; 41 44 @cm_4mesh 42 45 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/tracegrille.pro
r13 r114 59 59 , _extra = extra 60 60 ;--------------------------------------------------------- 61 ; 62 compile_opt idl2, strictarrsubs 63 ; 61 64 @cm_4mesh 62 65 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/u2t.pro
r13 r114 39 39 FUNCTION u2t, temp 40 40 ;--------------------------------------------------------- 41 ; 42 compile_opt idl2, strictarrsubs 43 ; 41 44 @cm_4mesh 42 45 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/umask.pro
r13 r114 40 40 FUNCTION umask 41 41 ;--------------------------------------------------------- 42 ; 43 compile_opt idl2, strictarrsubs 44 ; 42 45 @cm_4mesh 43 46 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/GRILLE/v2t.pro
r13 r114 39 39 FUNCTION v2t, temp 40 40 ;--------------------------------------------------------- 41 ; 42 compile_opt idl2, strictarrsubs 43 ; 41 44 @cm_4mesh 42 45 @cm_4data -
trunk/SRC/ToBeReviewed/GRILLE/vmask.pro
r13 r114 26 26 ;------------------------------------------------------------ 27 27 FUNCTION vmask 28 ; 29 compile_opt idl2, strictarrsubs 30 ; 28 31 @common 29 32 tempsun = systime(1) ; pour key_performance -
trunk/SRC/ToBeReviewed/HOPE/.idlwave_catalog
r76 r114 9 9 ("computehopegrid" pro nil (lib "computehopegrid.pro" nil "saxo") "%s, xaxis, yaxis, zaxis, linetype" (nil ("FIRSTS") ("FORTHEMASK") ("LASTS") ("PTTYPE") ("WPOINT"))) 10 10 ("createhopestruct" fun nil (lib "createhopestruct.pro" nil "saxo") "Result = %s(event)" (nil)) 11 ("testwid_event" pro nil (lib "cw_selectinterval.pro" nil "saxo") "%s, event" (nil))12 ("testwid" pro nil (lib "cw_selectinterval.pro" nil "saxo") "%s" (nil ("_extra")))13 11 ("cw_selectinterval_get_value" fun nil (lib "cw_selectinterval.pro" nil "saxo") "Result = %s(id)" (nil)) 14 12 ("cw_selectinterval_event" fun nil (lib "cw_selectinterval.pro" nil "saxo") "Result = %s(event)" (nil)) -
trunk/SRC/ToBeReviewed/HOPE/completetype.pro
r53 r114 1 1 2 2 function completetype, typein 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 type=typein 4 7 case type of -
trunk/SRC/ToBeReviewed/HOPE/computehopegrid.pro
r53 r114 33 33 PRO computehopegrid, xaxis, yaxis, zaxis, linetype, FORTHEMASK = forthemask, WPOINT = wpoint, FIRSTS = firsts, LASTS = lasts, PTTYPE = pttype 34 34 ;--------------------------------------------------------- 35 ; 36 compile_opt idl2, strictarrsubs 37 ; 35 38 @cm_4mesh 36 39 @cm_4data -
trunk/SRC/ToBeReviewed/HOPE/createhopestruct.pro
r53 r114 1 1 FUNCTION createhopestruct, event 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 widget_control, event.top, get_uvalue=top_uvalue 3 6 ; find the selected variable -
trunk/SRC/ToBeReviewed/HOPE/cw_selectinterval.pro
r53 r114 1 1 2 PRO testwid_event, event 3 widget_control, event.id, get_uvalue=uval 4 if n_elements(uval) EQ 0 then return 5 case uval of 6 'done':widget_control, event.top, /destroy 7 'get':BEGIN 8 id = widget_info(event.top,find_by_uname = 'discret') 9 widget_control, id, get_value = value1 10 help, value1 11 print, 'value1', value1 12 id = widget_info(event.top,find_by_uname = 'continus') 13 widget_control, id, get_value = value2 14 help, value2 15 print, 'value2', value2 16 END 17 ELSE: 18 endcase 19 return 20 end 21 PRO testwid, _extra = ex 22 base=widget_base(/COLUMN) 23 nothing = widget_label(base, value = 'beginning of the test') 24 ; 25 nothing = cw_selectinterval(base, 10+indgen(5), _extra = ex, uname = 'discret', uvalue = 'discret') 26 print, nothing 27 nothing = cw_selectinterval(base, indgen(20), _extra = ex, uname = 'continus', uvalue = 'continus') 28 print, nothing 29 ; 30 nothing = widget_button(base, value = 'get', uvalue = 'get') 31 nothing = widget_button(base, value = 'done', uvalue = 'done') 32 widget_control, base, /REALIZE 33 xmanager,'testwid', base, /no_block 34 return 35 end 2 ; PRO testwid_event, event 3 ; ; 4 ; compile_opt idl2, strictarrsubs 5 ; ; 6 ; widget_control, event.id, get_uvalue=uval 7 ; if n_elements(uval) EQ 0 then return 8 ; case uval of 9 ; 'done':widget_control, event.top, /destroy 10 ; 'get':BEGIN 11 ; id = widget_info(event.top,find_by_uname = 'discret') 12 ; widget_control, id, get_value = value1 13 ; help, value1 14 ; print, 'value1', value1 15 ; id = widget_info(event.top,find_by_uname = 'continus') 16 ; widget_control, id, get_value = value2 17 ; help, value2 18 ; print, 'value2', value2 19 ; END 20 ; ELSE: 21 ; endcase 22 ; return 23 ; end 24 ; PRO testwid, _extra = ex 25 ; ; 26 ; compile_opt idl2, strictarrsubs 27 ; ; 28 ; base=widget_base(/COLUMN) 29 ; nothing = widget_label(base, value = 'beginning of the test') 30 ; ; 31 ; nothing = cw_selectinterval(base, 10+indgen(5), _extra = ex, uname = 'discret', uvalue = 'discret') 32 ; print, nothing 33 ; nothing = cw_selectinterval(base, indgen(20), _extra = ex, uname = 'continus', uvalue = 'continus') 34 ; print, nothing 35 ; ; 36 ; nothing = widget_button(base, value = 'get', uvalue = 'get') 37 ; nothing = widget_button(base, value = 'done', uvalue = 'done') 38 ; widget_control, base, /REALIZE 39 ; xmanager,'testwid', base, /no_block 40 ; return 41 ; end 36 42 ;-------------------------------------------------------------------------- 37 43 ;-------------------------------------------------------------------------- 38 44 ;-------------------------------------------------------------------------- 39 45 function cw_selectinterval_get_value, id 46 ; 47 compile_opt idl2, strictarrsubs 48 ; 40 49 bgroupid=widget_info(id, find_by_uname = 'bgroup') 41 50 ; the widget is a set of button … … 60 69 ;-------------------------------------------------------------------------- 61 70 function cw_selectinterval_event, event 71 ; 72 compile_opt idl2, strictarrsubs 73 ; 62 74 widget_control, event.id, get_uvalue=uval 63 75 case uval.name of … … 77 89 ;-------------------------------------------------------------------------- 78 90 function cw_selectinterval, parent, vecteur, _extra = ex 91 ; 92 compile_opt idl2, strictarrsubs 93 ; 79 94 80 95 base = widget_base(parent $ -
trunk/SRC/ToBeReviewed/HOPE/domainpart.pro
r53 r114 1 1 pro domainpart, top_uvalue, basedomain, selected, DESTROY = destroy 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 if keyword_set(destroy) then BEGIN -
trunk/SRC/ToBeReviewed/HOPE/findlineandpointtype.pro
r53 r114 22 22 ; lonThighodd:modulo = " " ; 23 23 ; } 24 ; 25 compile_opt idl2, strictarrsubs 26 ; 24 27 jpi = n_elements(xaxis) 25 28 jpj = n_elements(yaxis) -
trunk/SRC/ToBeReviewed/HOPE/read_hope.pro
r53 r114 111 111 ; 112 112 pro read_hope_event, event 113 ; 114 compile_opt idl2, strictarrsubs 115 ; 113 116 widget_control, event.id, get_uvalue=uval 114 117 widget_control, event.top, get_uvalue=top_uvalue … … 297 300 ; 298 301 FUNCTION read_hope, typein, varnamein, FILENAME = filename, XLIMITS = xlimits, YLIMITS = ylimits, ZLIMITS = zlimits, TLIMITS = tlimits, ODDPT = oddpt, ODDEVENPT = oddevenpt, EVENPT = evenpt, _extra = ex 302 ; 303 compile_opt idl2, strictarrsubs 304 ; 299 305 @common ; usefull only for the definition of iodir 300 306 if n_elements(filename) EQ 0 then filename = isafile(iodirectory = iodir, _extra = ex) -
trunk/SRC/ToBeReviewed/HOPE/rh_alldomains.pro
r53 r114 1 1 PRO rh_alldomains, topid, selected 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 widget_control, topid, get_uvalue=top_uvalue -
trunk/SRC/ToBeReviewed/HOPE/sortdim.pro
r53 r114 17 17 ; 18 18 ; 19 ; 20 compile_opt idl2, strictarrsubs 21 ; 19 22 tosort = dims 20 23 if n_elements(tosort) eq 1 then $ -
trunk/SRC/ToBeReviewed/HOPE/xrh.pro
r53 r114 1 1 ; procedure to call read_hope in the widget mode 2 2 PRO xrh, _extra = ex 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 a = read_hope(_extra = ex) 4 7 return -
trunk/SRC/ToBeReviewed/IMAGE/animgif.pro
r74 r114 42 42 ;------------------------------------------------------------ 43 43 PRO animgif, nomfic 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 @common 45 48 ; -
trunk/SRC/ToBeReviewed/IMAGE/image_viewer.pro
r23 r114 48 48 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open Picture Files" FROM THE MAIN MENU 49 49 ;error handling: 50 ; 51 compile_opt idl2, strictarrsubs 52 ; 50 53 !ERROR_STATE.CODE=0 51 54 CATCH,error … … 126 129 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open All In Folder" FROM THE MAIN MENU 127 130 ;error handling: 131 ; 132 compile_opt idl2, strictarrsubs 133 ; 128 134 !ERROR_STATE.CODE=0 129 135 CATCH,error … … 204 210 PRO IMAGE_VIEWER_CANCEL,event 205 211 ;obtain state structure for top-level-base from its UVALUE: 212 ; 213 compile_opt idl2, strictarrsubs 214 ; 206 215 WIDGET_CONTROL,event.top,GET_UVALUE=pState 207 216 ;shut-off timer: … … 214 223 PRO IMAGE_VIEWER_TIMER,event 215 224 ;obtain state structure for top-level-base from its UVALUE: 225 ; 226 compile_opt idl2, strictarrsubs 227 ; 216 228 WIDGET_CONTROL,event.top,GET_UVALUE=pState 217 229 if (*pState).timer EQ 1 then begin ;continue processing files: … … 884 896 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Exit" FROM THE MAIN MENU 885 897 ;terminate the program by destroying the top-level-base (widgetID always stored in event.top): 898 ; 899 compile_opt idl2, strictarrsubs 900 ; 886 901 WIDGET_CONTROL,event.top,/DESTROY 887 902 END … … 894 909 ;FROM THE MAIN MENU 895 910 ;display a simple message: 911 ; 912 compile_opt idl2, strictarrsubs 913 ; 896 914 messageStr=['IMAGE_VIEWER written by AEB, 2002.','',$ 897 915 'The purpose of this program is to provide an interactive tool that can be used',$ … … 909 927 ;THIS PROCEDURE IS CALLED WHEN A USER CLICKS ON ONE OF THE THUMBNAIL PICTURES 910 928 ;error handling: 929 ; 930 compile_opt idl2, strictarrsubs 931 ; 911 932 !ERROR_STATE.CODE=0 912 933 CATCH,error … … 953 974 ;THIS PROCEDURE IS CALLED WHEN THE PROGRAM IS TERMINATED AND XMANAGER REGISTERS A CLEANUP: 954 975 ;obtain state structure for top-level-base from its uvalue: 976 ; 977 compile_opt idl2, strictarrsubs 978 ; 955 979 WIDGET_CONTROL,widgetID,GET_UVALUE=pState 956 980 ;test for validity of state structure pointer: … … 978 1002 ;THIS PROCEDURE IS CALLED WHEN A USER RESIZES THE TOP-LEVEL BASE 979 1003 ;error handling: 1004 ; 1005 compile_opt idl2, strictarrsubs 1006 ; 980 1007 !ERROR_STATE.CODE=0 981 1008 CATCH,error … … 997 1024 PRO IMAGE_VIEWER 998 1025 ;error handling: 1026 ; 1027 compile_opt idl2, strictarrsubs 1028 ; 999 1029 !ERROR_STATE.CODE=0 1000 1030 CATCH,error -
trunk/SRC/ToBeReviewed/IMAGE/imdisp.pro
r23 r114 1 1 ;------------------------------------------------------------------------------- 2 2 FUNCTION IMDISP_GETPOS, ASPECT, POSITION=POSITION, MARGIN=MARGIN 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 4 7 ;- Compute a position vector given an aspect ratio (called by IMDISP_IMSIZE) … … 46 49 FUNCTION IMDISP_IMSCALE, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 47 50 NEGATIVE=NEGATIVE 51 ; 52 compile_opt idl2, strictarrsubs 53 ; 48 54 49 55 ;- Byte-scale an image (called by IMDISP) … … 73 79 ;------------------------------------------------------------------------------- 74 80 FUNCTION IMDISP_IMREGRID, DATA, NX, NY, INTERP=INTERP 81 ; 82 compile_opt idl2, strictarrsubs 83 ; 75 84 76 85 ;- Regrid a 2D array (called by IMDISP) … … 112 121 PRO IMDISP_IMSIZE, IMAGE, X0, Y0, XSIZE, YSIZE, ASPECT=ASPECT, $ 113 122 POSITION=POSITION, MARGIN=MARGIN 123 ; 124 compile_opt idl2, strictarrsubs 125 ; 114 126 115 127 ;- Compute the size and offset for an image (called by IMDISP) … … 171 183 BACKGROUND=BACKGROUND, ERASE=ERASE, $ 172 184 AXIS=AXIS, NEGATIVE=NEGATIVE, _EXTRA=EXTRA_KEYWORDS 185 ; 186 compile_opt idl2, strictarrsubs 187 ; 173 188 174 189 ;+ -
trunk/SRC/ToBeReviewed/IMAGE/saveimage.pro
r69 r114 1 1 PRO SAVEIMAGE, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, $ 2 2 QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE = multiple 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 4 7 ;+ -
trunk/SRC/ToBeReviewed/IMAGE/showimage.pro
r69 r114 1 1 PRO SHOWIMAGE, FILE, DITHER=DITHER, CURRENT=CURRENT 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 ;+ -
trunk/SRC/ToBeReviewed/INIT/initncdf.pro
r69 r114 91 91 , XYINDEX = xyindex, ZINDEX = zindex $ 92 92 , _EXTRA = ex 93 ; 94 ; 95 compile_opt idl2, strictarrsubs 93 96 ; 94 97 @common -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/bit2int.pro
r67 r114 1 1 FUNCTION bit2int, bitin, checkneg = checkneg 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 res = 0L -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib.pro
r69 r114 1 1 function read_grib, varcode, date1, date2, file = file 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 @common 3 6 ; http://www.wmo.ch/web/www/WDM/Guides/Guide-binary-2.html -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib_bds.pro
r67 r114 1 1 FUNCTION read_grib_bds, num, recstart, ni, nj 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 offset = recstart+8 -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib_end.pro
r67 r114 1 1 PRO read_grib_end, num, offset 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 a = assoc(num, bytarr(4, /nozero), offset) -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib_gds.pro
r67 r114 1 1 FUNCTION read_grib_gds, num, recstart 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 offset = recstart+8 -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib_is.pro
r67 r114 1 1 FUNCTION read_grib_is, num, offset 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 infofile = fstat(num) -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib_pds.pro
r67 r114 1 1 FUNCTION read_grib_pds, num, recstart 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 offset = recstart+8 -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_gribtable.pro
r67 r114 40 40 PRO read_gribtable,tablename,parmtabl=parmtabl,center=center,$ 41 41 subcenter=subcenter,tablnum=tablnum 42 ; 43 compile_opt idl2, strictarrsubs 44 ; 42 45 43 46 ON_ERROR,2 -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/scan_grib_code.pro
r67 r114 1 1 FUNCTION scan_grib_code, num, recstart 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 nrec = n_elements(recstart) -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/scan_grib_date.pro
r67 r114 1 1 FUNCTION scan_grib_date, num, recstart 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 nrec = n_elements(recstart) -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/scan_grib_messize.pro
r67 r114 1 1 FUNCTION scan_grib_messize, num, recstart 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 nrec = n_elements(recstart) -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/scan_grib_nbits.pro
r67 r114 1 1 FUNCTION scan_grib_nbits, num, recstart 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 ; -
trunk/SRC/ToBeReviewed/LECTURE/GRIB/scan_grib_recstart.pro
r67 r114 1 1 FUNCTION scan_grib_recstart, num 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 infofile = fstat(num) -
trunk/SRC/ToBeReviewed/LECTURE/binary.pro
r97 r114 38 38 ;- 39 39 function binary, number 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 s = size(number) 41 44 type = s[s[0] + 1] -
trunk/SRC/ToBeReviewed/LECTURE/changeread.pro
r44 r114 1 1 FUNCTION changeread, newread 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 @common -
trunk/SRC/ToBeReviewed/LECTURE/inverse_binary.pro
r44 r114 62 62 FUNCTION inverse_binary, binnumb 63 63 ; 64 ; 65 compile_opt idl2, strictarrsubs 66 ; 64 67 s = size(binnumb, /dimensions) 65 68 IF n_elements(s) EQ 1 THEN numbofbit = 8 ELSE numbofbit = 8*s[1] -
trunk/SRC/ToBeReviewed/LECTURE/litchamp.pro
r44 r114 105 105 FUNCTION litchamp, struct, GRID = grid, NAME = name, UNIT = unit, EXP = exp, DATE = date $ 106 106 , LEVEL = level, MASK = mask 107 ; 108 compile_opt idl2, strictarrsubs 109 ; 107 110 @common 108 111 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/LECTURE/ncdf_lec.pro
r44 r114 42 42 ;------------------------------------------------------------ 43 43 function ncdf_lec,nom,ATT=att,DIM=dim,VAR=var, IODIR = iodir, _extra = ex 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 res = -1 45 48 ;------------------------------------------------------------ … … 124 127 then begin 125 128 print,'variable numero: ',strtrim(varid,1),', nom:',varcontent.name $ 126 ,', type:' ,varcontent.datatype,', dimensions:',nomdim (varcontent.dim)129 ,', type:' ,varcontent.datatype,', dimensions:',nomdim[varcontent.dim] 127 130 if strlowcase(att) eq strlowcase(varcontent.name) then begin 128 131 for attiq=0,varcontent.natts-1 do begin -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r74 r114 78 78 , GRID = grid, FBASE2TBASE = fbase2tbase, _EXTRA = ex 79 79 ;--------------------------------------------------------- 80 ; 81 compile_opt idl2, strictarrsubs 82 ; 80 83 @cm_4mesh 81 84 @cm_4data -
trunk/SRC/ToBeReviewed/LECTURE/xncdf_lec.pro
r44 r114 18 18 ;------------------------------------------------------------ 19 19 ;------------------------------------------------------------ 20 ; 21 compile_opt idl2, strictarrsubs 22 ; 20 23 COMMON wididbase, base 21 24 COMMON resultat, res … … 200 203 ;------------------------------------------------------------ 201 204 ;------------------------------------------------------------ 205 ; 206 compile_opt idl2, strictarrsubs 207 ; 202 208 COMMON resultat, res 203 209 COMMON infovariable, cdfid, listename, contient, nomdim, tailledim, varid, varcontient … … 306 312 ;------------------------------------------------------------ 307 313 ;------------------------------------------------------------ 314 ; 315 compile_opt idl2, strictarrsubs 316 ; 308 317 COMMON resultat, res 309 318 COMMON infovariable, cdfid, listename, contient, nomdim, tailledim, varid, varcontient … … 408 417 ;------------------------------------------------------------ 409 418 FUNCTION xncdf_lec, nom, ATT = att, COUNT = count, GROUP = group, OFFSET = offset, IODIR = iodir, SHIFT = shift, STRIDE = stride, VAR = var 419 ; 420 compile_opt idl2, strictarrsubs 421 ; 410 422 COMMON wididbase, base 411 423 COMMON infovariable, cdfid, listename, contient, nomdim, tailledim, varid, varcontient -
trunk/SRC/ToBeReviewed/MATRICE/cmapply.pro
r31 r114 149 149 ; OUT FLOAT = Array[10, 10] 150 150 ; 151 ; (OUT (i,j) is the median value of IN(i,j,*))151 ; (OUT[i,j] is the median value of IN[i,j,*]) 152 152 ; 153 153 ; MODIFICATION HISTORY: … … 175 175 ;; Utility function, adapted from CMPRODUCT 176 176 function cmapply_product, x 177 ; 178 compile_opt idl2, strictarrsubs 179 ; 177 180 sz = size(x) 178 n = sz (1)181 n = sz[1] 179 182 180 183 while n GT 1 do begin 181 if (n mod 2) EQ 1 then x (0,*) = x(0,*) * x(n-1,*)184 if (n mod 2) EQ 1 then x[0,*] = x[0,*] * x[n-1,*] 182 185 n2 = floor(n/2) 183 x = x (0:n2-1,*) * x(n2:*,*)186 x = x[0:n2-1,*] * x[n2:*,*] 184 187 n = n2 185 188 endwhile 186 return, reform(x (0,*), /overwrite)189 return, reform(x[0,*], /overwrite) 187 190 end 188 191 189 192 ;; Utility function, used to collect collaped dimensions 190 193 pro cmapply_redim, newarr, dimapply, dimkeep, nkeep, totcol, totkeep 194 ; 195 compile_opt idl2, strictarrsubs 196 ; 191 197 sz = size(newarr) 192 198 ;; First task: rearrange dimensions so that the dimensions 193 199 ;; that are "kept" (ie, uncollapsed) are at the back 194 dimkeep = where(histogram(dimapply,min=1,max=sz (0)) ne 1, nkeep)200 dimkeep = where(histogram(dimapply,min=1,max=sz[0]) ne 1, nkeep) 195 201 if nkeep EQ 0 then return 196 202 197 203 newarr = transpose(temporary(newarr), [dimapply-1, dimkeep]) 198 204 ;; totcol is the total number of collapsed elements 199 totcol = sz (dimapply(0))200 for i = 1, n_elements(dimapply)-1 do totcol = totcol * sz (dimapply(i))201 totkeep = sz (dimkeep(0)+1)202 for i = 1, n_elements(dimkeep)-1 do totkeep = totkeep * sz (dimkeep(i)+1)205 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] 203 209 204 210 ;; this new array has two dimensions: … … 213 219 function cmapply, op, array, dimapply, double=dbl, type=type, $ 214 220 functargs=functargs, nocatch=nocatch 221 ; 222 compile_opt idl2, strictarrsubs 223 ; 215 224 216 225 if n_params() LT 2 then begin … … 227 236 ;; 1) the dimensions of the array 228 237 sz = size(array) 229 if sz (0)EQ 0 then $238 if sz[0] EQ 0 then $ 230 239 message, 'ERROR: ARRAY must be an array!' 231 240 232 241 ;; 2) The type of the array 233 if sz (sz(0)+1) EQ 0 OR sz(sz(0)+1) EQ 7 OR sz(sz(0)+1)EQ 8 then $242 if sz[sz[0]+1] EQ 0 OR sz[sz[0]+1] EQ 7 OR sz[sz[0]+1] EQ 8 then $ 234 243 message, 'ERROR: Cannot apply to UNDEFINED, STRING, or STRUCTURE' 235 if n_elements(type) EQ 0 then type = sz (sz(0)+1)244 if n_elements(type) EQ 0 then type = sz[sz[0]+1] 236 245 237 246 ;; 3) The type of the operation 238 247 szop = size(op) 239 if szop (szop(0)+1)NE 7 then $248 if szop[szop[0]+1] NE 7 then $ 240 249 message, 'ERROR: operation OP was not a string' 241 250 … … 243 252 if n_params() EQ 2 then dimapply = 1 244 253 dimapply = [ dimapply ] 245 dimapply = dimapply (sort(dimapply)); Sort in ascending order254 dimapply = dimapply[sort(dimapply)] ; Sort in ascending order 246 255 napply = n_elements(dimapply) 247 256 … … 254 263 newop = strupcase(op) 255 264 newarr = array 256 newarr = reform(newarr, sz (1:sz(0)), /overwrite)265 newarr = reform(newarr, sz[1:sz[0]], /overwrite) 257 266 case 1 of 258 267 … … 260 269 (newop EQ '+'): begin 261 270 for i = 0L, napply-1 do begin 262 newarr = total(temporary(newarr), dimapply (i)-i, double=dbl)271 newarr = total(temporary(newarr), dimapply[i]-i, double=dbl) 263 272 endfor 264 273 end … … 269 278 if nkeep EQ 0 then begin 270 279 newarr = reform(newarr, n_elements(newarr), 1, /overwrite) 271 return, (cmapply_product(newarr)) (0)280 return, (cmapply_product(newarr))[0] 272 281 endif 273 282 274 283 result = cmapply_product(newarr) 275 result = reform(result, sz (dimkeep+1), /overwrite)284 result = reform(result, sz[dimkeep+1], /overwrite) 276 285 return, result 277 286 end … … 282 291 totelt = 1L 283 292 for i = 0L, napply-1 do begin 284 newarr = total(temporary(newarr), dimapply (i)-i)285 totelt = totelt * sz (dimapply(i))293 newarr = total(temporary(newarr), dimapply[i]-i) 294 totelt = totelt * sz[dimapply[i]] 286 295 endfor 287 296 if newop EQ 'AND' then return, (round(newarr) EQ totelt) … … 305 314 if totcol LT totkeep then begin 306 315 ;; Iterate over the number of collapsed elements 307 result (0) = reform(newarr(0,*),totkeep,/overwrite)316 result[0] = reform(newarr[0,*],totkeep,/overwrite) 308 317 case newop of 309 318 'MAX': for i = 1L, totcol-1 do $ 310 result (0) = result > newarr(i,*)319 result[0] = result > newarr[i,*] 311 320 'MIN': for i = 1L, totcol-1 do $ 312 result (0) = result < newarr(i,*)321 result[0] = result < newarr[i,*] 313 322 endcase 314 323 endif else begin 315 324 ;; Iterate over the number of output elements 316 325 case newop of 317 'MAX': for i = 0L, totkeep-1 do result (i) = max(newarr(*,i))318 'MIN': for i = 0L, totkeep-1 do result (i) = min(newarr(*,i))326 'MAX': for i = 0L, totkeep-1 do result[i] = max(newarr[*,i]) 327 'MIN': for i = 0L, totkeep-1 do result[i] = min(newarr[*,i]) 319 328 endcase 320 329 endelse 321 330 322 result = reform(result, sz (dimkeep+1), /overwrite)331 result = reform(result, sz[dimkeep+1], /overwrite) 323 332 return, result 324 333 end … … 343 352 if n_elements(functargs) GT 0 then begin 344 353 for i = 0L, totkeep-1 do $ 345 result (i) = call_function(functname, newarr(*,i), _EXTRA=functargs)354 result[i] = call_function(functname, newarr[*,i], _EXTRA=functargs) 346 355 endif else begin 347 356 for i = 0L, totkeep-1 do $ 348 result (i) = call_function(functname, newarr(*,i))357 result[i] = call_function(functname, newarr[*,i]) 349 358 endelse 350 359 351 result = reform(result, sz (dimkeep+1), /overwrite)360 result = reform(result, sz[dimkeep+1], /overwrite) 352 361 return, result 353 362 end … … 357 366 358 367 newsz = size(newarr) 359 if type EQ newsz (newsz(0)+1)then return, newarr368 if type EQ newsz[newsz[0]+1] then return, newarr 360 369 361 370 ;; Cast the result into the desired type, if necessary … … 363 372 'DOUBLE', 'COMPLEX', 'UNDEF', 'UNDEF', 'DCOMPLEX' ] 364 373 if type GE 1 AND type LE 3 then $ 365 return, call_function(castfns (type), round(newarr)) $374 return, call_function(castfns[type], round(newarr)) $ 366 375 else $ 367 return, call_function(castfns (type), newarr)376 return, call_function(castfns[type], newarr) 368 377 end 369 378 -
trunk/SRC/ToBeReviewed/MATRICE/cmset_op.pro
r84 r114 154 154 ; if keyword_set(sortit) then begin 155 155 ; ;; Sort it manually 156 ; ii = sort(a) & b = a (ii)156 ; ii = sort(a) & b = a[ii] 157 157 ; if keyword_set(non) then wh = where(b EQ shift(b, sh), ct) $ 158 158 ; else wh = where(b NE shift(b, sh), ct) 159 ; if ct GT 0 then return, ii (wh)159 ; if ct GT 0 then return, ii[wh] 160 160 ; endif else begin 161 161 ; ;; Use the user's values directly … … 171 171 ;; "first" value, whatever that may mean. 172 172 function cmset_op_uniq, a 173 ; 174 compile_opt idl2, strictarrsubs 175 ; 173 176 if n_elements(a) LE 1 then return, 0L 174 177 175 ii = sort(a) & b = a (ii)178 ii = sort(a) & b = a[ii] 176 179 wh = where(b NE shift(b, +1L), ct) 177 if ct GT 0 then return, ii (wh)180 if ct GT 0 then return, ii[wh] 178 181 179 182 return, 0L … … 182 185 function cmset_op, a, op0, b, not1=not1, not2=not2, count=count, $ 183 186 empty1=empty1, empty2=empty2, maxarray=ma, index=index 187 ; 188 compile_opt idl2, strictarrsubs 189 ; 184 190 185 191 on_error, 2 ;; return on error … … 204 210 ;; Check the operation 205 211 sz = size(op0) 206 if sz (sz(0)+1)NE 7 then begin212 if sz[sz[0]+1] NE 7 then begin 207 213 OP_ERR: 208 214 message, "ERROR: OP must be 'AND', 'OR' or 'XOR'" … … 247 253 if count GT 0 then return, a1 else return, -1L 248 254 endif 249 if count GT 0 then return, a (a1)else return, -1L255 if count GT 0 then return, a[a1] else return, -1L 250 256 RET_B1: 251 257 count = n2 … … 253 259 if count GT 0 then return, b1+n1 else return, -1L 254 260 endif 255 if count GT 0 then return, b (b1)else return, -1L261 if count GT 0 then return, b[b1] else return, -1L 256 262 endif 257 263 … … 266 272 267 273 ;; Check types of operands 268 sz1 = size(a) & tp1 = sz1 (sz1(0)+1)269 sz2 = size(b) & tp2 = sz2 (sz2(0)+1)274 sz1 = size(a) & tp1 = sz1[sz1[0]+1] 275 sz2 = size(b) & tp2 = sz2[sz2[0]+1] 270 276 if tp1 LT 0 OR tp1 GE 16 OR tp2 LT 0 OR tp2 GE 16 then begin 271 277 message, 'ERROR: unrecognized data types for operands' 272 278 return, -1 273 279 endif 274 if basetype (tp1) NE basetype(tp2)then begin280 if basetype[tp1] NE basetype[tp2] then begin 275 281 TYPE1_ERR: 276 282 message, 'ERROR: both A and B must be of the same type' … … 297 303 count = n_elements(index0) 298 304 if kind then return, index0 299 return, uu (index0)305 return, uu[index0] 300 306 end 301 307 … … 305 311 bi = cmset_op_uniq(b) & nb = n_elements(bi) 306 312 ui = [ai, bi+n1] 307 uu = [a,b] & uu = uu (ui);; Raw union...308 us = sort(uu) & uu = uu (us);; ...and sort309 if kind then ui = ui (temporary(us))else ui = 0313 uu = [a,b] & uu = uu[ui] ;; Raw union... 314 us = sort(uu) & uu = uu[us] ;; ...and sort 315 if kind then ui = ui[temporary(us)] else ui = 0 310 316 311 317 ;; Values in one set only will not have duplicates 312 318 wh1 = where(uu NE shift(uu, -1), count1) 313 319 if count1 EQ 0 then return, -1L 314 wh = where(wh1 (1:*)-wh1 EQ 1, count)315 if wh1 (0)EQ 0 then begin320 wh = where(wh1[1:*]-wh1 EQ 1, count) 321 if wh1[0] EQ 0 then begin 316 322 if count GT 0 then wh = [-1L, wh] else wh = [-1L] 317 323 count = n_elements(wh) 318 324 endif 319 325 if count EQ 0 then return, -1 320 if kind then return, ui (wh1(wh+1))321 return, uu (wh1(wh+1))326 if kind then return, ui[wh1[wh+1]] 327 return, uu[wh1[wh+1]] 322 328 end 323 329 … … 327 333 bi = cmset_op_uniq(b) & nb = n_elements(bi) 328 334 ui = [ai, bi+n1] 329 uu = [a,b] & uu = uu (ui);; Raw union...330 us = sort(uu) & uu = uu (us);; ...and sort331 if kind then ui = ui (us)else ui = 0335 uu = [a,b] & uu = uu[ui] ;; Raw union... 336 us = sort(uu) & uu = uu[us] ;; ...and sort 337 if kind then ui = ui[us] else ui = 0 332 338 333 339 if NOT keyword_set(not1) AND NOT keyword_set(not2) then begin … … 336 342 ;; they are equal, then the SHIFT() technique below 337 343 ;; fails. Do this one by hand. 338 if na EQ 1 AND nb EQ 1 AND uu (0) EQ uu(1)then begin344 if na EQ 1 AND nb EQ 1 AND uu[0] EQ uu[1] then begin 339 345 count = 1L 340 346 if kind then return, 0L 341 return, [uu (0)]347 return, [uu[0]] 342 348 endif 343 349 … … 348 354 ;; This should always select the element from A 349 355 ;; rather than B (the smaller of the two) 350 if kind then return, (ui (wh) < ui(wh+1))351 return, uu (wh)356 if kind then return, (ui[wh] < ui[wh+1]) 357 return, uu[wh] 352 358 endif 353 359 354 360 ;; For "NOT" cases, we need to identify by set 355 361 ii = make_array(na+nb, value=1b) 356 if keyword_set(not1) then ii (0:na-1)= 0357 if keyword_set(not2) then ii (na:*)= 0358 ii = ii (temporary(us))362 if keyword_set(not1) then ii[0:na-1] = 0 363 if keyword_set(not2) then ii[na:*] = 0 364 ii = ii[temporary(us)] 359 365 360 366 ;; Remove any duplicates 361 367 wh1 = where(uu EQ shift(uu, -1L), count1) ;; Find non-unique 362 if count1 GT 0 then ii ([wh1, wh1+1])= 0368 if count1 GT 0 then ii[wh1, wh1+1] = 0 363 369 ;; Remainder is the desired set 364 370 wh = where(ii, count) 365 371 if count EQ 0 then return, -1L 366 if kind then return, ui (wh)367 return, uu (wh)372 if kind then return, ui[wh] 373 return, uu[wh] 368 374 end 369 375 … … 380 386 minn = min1 < min2 & maxx = max1 > max2 381 387 nbins = maxx-minn+1 382 if (maxx-minn) GT floor(ma (0)) then goto, SLOW_SET_OP388 if (maxx-minn) GT floor(ma[0]) then goto, SLOW_SET_OP 383 389 384 390 ;; Work around a stupidity in the built-in IDL HISTOGRAM routine … … 405 411 result = temporary(wh+minn) 406 412 if tp1 NE tp2 then return, result 407 szr = size(result) & tpr = szr (szr(0)+1)413 szr = size(result) & tpr = szr[szr[0]+1] 408 414 409 415 ;; Cast to the original type if necessary 410 416 if tpr NE tp1 then begin 411 417 fresult = make_array(n_elements(result), type=tp1) 412 fresult (0)= temporary(result)418 fresult[0] = temporary(result) 413 419 result = temporary(fresult) 414 420 endif … … 424 430 ; works, but is complicated, so I forced it to go to SLOW_SET_OP. 425 431 ; ha = histogram(a, min=minn, max=maxx, reverse=ra) < 1 426 ; rr = ra (0:nbins) & mask = rr NE rr(1:*) & ra = ra(rr)*mask-1L+mask432 ; rr = ra[0:nbins] & mask = rr NE rr[1:*] & ra = ra[rr]*mask-1L+mask 427 433 ; hb = histogram(b, min=minn, max=maxx, reverse=rb) < 1 428 ; rr = rb (0:nbins) & mask = rr NE rr(1:*) & rb = rb(rr)*mask-1L+mask434 ; rr = rb[0:nbins] & mask = rr NE rr[1:*] & rb = rb[rr]*mask-1L+mask 429 435 ; ... AND/OR/XOR NOT masking here ... 430 ; ra = ra (wh) & rb = rb(wh)436 ; ra = ra[wh] & rb = rb[wh] 431 437 ; return, ra*(ra GE 0) + (rb+n1)*(ra LT 0) ;; is last 'ra' right? 432 438 -
trunk/SRC/ToBeReviewed/MATRICE/colle.pro
r31 r114 70 70 ;------------------------------------------------------------ 71 71 PRO UNDEFINE, varname 72 ; 73 compile_opt idl2, strictarrsubs 74 ; 72 75 tempvar = SIZE(TEMPORARY(varname)) 73 76 END … … 75 78 ;------------------------------------------------------------ 76 79 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 ; 81 compile_opt idl2, strictarrsubs 82 ; 77 83 res = -1 78 84 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/MATRICE/congridseb.pro
r31 r114 51 51 ;------------------------------------------------------------ 52 52 function congridseb, tableau, x, y 53 ; 54 compile_opt idl2, strictarrsubs 55 ; 53 56 res=tableau 54 57 taille = size(tableau) -
trunk/SRC/ToBeReviewed/MATRICE/different.pro
r31 r114 47 47 ;------------------------------------------------------------ 48 48 FUNCTION different, a, b 49 ; 50 compile_opt idl2, strictarrsubs 51 ; 49 52 50 53 ; = a and (not b) = elements in A but not in B -
trunk/SRC/ToBeReviewed/MATRICE/extrait.pro
r31 r114 85 85 FUNCTION extrait, tab, indicex, indicey, indicez, indicet 86 86 ;------------------------------------------------------------ 87 ; 88 compile_opt idl2, strictarrsubs 89 ; 87 90 taille = size(tab) 88 91 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/MATRICE/inter.pro
r31 r114 49 49 FUNCTION inter, a, b 50 50 ; 51 ; 52 compile_opt idl2, strictarrsubs 53 ; 51 54 case 1 of 52 55 n_elements(a) EQ 0:return, -1 -
trunk/SRC/ToBeReviewed/MATRICE/make_selection.pro
r31 r114 95 95 only_valid=only_valid,required=required, $ 96 96 quiet=quiet 97 ; 98 compile_opt idl2, strictarrsubs 99 ; 97 100 98 101 -
trunk/SRC/ToBeReviewed/MATRICE/union.pro
r31 r114 47 47 ;------------------------------------------------------------ 48 48 FUNCTION union, a, b 49 ; 50 compile_opt idl2, strictarrsubs 51 ; 49 52 IF a[0] LT 0 THEN RETURN, b ;A union NULL = a 50 53 IF b[0] LT 0 THEN RETURN, a ;B union NULL = b -
trunk/SRC/ToBeReviewed/MATRICE/zeroun.pro
r31 r114 35 35 ;------------------------------------------------------------ 36 36 function zeroun, n1,n2 37 ; 38 compile_opt idl2, strictarrsubs 39 ; 37 40 CASE N_PARAMS() OF 38 41 1:return, findgen(n1) mod 2 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/bar_plot.pro
r97 r114 131 131 outline=outline,overplot=overplot,background=background, $ 132 132 rotate=rotate, _EXTRA = ex 133 ; 134 compile_opt idl2, strictarrsubs 135 ; 133 136 if (n_params(d) eq 0) then begin ;Print call & return if no parameters 134 137 print,'bar_test,values,baselines=baselines,colors=colors,barnames=barnames,$' -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro
r67 r114 304 304 ;--------------------------------------------------------- 305 305 ; include common 306 ; 307 compile_opt idl2, strictarrsubs 308 ; 306 309 @cm_4mesh 307 310 @cm_4data -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt1d.pro
r74 r114 160 160 ;--------------------------------------------------------- 161 161 ; include common 162 ; 163 compile_opt idl2, strictarrsubs 164 ; 162 165 @cm_4mesh 163 166 @cm_4data … … 239 242 notanum = where(finite(z1d) EQ 0) 240 243 z1d[notanum] = 0 241 mask (where(z1d LT valmask/10))= 1244 mask[where(z1d LT valmask/10)] = 1 242 245 z1d[notanum] = !values.f_nan 243 ENDIF ELSE mask (where(z1d LT valmask/10))= 1246 ENDIF ELSE mask[where(z1d LT valmask/10)] = 1 244 247 ;----------------------------------------------------------------------------- 245 248 ; determination du min et du max apres la moyenne -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltbase.pro
r67 r114 135 135 , _EXTRA = ex 136 136 ;--------------------------------------------------------- 137 ; 138 compile_opt idl2, strictarrsubs 139 ; 137 140 @cm_4mesh 138 141 IF NOT keyword_set(key_forgetold) THEN BEGIN … … 215 218 ; ds le cas on unsur2 est active on reduit levels 216 219 if NOT keyword_set(nocontour) then begin 217 IF keyword_set(unsur2) THEN levels = levels (where(zeroun(n_elements(levels) ) eq 1))220 IF keyword_set(unsur2) THEN levels = levels[where(zeroun(n_elements(levels) ) eq 1)] 218 221 ; unlabsur est active? C_LABEL est passe via _EXTRA? 219 222 if keyword_set(unlabsur) THEN IF chkstru(ex, 'C_LABELS') THEN $ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltsc.pro
r35 r114 3 3 ; 4 4 ; scatter plot (inspired from plt1d) 5 ; 6 ; 7 compile_opt idl2, strictarrsubs 5 8 ; 6 9 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro
r74 r114 306 306 ;--------------------------------------------------------- 307 307 ; include common 308 ; 309 compile_opt idl2, strictarrsubs 310 ; 308 311 @cm_4mesh 309 312 @cm_4data -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro
r35 r114 266 266 ;--------------------------------------------------------- 267 267 ; include common 268 ; 269 compile_opt idl2, strictarrsubs 270 ; 268 271 @cm_4mesh 269 272 @cm_4data -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/sbar_plot.pro
r69 r114 51 51 52 52 PRO sbar_plot, Values, COLORS = colors, NOREINITPLT = noreinitplt, _extra = ex 53 ; 54 compile_opt idl2, strictarrsubs 55 ; 53 56 @common 54 57 ; 1) je reinitialise l''environnememt graphique (les variables !x, !y et !p): -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/scontour.pro
r35 r114 41 41 ;------------------------------------------------------------ 42 42 PRO scontour, x, y, z, NOREINITPLT = noreinitplt, _EXTRA = ex 43 ; 44 compile_opt idl2, strictarrsubs 45 ; 43 46 @common 44 47 ; 1) je reinitialise l''environnememt graphique (les variables !x, !y et !p): -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/splot.pro
r67 r114 46 46 ;------------------------------------------------------------ 47 47 PRO splot, x, y, NOREINITPLT = noreinitplt, _EXTRA = ex 48 ; 49 compile_opt idl2, strictarrsubs 50 ; 48 51 @common 49 52 ; 1) je reinitialise l''environnememt graphique (les variables !x, !y et !p): -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
r69 r114 86 86 , MIN = min, MAX = max, MASK = mask, OFFSET = offset, NOUSEINFOS = NOUSEINFOS $ 87 87 , NCOLORS = ncolors, NOINTERP = nointerp, _EXTRA = ex 88 ; 89 ; 90 compile_opt idl2, strictarrsubs 88 91 ; 89 92 IF n_elements(z2d) EQ 0 THEN return … … 136 139 if abs(mask) LT 1e6 then BEGIN 137 140 masked = where(arr EQ mask) 138 if masked[0] NE -1 then arr (masked) = min(arr(where(arr NE mask)))141 if masked[0] NE -1 then arr[masked] = min(arr[where(arr NE mask)]) 139 142 ENDIF ELSE BEGIN 140 143 masked = where(abs(arr) GE abs(mask)/10.) 141 if masked[0] NE -1 then arr (masked) = min(arr(where(abs(arr) LT abs(mask)/10.)))144 if masked[0] NE -1 then arr[masked] = min(arr[where(abs(arr) LT abs(mask)/10.)]) 142 145 ENDELSE 143 146 ENDIF ELSE masked = -1 -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/addaxe.pro
r37 r114 37 37 ;------------------------------------------------------------ 38 38 PRO addaxe, endpoints, type, posfenetre, _EXTRA = ex 39 ; 40 compile_opt idl2, strictarrsubs 41 ; 39 42 @common 40 43 ;--------------------------------------- -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/autoscale.pro
r37 r114 42 42 ; ce CI est un multiple de l'unite en unite log de 10. 43 43 ; 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 ci = (max-min)/20. 45 48 ci = 10.^floor(alog10(ci)) -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/axis4pltz.pro
r74 r114 41 41 ; 42 42 ; include common 43 ; 44 compile_opt idl2, strictarrsubs 45 ; 43 46 @cm_4mesh 44 47 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro
r37 r114 25 25 , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex 26 26 ;------------------------------------------------------------ 27 ; 28 compile_opt idl2, strictarrsubs 29 ; 27 30 @cm_general 28 31 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checkfield.pro
r69 r114 40 40 ;------------------------------------------------------------ 41 41 FUNCTION err_1d, type, n1, name, n2 42 ; 43 compile_opt idl2, strictarrsubs 44 ; 42 45 return, report(['Error in "' + type + '" type plot with a 1D input array:' $ 43 46 , 'the number of elements of the input vector ('+strtrim(n1, 1)+') ' $ … … 46 49 ; 47 50 FUNCTION err_2d, type, sz, nx, ny, nz 51 ; 52 compile_opt idl2, strictarrsubs 53 ; 48 54 @cm_4mesh 49 55 @cm_4cal … … 59 65 ; 60 66 FUNCTION err_3d, type, sz, nx, ny, nz 67 ; 68 compile_opt idl2, strictarrsubs 69 ; 61 70 @cm_4mesh 62 71 @cm_4cal … … 74 83 FUNCTION checkfield, field, procedure, TYPE = type, BOXZOOM = boxzoom, DIREC = direc, NOQUESTION = noquestion, VECTEUR = vecteur, WDEPTH = wdepth, _EXTRA = ex 75 84 ;-------------------------------------------------------------- 85 ; 86 compile_opt idl2, strictarrsubs 87 ; 76 88 ; include commons 77 89 @cm_4mesh -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checktypeminmax.pro
r37 r114 36 36 , XINDEX = xindex, YINDEX = yindex $ 37 37 , ENDPOINTS = endpoints, _extra = ex 38 ; 39 ; 40 compile_opt idl2, strictarrsubs 38 41 ; 39 42 @common -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro
r37 r114 44 44 ;------------------------------------------------------------ 45 45 PRO determineminmax, tab, mask, vraimin, vraimax, glam, gphi, MAXIN = maxin, MININ = minin, INTERVALLE = intervalle, usetri = usetri, ZEROMIDDLE = zeromiddle, _extra = ex 46 ; 47 compile_opt idl2, strictarrsubs 48 ; 46 49 @common 47 50 ;----------------------------------------------------------------------------- … … 71 74 endif 72 75 ; ma et mi : max et min sur les points mer 73 vraimax = max(tab (mer), min = vraimin, _extra = ex)76 vraimax = max(tab[mer], min = vraimin, _extra = ex) 74 77 sameminmax = testvar(var = minin) EQ testvar(var = maxin) 75 78 if n_elements(maxin) EQ 0 OR sameminmax then maxin = vraimax -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/givewindowsize.pro
r37 r114 3 3 ;------------------------------------------------------------ 4 4 ; include commons 5 ; 6 compile_opt idl2, strictarrsubs 7 ; 5 8 @cm_4ps 6 9 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/meridienparallele.pro
r37 r114 23 23 ;------------------------------------------------------------ 24 24 PRO meridienparallele, coupe 25 ; 26 compile_opt idl2, strictarrsubs 27 ; 25 28 @common 26 29 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placecolor.pro
r37 r114 42 42 ;------------------------------------------------------------ 43 43 ; include commons 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 @cm_4ps 45 48 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placedessin.pro
r69 r114 56 56 ;--------------------------------------------------------- 57 57 ; include common 58 ; 59 compile_opt idl2, strictarrsubs 60 ; 58 61 @cm_4ps 59 62 @cm_4mesh -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/projsegment.pro
r37 r114 50 50 FUNCTION projsegment, vecteur, bornes, MP = mp 51 51 ;-------------------------------------------------------------- 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 a1 = float(vecteur[0]) 53 56 b1 = float(vecteur[n_elements(vecteur)-1]) -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/restoreatt.pro
r37 r114 29 29 ;------------------------------------------------------------ 30 30 PRO restoreatt, struct 31 ; 32 compile_opt idl2, strictarrsubs 33 ; 31 34 @common 32 35 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/rotation.pro
r37 r114 28 28 29 29 PRO ROTATION,X,Y,DEG,NX,NY 30 ; 31 compile_opt idl2, strictarrsubs 32 ; 30 33 ang=deg*!dtor 31 34 … … 35 38 ;get angle in for loop so that zero radii will be left as zero angle 36 39 for i = 0,n_elements(r)-1 do $ 37 if r (i) ne 0 then theta(i) = atan(y(i),x(i)) ;range from -pi to +pi40 if r[i] ne 0 then theta[i] = atan(y[i],x[i]) ;range from -pi to +pi 38 41 ; 39 42 ;add rotation angle -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/saveatt.pro
r37 r114 26 26 ;------------------------------------------------------------ 27 27 FUNCTION saveatt 28 ; 29 compile_opt idl2, strictarrsubs 30 ; 28 31 @common 29 32 return, {n:varname,g:vargrid,d:vardate,e:varexp,u:varunit,m:valmask} -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/terminedessin.pro
r37 r114 34 34 PRO terminedessin, POST = post, SMALL = small, _extra = ex 35 35 ;--------------------------------------------------------- 36 ; 37 compile_opt idl2, strictarrsubs 38 ; 36 39 @cm_4ps 37 40 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro
r39 r114 50 50 pro label, cas, min, max, ncontour, level_z2d, colnumb, NLEVEL = nlevel $ 51 51 ,INTERVALLE=intervalle, STRICTFILL = strictfill 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 @common 53 56 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN … … 83 86 level_z2d = min + intervalle*findgen(Ncontour) 84 87 colnumb = ncoul*(findgen(Ncontour))/Ncontour+ncoul/(2*ncontour) 85 max=level_z2d (Ncontour-1)+intervalle88 max=level_z2d[Ncontour-1]+intervalle 86 89 end 87 90 ; label pour faire les memes sss que dessier -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label_date.pro
r97 r114 99 99 FUNCTION LABEL_DATE, axis, index, x, DATE_FORMAT = format, MONTHS = months, $ 100 100 OFFSET= offs, _EXTRA = ex 101 ; 102 compile_opt idl2, strictarrsubs 103 ; 101 104 COMMON label_date_com, fmt, month_chr, offset 102 105 -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label_gmt.pro
r39 r114 3 3 ; 4 4 PRO label_gmt, min, max, intervalle, ncoul, ncontour, level_z2d, coul 5 ; 6 compile_opt idl2, strictarrsubs 7 ; 5 8 @common 6 9 @com_eg … … 22 25 ncontour = fix((max-min)/intervalle) 23 26 level_z2d = min + intervalle*findgen(Ncontour) 24 max=level_z2d (Ncontour-1)+intervalle27 max=level_z2d[Ncontour-1]+intervalle 25 28 26 29 print, ' Number of contour intervals, plotting min & max ', ncontour, min, max … … 40 43 ; difference plot : lighter below first negative interval 41 44 red[51:98] = long((100.-float(grey_shade_2))/100.*255.) 42 red (1:48)= long((100.-float(grey_shade))/100.*255.)45 red[1:48] = long((100.-float(grey_shade))/100.*255.) 43 46 red[50] = 255 44 47 -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/lataxe.pro
r39 r114 38 38 ;------------------------------------------------------------ 39 39 ; on ramenne value ds le segment [0,180] 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 lat=value mod 360 41 44 if lat lt 0 then lat=lat+360 -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/lonaxe.pro
r39 r114 38 38 ;------------------------------------------------------------ 39 39 ; on ramenne value ds le segment [0,360[ 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 lon=value mod 360 41 44 if lon lt 0 then lon=lon+360 -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/ajoutvect.pro
r41 r114 54 54 ;------------------------------------------------------------ 55 55 pro ajoutvect,vecteur, vectlegende, UNVECTSUR=unvectsur,VECTMIN=vectmin, VECTMAX=vectmax, _EXTRA = ex 56 ; 57 compile_opt idl2, strictarrsubs 58 ; 56 59 @common 57 60 tempsun = systime(1) ; pour key_performance … … 128 131 ; construction de u et v aux pts T 129 132 ;----------------------------------------------------------- 130 a=u (0,*)133 a=u[0,*] 131 134 u=(u+shift(u,1,0))/2. 132 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*)=a133 a=v (*,0)135 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*]=a 136 a=v[*,0] 134 137 v=(v+shift(v,0,1))/2. 135 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0)=a138 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0]=a 136 139 ;---------------------------------------------------------------------------- 137 140 ; attribution du mask et des tableau de longitude et latitude … … 191 194 if interpolle then t2 = msku*shift(msku,1,0)*mskv*shift(mskv,0,1) $ 192 195 ELSE t2 = tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 193 if NOT keyword_set(key_periodic) OR nx NE jpi then t2 (0, *)=0.194 t2 (*,0)=0.196 if NOT keyword_set(key_periodic) OR nx NE jpi then t2[0, *]=0. 197 t2[*,0]=0. 195 198 terre=where(t2 eq 0) 196 199 if terre[0] ne -1 then begin 197 u (terre)=1e5198 v (terre)=1e5200 u[terre]=1e5 201 v[terre]=1e5 199 202 ENDIF 200 203 ;----------------------------------------------------------- -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro
r41 r114 81 81 ; angle peut etre un tableau. 82 82 ; 83 ; 84 compile_opt idl2, strictarrsubs 85 ; 83 86 @common 84 87 ; quelle est la longeur en coordonnees normales d''un trait qui fera 1 … … 103 106 ; normalise le vecteur 104 107 ; 108 ; 109 compile_opt idl2, strictarrsubs 110 ; 105 111 IF n_elements(w) NE 0 THEN BEGIN 106 112 norme = sqrt(u^2.+v^2.+w^2.) 107 113 ind = where(norme NE 0) 108 u (ind) = u(ind)/norme[ind]109 v (ind) = v(ind)/norme[ind]110 w (ind) = w(ind)/norme[ind]114 u[ind] = u[ind]/norme[ind] 115 v[ind] = v[ind]/norme[ind] 116 w[ind] = w[ind]/norme[ind] 111 117 ENDIF ELSE BEGIN 112 118 norme = sqrt(u^2.+v^2.) 113 119 ind = where(norme NE 0) 114 u (ind) = u(ind)/norme[ind]115 v (ind) = v(ind)/norme[ind]120 u[ind] = u[ind]/norme[ind] 121 v[ind] = v[ind]/norme[ind] 116 122 ENDELSE 117 123 END … … 120 126 , VECTCOLOR = vectcolor, VECTTHICK = vectthick, VECTREFPOS = vectrefpos $ 121 127 , VECTREFFORMAT = vectrefformat, NOVECTREF = novectref, _extra = extra 128 ; 129 compile_opt idl2, strictarrsubs 130 ; 122 131 @common 123 132 tempsun = systime(1) ; pour key_performance … … 202 211 r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 203 212 ; 204 x0 = reform(r (0, *), nx, ny)205 y0 = reform(r (1, *), nx, ny)206 z0 = reform(r (2, *), nx, ny)213 x0 = reform(r[0, *], nx, ny) 214 y0 = reform(r[1, *], nx, ny) 215 z0 = reform(r[2, *], nx, ny) 207 216 ; 208 217 ; etape 1, b) 209 218 ; 210 219 ; Construction du vecteur nu (resp. nv), vecteur norme porte par 211 ; l''axe des points u (i,j) et u(i-1,j) (resp v(i,j) et v(i,j-1))220 ; l''axe des points u[i,j] et u[i-1,j] (resp v[i,j] et v[i,j-1]) 212 221 ; qui definissent pour chaque point sur la shere les directions locales 213 222 ; associee a u et v. ces vecteurs definissent un repere orthonorme … … 219 228 radius = replicate(1,nxgd*nygd) 220 229 IF finite(glamu[0]*gphiu[0]) NE 0 THEN $ 221 coord_sphe = transpose([ [(glamu[indice2d])[*]], [(gphiu[indice2d])[*]], [radius (*)] ]) $222 ELSE coord_sphe = transpose([ [(glamf[indice2d])[*]], [(gphit[indice2d])[*]], [radius (*)] ])230 coord_sphe = transpose([ [(glamu[indice2d])[*]], [(gphiu[indice2d])[*]], [radius[*]] ]) $ 231 ELSE coord_sphe = transpose([ [(glamf[indice2d])[*]], [(gphit[indice2d])[*]], [radius[*]] ]) 223 232 r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 224 233 ; coordonnes de points de la grille u en cartesien 225 ux = reform(r (0, *), nxgd, nygd)226 uy = reform(r (1, *), nxgd, nygd)227 uz = reform(r (2, *), nxgd, nygd)234 ux = reform(r[0, *], nxgd, nygd) 235 uy = reform(r[1, *], nxgd, nygd) 236 uz = reform(r[2, *], nxgd, nygd) 228 237 ; calcul de nu 229 238 nux = ux-shift(ux, 1, 0) … … 242 251 ; definition de nv 243 252 IF finite(glamv[0]*gphiv[0]) NE 0 THEN $ 244 coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius (*)] ]) $245 ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius (*)] ])253 coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius[*]] ]) $ 254 ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ]) 246 255 r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 247 256 ; coordonnes de points de la grille v en cartesien 248 vx = reform(r (0, *), nxgd, nygd)249 vy = reform(r (1, *), nxgd, nygd)250 vz = reform(r (2, *), nxgd, nygd)257 vx = reform(r[0, *], nxgd, nygd) 258 vy = reform(r[1, *], nxgd, nygd) 259 vz = reform(r[2, *], nxgd, nygd) 251 260 ; calcul de nv 252 261 nvx = vx-shift(vx, 0, 1) … … 290 299 ; coordonnees de la pointe en spherique 291 300 292 coord_rect = transpose([ [x1 (*)], [y1(*)], [z1(*)] ])301 coord_rect = transpose([ [x1[*]], [y1[*]], [z1[*]] ]) 293 302 r = cv_coord(from_rect=coord_rect,/to_sphere,/degrees) 294 glam1 = reform(r (0, *), nx, ny)295 gphi1 = reform(r (1, *), nx, ny)303 glam1 = reform(r[0, *], nx, ny) 304 gphi1 = reform(r[1, *], nx, ny) 296 305 297 306 ; … … 303 312 ; 304 313 ind = where(glam1 LT !x.range[0] AND glam1+360. LE !x.range[1]) 305 if ind[0] NE -1 then glam1 (ind) = glam1(ind)+360.314 if ind[0] NE -1 then glam1[ind] = glam1[ind]+360. 306 315 ind = where(glam1 GT !x.range[1] AND glam1-360. GE !x.range[0]) 307 if ind[0] NE -1 then glam1 (ind) = glam1(ind)-360.316 if ind[0] NE -1 then glam1[ind] = glam1[ind]-360. 308 317 309 318 ind = where(glam LT !x.range[0] AND glam+360. LE !x.range[1]) 310 if ind[0] NE -1 then glam (ind) = glam(ind)+360.319 if ind[0] NE -1 then glam[ind] = glam[ind]+360. 311 320 ind = where(glam GT !x.range[1] AND glam-360. GE !x.range[0]) 312 if ind[0] NE -1 then glam (ind) = glam(ind)-360.321 if ind[0] NE -1 then glam[ind] = glam[ind]-360. 313 322 ; 314 323 ; … … 316 325 ; 317 326 r = convert_coord(glam,gphi,/data,/to_normal) 318 x0 = r (0, *); coordonnes normales du debut de la fleche319 y0 = r (1, *);327 x0 = r[0, *] ; coordonnes normales du debut de la fleche 328 y0 = r[1, *] ; 320 329 321 330 r = convert_coord(glam1,gphi1,/data,/to_normal) 322 x1 = r (0, *); coordonnes normales de la fin de la fleche (avant scaling)323 y1 = r (1, *);331 x1 = r[0, *] ; coordonnes normales de la fin de la fleche (avant scaling) 332 y1 = r[1, *] ; 324 333 ; 325 334 ; tests pour eviter que des fleches soient dessineees hors du domaine … … 384 393 ; 385 394 r = cv_coord(from_polar = transpose([ [dirpol[*]], [norme[*]] ]), /to_rect) 386 composantex = r (0, *)387 composantey = r (1, *)395 composantex = r[0, *] 396 composantey = r[1, *] 388 397 ; 389 398 x1 = x0+composantex … … 395 404 396 405 points = where(msk EQ 1) 397 IF points[0] NE -1 THEN arrow, x0 (points), y0(points), x1(points), y1(points), /norm $406 IF points[0] NE -1 THEN arrow, x0[points], y0[points], x1[points], y1[points], /norm $ 398 407 , hsize = -.2, COLOR = vectcolor, THICK = vectthick 399 408 ; -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/velovect.pro
r97 r114 100 100 PRO VELOVECT,U,V,X,Y, Missing = Missing, Length = length, Dots = dots, $ 101 101 Color=color, CLIP=clip, NOCLIP=noclip, OVERPLOT=overplot, _EXTRA=extra 102 ; 103 compile_opt idl2, strictarrsubs 104 ; 102 105 on_error,2 ;Return to caller if an error occurs 103 106 s = size(u) -
trunk/SRC/ToBeReviewed/PLOTS/axe.pro
r42 r114 50 50 ;------------------------------------------------------------ 51 51 PRO axe, coupe,tempsmin,tempsmax, REVERSE_X = reverse_x, REVERSE_Y = reverse_y, SIN = sin, SEPDATE = sepdate, DIGITSYEAR = digitsyear, _EXTRA = ex 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 @common 53 56 tempsun = systime(1) ; pour key_performance -
trunk/SRC/ToBeReviewed/PLOTS/legende.pro
r42 r114 47 47 , INTERVALLE = intervalle, TYPE_YZ = type_yz, VARNAME2 = varname2 $ 48 48 , NPTS = npts, _EXTRA = ex 49 ; 50 compile_opt idl2, strictarrsubs 51 ; 49 52 @common 50 53 tempsun = systime(1) ; pour key_performance -
trunk/SRC/ToBeReviewed/PLOTS/plotsym.pro
r97 r114 32 32 angle=angle, box=box, line=line, scale=scale, $ 33 33 _extra=extra 34 ; 35 compile_opt idl2, strictarrsubs 36 ; 34 37 if not keyword_set(scale) then scale=1.0 35 38 if not keyword_set(angle) then angle=0.0 -
trunk/SRC/ToBeReviewed/PLOTS/reinitplt.pro
r42 r114 41 41 pro reinitplt, all=all,x=x,y=y,z=z,p=p, invert=invert 42 42 ;------------------------------------------------------------ 43 ; 44 compile_opt idl2, strictarrsubs 45 ; 43 46 clearx = 0 44 47 cleary = 0 -
trunk/SRC/ToBeReviewed/PLOTS/style.pro
r42 r114 44 44 ;------------------------------------------------------------ 45 45 pro style,labstyle,level_z2d,linestyle,thick 46 ; 47 compile_opt idl2, strictarrsubs 48 ; 46 49 case labstyle of 47 50 0: begin … … 75 78 a=replicate(0,n_elements(level_z2d)-n) 76 79 c=replicate(2,n) 77 if seuil eq level_z2d (n)then begin80 if seuil eq level_z2d[n] then begin 78 81 thick=[replicate(1,n),2,replicate(1,n_elements(level_z2d)-1-n)] 79 82 linestyle=[c,a] … … 86 89 3: begin 87 90 n = n_elements(level_z2d) 88 seuil = level_z2d (1+n/2)91 seuil = level_z2d[1+n/2] 89 92 90 93 thick = intarr(n) 91 thick (indgen((n)/4)*4)= 192 thick (indgen((n)/4)*4+1)= 193 thick (indgen((n)/4)*4+2)= 294 thick (indgen((n)/4)*4+3)= 194 thick[indgen(n/4)*4] = 1 95 thick[indgen(n/4)*4+1] = 1 96 thick[indgen(n/4)*4+2] = 2 97 thick[indgen(n/4)*4+3] = 1 95 98 96 99 linestyle = intarr(n) 97 linestyle (indgen((n)/4)*4)= 398 linestyle (indgen((n)/4)*4+1)= 099 linestyle (indgen((n)/4)*4+2)= 0100 linestyle (indgen((n)/4)*4+3)= 0100 linestyle[indgen(n/4)*4] = 3 101 linestyle[indgen(n/4)*4+1] = 0 102 linestyle[indgen(n/4)*4+2] = 0 103 linestyle[indgen(n/4)*4+3] = 0 101 104 102 105 labels = intarr(n) 103 labels (indgen((n)/2)*2)= 1104 labels (n/2)= 0106 labels[indgen(n/2)*2] = 1 107 labels[n/2] = 0 105 108 106 109 return -
trunk/SRC/ToBeReviewed/PLOTS/symbols.pro
r42 r114 50 50 ;- 51 51 pro symbols,nsym,scale,color=col 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 on_error,2 53 56 fill = 0 … … 65 68 xarr = fltarr(5) 66 69 yarr = xarr 67 xarr (1)= 10.68 xarr (2)= 6.69 yarr (2)= 2.70 xarr[1] = 10. 71 xarr[2] = 6. 72 yarr[2] = 2. 70 73 ;nsyms greater than 10 should be filled arrows 71 74 if nsym gt 10 then begin 72 xarr (3)= 6.73 xarr (4)= 10.74 yarr (3)= -2.75 xarr[3] = 6. 76 xarr[4] = 10. 77 yarr[3] = -2. 75 78 fill = 1 76 79 endif else begin 77 xarr (3)= 10.78 xarr (4)= 6.79 yarr (4)= -2.80 xarr[3] = 10. 81 xarr[4] = 6. 82 yarr[4] = -2. 80 83 endelse 81 84 case 1 of … … 85 88 xarr = extrac(xarr,0,11) 86 89 yarr = extrac(yarr,0,11) 87 yarr (6)= 0.588 xarr (7)= 689 yarr (7)= 0.590 xarr (8)= 691 yarr (8)= -0.592 yarr (9)= -0.590 yarr[6] = 0.5 91 xarr[7] = 6 92 yarr[7] = 0.5 93 xarr[8] = 6 94 yarr[8] = -0.5 95 yarr[9] = -0.5 93 96 if nsym eq 12 then begin 94 97 rotation,xarr,yarr,180,nx,ny … … 124 127 xarr = fltarr(5) + 3 125 128 yarr = xarr 126 xarr (1)= -3.127 xarr (2)= -3.128 yarr (2)= -3.129 yarr (3)= -3.129 xarr[1] = -3. 130 xarr[2] = -3. 131 yarr[2] = -3. 132 yarr[3] = -3. 130 133 if (nsym eq 21)+(nsym eq 31) then begin 131 134 rotation,xarr,yarr,45,nx,ny … … 139 142 yarr = fltarr(4) - 6./4. 140 143 xarr = fltarr(4) - 6./2. 141 xarr (1)= 6./2.142 xarr (2)= 0.143 yarr (2)= 6.*sqrt(3.)/2. - 6./4.144 xarr[1] = 6./2. 145 xarr[2] = 0. 146 yarr[2] = 6.*sqrt(3.)/2. - 6./4. 144 147 if nsym eq 32 then fill = 1 145 148 end … … 147 150 xarr = fltarr(2) + 1 148 151 yarr = xarr * 0. 149 xarr (1)= -1.152 xarr[1] = -1. 150 153 end 151 154 endcase -
trunk/SRC/ToBeReviewed/POSTSCRIPT/calibre.pro
r16 r114 88 88 , LANDSCAPE = lanscape, _extra = ex 89 89 ;--------------------------------------------------------- 90 ; 91 compile_opt idl2, strictarrsubs 92 ; 90 93 @cm_4ps 91 94 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/POSTSCRIPT/chcolps.pro
r74 r114 1 1 PRO format_colortable_hexa, table 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 tvlct, r, g, b, /get … … 22 25 ; 23 26 ; Fabrique le bloc de colortable 27 ; 28 ; 29 compile_opt idl2, strictarrsubs 24 30 ; 25 31 … … 49 55 ; 50 56 ; recupere les palettes 57 ; 58 ; 59 compile_opt idl2, strictarrsubs 51 60 ; 52 61 lct, n1 -
trunk/SRC/ToBeReviewed/STATISTICS/a_correlate2d.pro
r21 r114 61 61 62 62 FUNCTION Auto_Cov2d, X, Lag, Double = Double, zero2nan = zero2nan 63 ; 64 compile_opt idl2, strictarrsubs 65 ; 63 66 XDim = SIZE(X, /dimensions) 64 67 nx = XDim[0] … … 76 79 77 80 FUNCTION A_Correlate2d, X, Lag, Covariance = Covariance, Double = Double 81 ; 82 compile_opt idl2, strictarrsubs 83 ; 78 84 79 85 ;Compute the sample-autocorrelation or autocovariance of (Xt, Xt+l) -
trunk/SRC/ToBeReviewed/STATISTICS/a_timecorrelate.pro
r21 r114 79 79 FUNCTION TimeAuto_Cov, X, M, nT, Double = Double, zero2nan = zero2nan 80 80 ;Sample autocovariance function 81 ; 82 compile_opt idl2, strictarrsubs 83 ; 81 84 TimeDim = size(X, /n_dimensions) 82 85 Xmean = TOTAL(X, TimeDim, Double = Double) / nT … … 107 110 108 111 FUNCTION A_TimeCorrelate, X, Lag, COVARIANCE = Covariance, DOUBLE = Double 112 ; 113 compile_opt idl2, strictarrsubs 114 ; 109 115 110 116 ;Compute the sample-autocorrelation or autocovariance of (Xt, Xt+l) -
trunk/SRC/ToBeReviewed/STRING/.idlwave_catalog
r76 r114 15 15 ("putfile" pro nil (lib "putfile.pro" nil "saxo") "%s, file, s" (nil ("error") ("help"))) 16 16 ("STR_SIZE" fun nil (lib "str_size.pro" nil "saxo") "Result = %s(string, targetWidth)" (nil ("INITSIZE") ("STEP"))) 17 (" Strcnt" fun nil (lib "strcnt.pro" nil "saxo") "Result = %s(strn, substrn, startpos)" (nil ("HELP")))17 ("strcnt" fun nil (lib "strcnt.pro" nil "saxo") "Result = %s(strn, substrn, startpos)" (nil ("HELP"))) 18 18 ("too_cool" fun nil (lib "string2struct.pro" nil "saxo") "Result = %s" (nil ("_extra"))) 19 19 ("string2struct" fun nil (lib "string2struct.pro" nil "saxo") "Result = %s(strVal)" (nil)) -
trunk/SRC/ToBeReviewed/STRING/chkeywd.pro
r18 r114 73 73 ;------------------------------------------------------------ 74 74 FUNCTION chkeywd, stringin, keywdname, keywdvalue, SEPARATOR = separator, AFTER = after 75 ; 76 compile_opt idl2, strictarrsubs 77 ; 75 78 76 79 stringout = stringin -
trunk/SRC/ToBeReviewed/STRING/lenstr.pro
r97 r114 27 27 28 28 function lenstr,str 29 ; 30 compile_opt idl2, strictarrsubs 31 ; 29 32 dsave=!d.name 30 33 … … 54 57 w=fltarr(nn) 55 58 for i=0,nn-1 do begin 56 xyouts,0,0,/device,str (i),width=ww57 w (i)=ww59 xyouts,0,0,/device,str[i],width=ww 60 w[i]=ww 58 61 endfor 59 62 end -
trunk/SRC/ToBeReviewed/STRING/str_size.pro
r18 r114 64 64 65 65 FUNCTION STR_SIZE, string, targetWidth, INITSIZE=initsize, STEP=step 66 ; 67 compile_opt idl2, strictarrsubs 68 ; 66 69 67 70 ON_ERROR, 1 -
trunk/SRC/ToBeReviewed/STRING/strcnt.pro
r18 r114 48 48 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 49 49 ;- 50 FUNCTION Strcnt, strn, substrn, startpos, $50 FUNCTION strcnt, strn, substrn, startpos, $ 51 51 HELP=Help 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 53 56 ; Return to caller if error. … … 88 91 IF strlen(substrn) EQ 1 THEN BEGIN 89 92 tmpstrn = byte(TmpStrn) 90 count = n_elements(where(TmpStrn EQ (byte(substrn)) (0)))93 count = n_elements(where(TmpStrn EQ (byte(substrn))[0])) 91 94 ENDIF ELSE BEGIN 92 95 count = 0L -
trunk/SRC/ToBeReviewed/STRING/string2struct.pro
r97 r114 4 4 ; 5 5 function too_cool,_extra=extra 6 ; 7 compile_opt idl2, strictarrsubs 8 ; 6 9 return,extra 7 10 end … … 68 71 69 72 function string2struct,strVal 73 ; 74 compile_opt idl2, strictarrsubs 75 ; 70 76 r = execute('extra = too_cool(' + strVal[0] +')') 71 77 ;if r = 0 then user did not enter keywords correctly so -
trunk/SRC/ToBeReviewed/STRING/strkeywd.pro
r18 r114 71 71 ;------------------------------------------------------------ 72 72 FUNCTION strkeywd, struct 73 ; 74 compile_opt idl2, strictarrsubs 75 ; 73 76 if size(struct, /type) NE 8 then return, '' 74 77 tname = tag_names(struct) -
trunk/SRC/ToBeReviewed/STRING/strrepl.pro
r18 r114 76 76 77 77 function strrepl,str,agument1,rchar 78 ; 79 compile_opt idl2, strictarrsubs 80 ; 78 81 79 82 if (n_elements(str) eq 0) then return,'' -
trunk/SRC/ToBeReviewed/STRING/strright.pro
r18 r114 52 52 53 53 function strright,s,lastn 54 ; 55 compile_opt idl2, strictarrsubs 56 ; 54 57 55 58 on_error,2 ; return to caller -
trunk/SRC/ToBeReviewed/STRING/strsci.pro
r18 r114 106 106 function StrSci, Data, Format=Format, POT_Only=POT_Only, $ 107 107 MANTISSA_ONLY=MANTISSA_ONLY,SHORT=SHORT,TRIM=TRIM 108 ; 109 compile_opt idl2, strictarrsubs 110 ; 108 111 109 112 ;==================================================================== -
trunk/SRC/ToBeReviewed/STRING/strtok.pro
r18 r114 59 59 FUNCTION Strtok, string, token, $ 60 60 TRIM=trim, HELP=Help 61 ; 62 compile_opt idl2, strictarrsubs 63 ; 61 64 62 65 ; Back to the caller if error occurs. -
trunk/SRC/ToBeReviewed/STRING/strtrans.pro
r18 r114 60 60 FUNCTION strtrans, InputString, from, to, ned, $ 61 61 HELP=Help 62 ; 63 compile_opt idl2, strictarrsubs 64 ; 62 65 63 66 ; Bomb out to caller if error. -
trunk/SRC/ToBeReviewed/STRING/strwhere.pro
r18 r114 60 60 61 61 function strwhere,str,schar,Count 62 ; 63 compile_opt idl2, strictarrsubs 64 ; 62 65 63 66 -
trunk/SRC/ToBeReviewed/STRING/tostr.pro
r18 r114 50 50 ;------------------------------------------------------------ 51 51 FUNCTION tostr, input 52 ; 53 compile_opt idl2, strictarrsubs 54 ; 52 55 53 56 case 1 of -
trunk/SRC/ToBeReviewed/STRUCTURE/chkstru.pro
r27 r114 27 27 ; INDEX --> a named variable that will contain the indices of 28 28 ; the required field names in the structure. They can then 29 ; be assessed through structure.(index (i)) . Index will29 ; be assessed through structure.(index[i]) . Index will 30 30 ; contain -1 for all fields entries that are not in the 31 31 ; structure. … … 75 75 76 76 function chkstru,structure,fields,index=index,verbose=verbose, extract = extract 77 ; 78 compile_opt idl2, strictarrsubs 79 ; 77 80 78 81 … … 91 94 92 95 s = size(structure) 93 if (s (1+s(0))ne 8) then begin96 if (s[1+s[0]] ne 8) then begin 94 97 if(keyword_set(verbose)) then $ 95 98 ras = report('CHKSTRU: ** No structure passed ! **') … … 109 112 110 113 for i=0,n_elements(fields)-1 do begin 111 ind = where(names eq strupcase(fields (i)))112 if (ind (0)lt 0) then begin114 ind = where(names eq strupcase(fields[i])) 115 if (ind[0] lt 0) then begin 113 116 if(keyword_set(verbose)) then $ 114 ras = report('CHKSTRU: ** Cannot find field '+fields (i)+' ! **')115 endif else index (i) = ind(0)117 ras = report('CHKSTRU: ** Cannot find field '+fields[i]+' ! **') 118 endif else index[i] = ind[0] 116 119 endfor 117 120 -
trunk/SRC/ToBeReviewed/STRUCTURE/extractstru.pro
r27 r114 60 60 ;------------------------------------------------------------ 61 61 FUNCTION extractstru, stru, liste, GARDE = garde, VIRE = vire 62 ; 63 compile_opt idl2, strictarrsubs 64 ; 62 65 if size(stru, /type) NE 8 then return, -1 63 66 if size(liste, /type) NE 7 then return, -1 -
trunk/SRC/ToBeReviewed/STRUCTURE/mixstru.pro
r74 r114 60 60 ;------------------------------------------------------------ 61 61 FUNCTION mixstru, stru1, stru2 62 ; 63 compile_opt idl2, strictarrsubs 64 ; 62 65 @cm_general 63 66 -
trunk/SRC/ToBeReviewed/STRUCTURE/struct2string.pro
r27 r114 45 45 ;------------------------------------------------------------ 46 46 FUNCTION struct2string, struct, CUT_IN_STRING = cut_in_string, MAX_STRUCT_LENGTH = max_struct_length, DIRECT2STRING = direct2string 47 ; 48 compile_opt idl2, strictarrsubs 49 ; 47 50 if size(struct, /type) NE 8 then return, '' 48 51 if NOT keyword_set(max_struct_length) then max_struct_length = 10000l -
trunk/SRC/ToBeReviewed/STRUCTURE/where_tag.pro
r97 r114 55 55 RANGE=range, VALUES=values 56 56 ;First check required parameters... 57 ; 58 compile_opt idl2, strictarrsubs 59 ; 57 60 58 61 Ntag = N_tags( Struct ) -
trunk/SRC/ToBeReviewed/TRIANGULATION/ciseauxtri.pro
r29 r114 39 39 FUNCTION ciseauxtri, triang, glam, gphi, TOUT = tout, _EXTRA = ex 40 40 ;--------------------------------------------------------- 41 ; 42 compile_opt idl2, strictarrsubs 43 ; 41 44 @cm_4mesh 42 45 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/TRIANGULATION/completecointerre.pro
r29 r114 36 36 ;------------------------------------------------------------ 37 37 PRO draw_corner_triangle, lons, lats, seuil, CONT_COLOR = cont_color, _extra = ex 38 ; 39 compile_opt idl2, strictarrsubs 40 ; 38 41 @cm_4mesh 39 42 ; the triangle must not be out of the domain … … 55 58 , CONT_COLOR = cont_color, INDICEZOOM = indicezoom $ 56 59 , _extra = ex 60 ; 61 compile_opt idl2, strictarrsubs 62 ; 57 63 @common 58 64 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/TRIANGULATION/definetri.pro
r29 r114 89 89 ;- 90 90 FUNCTION definetri, nx, ny, downward 91 ; 92 compile_opt idl2, strictarrsubs 93 ; 91 94 nx = long(nx) 92 95 ny = long(ny) … … 109 112 ; the lower-left corner of the rectangle. 110 113 upward = bytarr(nx, ny)+1 111 upward (*, ny-1)= 0112 upward (nx-1, *)= 0114 upward[*, ny-1] = 0 115 upward[nx-1, *] = 0 113 116 if n_elements(downward) NE 0 then upward[downward] = 0 114 117 upward = where(upward EQ 1) -
trunk/SRC/ToBeReviewed/TRIANGULATION/definetri_e.pro
r29 r114 1 1 function numtri, index, nx, ny 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 3 6 y=index/nx … … 56 59 ;- 57 60 FUNCTION definetri_e, nx, ny, singular, SHIFTED = shifted 61 ; 62 compile_opt idl2, strictarrsubs 63 ; 58 64 nx = long(nx) 59 65 ny = long(ny) -
trunk/SRC/ToBeReviewed/TRIANGULATION/dessinetri.pro
r29 r114 54 54 55 55 PRO dessinetri, tri, x, y, WAIT = wait, ONEBYONE = onebyone, FILL = fill, CHANGECOLOR = changecolor, _extra = ex 56 ; 57 compile_opt idl2, strictarrsubs 58 ; 56 59 @common 57 60 tempsun = systime(1) ; pour key_performance -
trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_c.pro
r29 r114 1 1 PRO drawcoast_c, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, _extra = ex 2 2 ;--------------------------------------------------------- 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 @cm_4mesh 4 7 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_e.pro
r29 r114 1 1 PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, onemore = onemore, _extra = ex 2 2 ;--------------------------------------------------------- 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 @cm_4mesh 4 7 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/TRIANGULATION/drawsectionbottom.pro
r67 r114 46 46 , OVERPLOT = overplot, _extra = ex 47 47 ;--------------------------------------------------------- 48 ; 49 compile_opt idl2, strictarrsubs 50 ; 48 51 @cm_general 49 52 IF NOT keyword_set(key_forgetold) THEN BEGIN … … 92 95 ; appens when the bottom limit is defined between T[k] and W[k] 93 96 ; points) 94 IF min(depthsin) GT -1 THEN BEGIN97 IF min(depthsin) GT -1 OR max(total(mask, 2)) EQ nz THEN BEGIN 95 98 zmin = min(!y.range)-deltaz 96 99 depths = [[replicate(zmin, nx)], [depths]] -
trunk/SRC/ToBeReviewed/TRIANGULATION/fillcornermask.pro
r67 r114 38 38 , CONT_COLOR = cont_color, INDICEZOOM = indicezoom $ 39 39 , _extra = ex 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 @common 41 44 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/TRIANGULATION/section.pro
r29 r114 39 39 ;--------------------------------------------------------- 40 40 ; include common 41 ; 42 compile_opt idl2, strictarrsubs 43 ; 41 44 @cm_4mesh 42 45 @cm_4data … … 342 345 xsave = !x 343 346 ysave = !y 344 plt, findgen(nx, ny), /nodata, /nofill, /rempli, title = '', subtitle = '', coast_thick = 2, window = showbuild 347 plt, findgen(nx, ny), /nodata, /nofill, /rempli, title = '', subtitle = '' $ 348 , coast_thick = 2, window = showbuild 345 349 !p.title = '' 346 350 !p.subtitle = '' … … 356 360 plots, float(points2), imaginary(points2), color = 150, psym = 1 357 361 plots, float(inter), imaginary(inter), color = 250, psym = 1 358 359 IF terre[0] NE -1 THEN plots, float(inter[terre]), imaginary(inter[terre]), color = 0, psym = 1360 362 363 ; ?? bug ?? IF terre[0] NE -1 THEN plots, float(terre[inter]), imaginary(terre[inter]), color = 0, psym = 1 364 361 365 ; dummy = '' 362 366 ; read, dummy, prompt = 'press return to continue' -
trunk/SRC/ToBeReviewed/TRIANGULATION/tracecote.pro
r29 r114 55 55 ;-------------------------------------------------------------- 56 56 ; include commons 57 ; 58 compile_opt idl2, strictarrsubs 59 ; 57 60 @cm_4data 58 61 @cm_4mesh … … 90 93 ; de projection choisie et du suport surlequel on fait le dessin 91 94 ; (ecran ou postscript) 92 z = convert_coord(xf (*),yf(*),/data,/to_normal)95 z = convert_coord(xf[*],yf[*],/data,/to_normal) 93 96 xf = reform(z[0, *], nx, ny) 94 97 yf = reform(z[1, *], nx, ny) -
trunk/SRC/ToBeReviewed/TRIANGULATION/tracemask.pro
r29 r114 40 40 ;------------------------------------------------------------ 41 41 PRO tracemask, maskentree, xin, yin, COAST_COLOR = coast_color, COAST_THICK = coast_thick, OVERPLOT = overplot, _extra = ex 42 ; 43 ; 44 compile_opt idl2, strictarrsubs 42 45 ; 43 46 if keyword_set(overplot) then return -
trunk/SRC/ToBeReviewed/TRIANGULATION/triangule.pro
r29 r114 1 1 FUNCTION triangule, maskentree, BASIC = basic, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 @common 3 6 ; -
trunk/SRC/ToBeReviewed/TRIANGULATION/triangule_c.pro
r29 r114 82 82 ;------------------------------------------------------------ 83 83 FUNCTION triangule_c, maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, BASIC = basic, KEEP_CONT = keep_cont 84 ; 85 compile_opt idl2, strictarrsubs 86 ; 84 87 tempsun = systime(1) ; pour key_performance 85 88 ;--------------------------------------------------------- … … 175 178 tempdeux = systime(1) ; pour key_performance =2 176 179 pts_downward = pts_downward[1:n_elements(pts_downward)-1] 177 pts_downward = pts_downward (uniq(pts_downward, sort(pts_downward)))180 pts_downward = pts_downward[uniq(pts_downward, sort(pts_downward))] 178 181 ; aucun rectangle ne peut avoir comme coin en bas a gauche un element 179 182 ; de la derniere colonne ou de la derniere ligne. -
trunk/SRC/ToBeReviewed/TRIANGULATION/triangule_e.pro
r29 r114 34 34 , SHIFTED = shifted, BASIC = basic 35 35 ;--------------------------------------------------------- 36 ; 37 compile_opt idl2, strictarrsubs 38 ; 36 39 @cm_4mesh 37 40 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/UTILITAIRE/fitintobox.pro
r11 r114 53 53 ;------------------------------------------------------------ 54 54 FUNCTION err_mess, sz, jpi, nx, jpj, ny, jpk, nz, jpt 55 ; 56 compile_opt idl2, strictarrsubs 57 ; 55 58 IF n_elements(sz EQ 1) THEN $ 56 59 RETURN, report(['Error: ' $ … … 76 79 ;------------------------------------------------------------ 77 80 ; include commons 81 ; 82 compile_opt idl2, strictarrsubs 83 ; 78 84 @cm_4mesh 79 85 @cm_4cal -
trunk/SRC/ToBeReviewed/UTILITAIRE/get_extra.pro
r11 r114 23 23 24 24 FUNCTION get_extra, _extra = extra 25 ; 26 compile_opt idl2, strictarrsubs 27 ; 25 28 return, extra 26 29 END -
trunk/SRC/ToBeReviewed/UTILITAIRE/linearequation.pro
r11 r114 46 46 ;------------------------------------------------------------ 47 47 FUNCTION linearequation, point1, point2 48 ; 49 compile_opt idl2, strictarrsubs 50 ; 48 51 49 52 if size(point1, /type) EQ 6 OR size(point1, /type) EQ 9 then begin -
trunk/SRC/ToBeReviewed/UTILITAIRE/lineintersection.pro
r11 r114 54 54 FUNCTION lineintersection, abc1, abc2, FLOAT = float 55 55 ; 56 ; 57 compile_opt idl2, strictarrsubs 58 ; 56 59 a1 = float(reform(abc1[0, *])) 57 60 b1 = float(reform(abc1[1, *])) -
trunk/SRC/ToBeReviewed/UTILITAIRE/pwd.pro
r11 r114 18 18 ;------------------------------------------------------------ 19 19 PRO pwd 20 ; 21 compile_opt idl2, strictarrsubs 22 ; 20 23 cd, current = pwd 21 24 print, pwd -
trunk/SRC/ToBeReviewed/UTILITAIRE/report.pro
r11 r114 60 60 ;------------------------------------------------------------ 61 61 FUNCTION report, text, DEFAULT_NO = default_no, PARENT = parent, QUESTION = question, SIMPLE = simple, _extra = ex 62 ; 63 compile_opt idl2, strictarrsubs 64 ; 62 65 res = -1 ; 63 66 ; on separe le texte en differentes lignes (separees par !C) si ce -
trunk/SRC/ToBeReviewed/UTILITAIRE/routine_name.pro
r11 r114 52 52 FUNCTION routine_name, remonte 53 53 ; 54 ; 55 compile_opt idl2, strictarrsubs 56 ; 54 57 help, /traceback, output = name 55 58 name = strtrim(name, 1) ; on enleve les blancs en debut de ligne -
trunk/SRC/ToBeReviewed/UTILITAIRE/test.pro
r11 r114 1 1 pro test,ok=ok 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 if keyword_set(ok) then print,'OK' else print, 'No' 3 6 return -
trunk/SRC/ToBeReviewed/UTILITAIRE/testvar.pro
r11 r114 38 38 ;------------------------------------------------------------ 39 39 FUNCTION testvar, var = var 40 ; 41 compile_opt idl2, strictarrsubs 42 ; 40 43 if keyword_set(var) then return, var ELSE return, 0 41 44 end -
trunk/SRC/ToBeReviewed/UTILITAIRE/text_box.pro
r97 r114 17 17 ; keywords 18 18 ; pos 4 element vector specifying the box position and size 19 ; pos (0),pos(1)specify the lower left corner coordinate20 ; pos (2),pos(3)specify the upper right corner coordinate19 ; pos[0],pos[1] specify the lower left corner coordinate 20 ; pos[2],pos[3] specify the upper right corner coordinate 21 21 ; data window normalized coordinates are use 22 22 ; … … 43 43 center=center,right=right,box=box,vert_space=vert_space, _EXTRA = ex 44 44 ; 45 ; 46 compile_opt idl2, strictarrsubs 47 ; 45 48 ON_ERROR, 2 46 49 ; … … 63 66 xx2=xx1+nx 64 67 yy2=yy1+ny 65 pos=[(xx1-nnx (0))/(nnx(1)-nnx(0)),(yy1-nny(0))/(nny(1)-nny(0)),$66 (xx2-nnx (0))/(nnx(1)-nnx(0)),(yy2-nny(0))/(nny(1)-nny(0))]68 pos=[(xx1-nnx[0])/(nnx[1]-nnx[0]),(yy1-nny[0])/(nny[1]-nny[0]),$ 69 (xx2-nnx[0])/(nnx[1]-nnx[0]),(yy2-nny[0])/(nny[1]-nny[0])] 67 70 posstring=string(form='(a,4(f5.2,a))',$ 68 ',pos=[',pos (0),',',pos(1),',',pos(2),',',pos(3),']')71 ',pos=[',pos[0],',',pos[1],',',pos[2],',',pos[3],']') 69 72 print,strcompress(posstring,/remove_all) 70 73 … … 72 75 endif else begin 73 76 74 xx1 = nnx (0)+pos(0)*(nnx(1)-nnx(0))75 xx2 = nnx (0)+pos(2)*(nnx(1)-nnx(0))76 yy1 = nny (0)+pos(1)*(nny(1)-nnx(0))77 yy2 = nny (0)+pos(3)*(nny(1)-nnx(0))77 xx1 = nnx[0]+pos[0]*(nnx[1]-nnx[0]) 78 xx2 = nnx[0]+pos[2]*(nnx[1]-nnx[0]) 79 yy1 = nny[0]+pos[1]*(nny[1]-nnx[0]) 80 yy2 = nny[0]+pos[3]*(nny[1]-nnx[0]) 78 81 79 82 endelse … … 107 110 ; print,f='(8a8)','charsz','i','ilines','n_lines','lpnt','wlen','sum','xwdth' 108 111 for i=0,nwords-1 do begin 109 sum=sum+wlen (i)+blen112 sum=sum+wlen[i]+blen 110 113 if sum+3*blen gt xx2-xx1 then begin 111 114 ilines=ilines+1 112 sum=wlen (i)+blen115 sum=wlen[i]+blen 113 116 endif 114 lpnt (i)=ilines117 lpnt[i]=ilines 115 118 116 ; print,f='(f8.2,4i8,3f8.2)',charsize,i,ilines,n_lines,lpnt (i),$117 ; wlen (i)+blen,sum+3*blen,xx2-xx1119 ; print,f='(f8.2,4i8,3f8.2)',charsize,i,ilines,n_lines,lpnt[i],$ 120 ; wlen[i]+blen,sum+3*blen,xx2-xx1 118 121 endfor 119 122 case 1 of … … 131 134 for i=0,n_lines-1 do begin 132 135 ii=where(lpnt eq i,nc) 133 maxlen=(total(wlen (ii))+nc*blen)>maxlen134 lines (i)=string(f='(200a)',words(ii)+' ')135 ; print,i,words (ii)136 ; print,i,lines (i)136 maxlen=(total(wlen[ii])+nc*blen)>maxlen 137 lines[i]=string(f='(200a)',words[ii]+' ') 138 ; print,i,words[ii] 139 ; print,i,lines[i] 137 140 endfor 138 141 … … 160 163 for i_line = 0,n_lines-1 do begin 161 164 yy = yy-dy 162 ; print,xx,yy,lines (i_line),charsize163 xyouts, xx, yy, lines (i_line), /device, charsize=charsize, $165 ; print,xx,yy,lines[i_line],charsize 166 xyouts, xx, yy, lines[i_line], /device, charsize=charsize, $ 164 167 alignment=align, color=color, font=-1, _extra = ex 165 168 endfor -
trunk/SRC/ToBeReviewed/UTILITAIRE/undefine.pro
r11 r114 37 37 ;------------------------------------------------------------ 38 38 PRO UNDEFINE, varname 39 ; 40 compile_opt idl2, strictarrsubs 41 ; 39 42 tempvar = SIZE(TEMPORARY(varname)) 40 43 END -
trunk/SRC/ToBeReviewed/UTILITAIRE/xfile.pro
r11 r114 30 30 ;------------------------------------------------------------ 31 31 PRO xfile, filename, _extra = ex 32 ; 33 compile_opt idl2, strictarrsubs 34 ; 32 35 pfile = strlowcase(filename) 33 36 ; -
trunk/SRC/ToBeReviewed/UTILITAIRE/xhelp.pro
r11 r114 49 49 ;- 50 50 PRO xhelp, filename, _extra=ex 51 ; 52 compile_opt idl2, strictarrsubs 53 ; 51 54 52 55 ; filename est bien un string? … … 91 94 if strpos(c,';-') eq 0 then readon=0 92 95 if readon then begin 93 dum=where(byte (c)eq 9b,ntab) ; count tab characters94 xsize=xsize > (strlen (c)+8*ntab)95 a (i)= strmid(c,1,200)96 dum=where(byte[c] eq 9b,ntab) ; count tab characters 97 xsize=xsize > (strlen[c]+8*ntab) 98 a[i] = strmid(c,1,200) 96 99 i = i + 1 97 100 endif … … 100 103 if i EQ 0 then $ 101 104 ras = report('le programme a etait mal ecrit, il n''y a pas d''en-tete... utiliser xfile.pro.') ELSE BEGIN 102 a = a (0:i-1)105 a = a[0:i-1] 103 106 ; on ecrit le contenu de a ds un widget 104 107 xdisplayfile,'toto',text = a,title=pfile[n-1], _extra = ex -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.pro
r74 r114 37 37 ; we get back the ids of the widget parts 38 38 ;------------------------------------------------------------ 39 ; 40 compile_opt idl2, strictarrsubs 41 ; 39 42 txtcmdid = widget_info(base, find_by_uname = 'txtcmd') 40 43 domainid = widget_info(base, find_by_uname = 'domain') -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcmd.pro
r74 r114 33 33 FUNCTION buildreadcmd, base, snameexp, procedure, type, BOXZOOM = boxzoom $ 34 34 , COMPLETE = complete, NAMEFIELD = namefield 35 ; 36 ; 37 compile_opt idl2, strictarrsubs 35 38 ; 36 39 @cm_4cal ; for key_caltype -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.pro
r69 r114 1 1 PRO changefield, base, newfieldname, BOXZOOM = boxzoom 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 widget_control, base, get_uvalue = top_uvalue -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefile.pro
r74 r114 1 1 PRO changefile, base, newfilename, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2, FIELDNAME = fieldname 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 widget_control, base, /hourglass … … 7 10 ELSE newfile = newfilename ; it is already the index of the new file 8 11 if newfile EQ -1 then begin 9 nothing ,report('invalid filename')12 nothing = report('invalid filename') 10 13 return 11 14 endif -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.pro
r69 r114 3 3 ;------------------------------------------------------------- 4 4 ; we save globalcommand in globaloldcommand 5 ; 6 compile_opt idl2, strictarrsubs 7 ; 5 8 widget_control,base, get_uvalue = top_uvalue 6 9 globalcommand = extractatt(top_uvalue, 'globalcommand') -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.pro
r69 r114 1 1 PRO cutcmd, widcmd, toread, numberofread, prefix, nameexp, ending 2 ; 3 ; 4 compile_opt idl2, strictarrsubs 2 5 ; 3 6 dummy = where(byte(widcmd) EQ (byte('"'))[0], nbdblquote) -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/definedefaultextra.pro
r49 r114 1 1 FUNCTION definedefaultextra, nomvariable 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 case strlowcase(nomvariable) of 3 6 ; 'sn':BEGIN -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/doubleclickaction.pro
r69 r114 1 1 PRO doubleclickaction, event 2 2 ;------------------------------------------------------------ 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 widget_control, event.id , get_uvalue = uval 4 7 widget_control, event.top, get_uvalue = top_uvalue -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/extractatt.pro
r49 r114 1 1 FUNCTION extractatt, top_uvalue, name 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 taille = size(top_uvalue) 3 6 j = -1 -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/findline.pro
r49 r114 1 1 FUNCTION findline, top_uvalue, name 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 taille = size(top_uvalue) 3 6 j = -1 -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.pro
r49 r114 1 1 FUNCTION identifyclick, event 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 widget_control, event.id, get_uvalue=uval, /no_copy 3 6 thisEvent = TAG_NAMES(event, /Structure) -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/inserthistory.pro
r69 r114 1 1 PRO inserthistory, base, text, line1, line2 2 2 ;------------------------------------------------------------- 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 widget_control,base, get_uvalue = top_uvalue 4 7 globalcommand = extractatt(top_uvalue, 'globalcommand') -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.pro
r69 r114 36 36 37 37 PRO letsdraw, base, COMMANDE = commande, _extra = ex 38 ; 39 compile_opt idl2, strictarrsubs 40 ; 38 41 @common 39 42 ; on recupere la uvalue de base -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro
r69 r114 2 2 ; 3 3 ; 4 ; 5 compile_opt idl2, strictarrsubs 6 ; 4 7 @cm_4mesh 5 8 ccmeshparameters.filename = meshfilein -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/longclickaction.pro
r69 r114 1 1 PRO longclickaction, event 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 widget_control, event.id, get_uvalue = uval 3 6 widget_control, event.top, get_uvalue = top_uvalue -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/read_vermair.pro
r69 r114 1 1 FUNCTION read_vermair, name, debut, fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 @common 3 6 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro
r74 r114 33 33 ;------------------------------------------------------------ 34 34 FUNCTION scanfile, namefile, GRID = GRID, _extra = ex 35 ; 36 compile_opt idl2, strictarrsubs 37 ; 35 38 @common 36 39 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.pro
r74 r114 1 1 ;********************************************************************* 2 2 PRO selectfile_event, event 3 ; 4 ; 5 compile_opt idl2, strictarrsubs 3 6 ; 4 7 @common … … 142 145 ;********************************************************************* 143 146 FUNCTION selectfile, datafilename, idlfile, argspro, _extra = ex 147 ; 148 ; 149 compile_opt idl2, strictarrsubs 144 150 ; 145 151 @common -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/singleclickaction.pro
r69 r114 1 1 PRO singleclickaction, event 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 @cm_4mesh 3 6 @cm_4data -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/tracecadre.pro
r49 r114 3 3 ; determination de la colonne et de la ligne correspondant au small en 4 4 ; entree 5 ; 6 compile_opt idl2, strictarrsubs 7 ; 5 8 numdessin = small[2]-1 6 9 numligne = numdessin/small[0] -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.pro
r69 r114 1 1 PRO updatewidget, base, NOBOXZOOM = noboxzoom, NODATES = nodates, NOTYPE = notype 2 2 ;---------------------------------------------------------------------- 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 widget_control,base, get_uvalue = top_uvalue 4 7 smallin = extractatt(top_uvalue, 'smallin') -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.pro
r74 r114 1 1 pro xcreateanim_event, event 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 @common 3 6 ; on recupere les aguments contenus ds le widget … … 139 142 ;---------------------------------------------------------------- 140 143 PRO xcreateanim, parent 144 ; 145 compile_opt idl2, strictarrsubs 146 ; 141 147 @common 142 148 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.pro
r74 r114 1 1 ;------------------------------------------------ 2 2 PRO xxxmenubar_event, event 3 ; 4 compile_opt idl2, strictarrsubs 5 ; 3 6 @common 4 7 -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.pro
r69 r114 132 132 133 133 pro CW_BGROUP_SETV, id, value 134 compile_opt hidden 134 compile_opt hidden, idl2, strictarrsubs 135 135 136 136 ON_ERROR, 2 ;return to caller … … 162 162 function CW_BGROUP_GETV, id, value 163 163 164 compile_opt hidden 164 compile_opt hidden, idl2, strictarrsubs 165 165 ON_ERROR, 2 ;return to caller 166 166 … … 190 190 191 191 function CW_BGROUP_EVENT, ev 192 compile_opt hidden 192 compile_opt hidden, idl2, strictarrsubs 193 193 WIDGET_CONTROL, ev.handler, GET_UVALUE=stash 194 194 WIDGET_CONTROL, stash, GET_UVALUE=state, /NO_COPY -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.pro
r69 r114 145 145 ;---------------------------------------------------------------------- 146 146 PRO cw_combobox_pm_set_value, id, value 147 ; 148 compile_opt idl2, strictarrsubs 149 ; 147 150 ComboboxId = widget_info(id,find_by_uname = 'Combobox') 148 151 if size(value, /type) eq 8 then BEGIN ; this is a structure … … 163 166 ;---------------------------------------------------------------------- 164 167 FUNCTION cw_combobox_pm_get_value, id 168 ; 169 compile_opt idl2, strictarrsubs 170 ; 165 171 ComboboxId = widget_info(id,find_by_uname = 'Combobox') 166 172 widget_control, ComboboxId, get_value = cmbbval … … 174 180 ;---------------------------------------------------------------------- 175 181 FUNCTION cw_combobox_pm_event, event 182 ; 183 compile_opt idl2, strictarrsubs 184 ; 176 185 widget_control, event.id, get_uvalue=uval 177 186 ; … … 205 214 ;---------------------------------------------------------------------- 206 215 FUNCTION cw_combobox_pm, parent, VALUE = value, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 216 ; 217 compile_opt idl2, strictarrsubs 218 ; 207 219 208 220 IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.pro
r69 r114 40 40 ;********************************************************************* 41 41 pro cw_domain_set_value, id, value 42 ; 43 compile_opt idl2, strictarrsubs 44 ; 42 45 @cm_4mesh 43 46 ; … … 257 260 ;********************************************************************* 258 261 FUNCTION cw_domain_get_value, id 262 ; 263 compile_opt idl2, strictarrsubs 264 ; 259 265 box = lonarr(6) 260 266 possiblecase = ['lon1', 'lon2', 'lat1', 'lat2', 'depth1', 'depth2'] … … 268 274 ;********************************************************************* 269 275 FUNCTION cw_domain_event, event 276 ; 277 compile_opt idl2, strictarrsubs 278 ; 270 279 @common 271 280 ; help, /struct, event … … 411 420 FUNCTION cw_domain, parent, BOXZOOM = boxzoom, STRICT = strict, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, _extra = ex 412 421 ; 422 ; 423 compile_opt idl2, strictarrsubs 424 ; 413 425 @cm_4mesh 414 426 @cm_4data … … 449 461 min = floor(min([glamt, glamf], max = max)) 450 462 max = ceil(max) 451 IF max-min EQ 361 AND keyword_set(key_periodic) THEN max = max-1463 IF max-min GT 360 AND keyword_set(key_periodic) THEN max = min+360 452 464 lonbase = widget_base(baseh1, column = 2, space = 0, uname = 'lonbase', uvalue = {name:'geographic'}) 453 465 lon1id = cw_slider_pm(lonbase, value = min > boxzoom[0] < ((boxzoom[1] < max)-keyword_set(strict)) $ -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.pro
r51 r114 144 144 ;---------------------------------------------------------------------- 145 145 PRO cw_droplist_pm_set_value, id, value 146 ; 147 compile_opt idl2, strictarrsubs 148 ; 146 149 DroplistId = widget_info(id,find_by_uname = 'Droplist') 147 150 if size(value, /type) eq 8 then BEGIN ; this is a structure … … 160 163 ;---------------------------------------------------------------------- 161 164 FUNCTION cw_droplist_pm_get_value, id 165 ; 166 compile_opt idl2, strictarrsubs 167 ; 162 168 DroplistId = widget_info(id,find_by_uname = 'Droplist') 163 169 return, {droplist_number:widget_info(DroplistId, /droplist_number) $ … … 167 173 ;---------------------------------------------------------------------- 168 174 FUNCTION cw_droplist_pm_event, event 175 ; 176 compile_opt idl2, strictarrsubs 177 ; 169 178 widget_control, event.id, get_uvalue=uval 170 179 ; … … 191 200 ;---------------------------------------------------------------------- 192 201 FUNCTION cw_droplist_pm, parent,UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 202 ; 203 compile_opt idl2, strictarrsubs 204 ; 193 205 194 206 IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_pagelayout.pro
r69 r114 2 2 ;********************************************************************* 3 3 FUNCTION cw_pagelayout_event, event 4 ; 5 compile_opt idl2, strictarrsubs 6 ; 4 7 5 8 widget_control, event.id, get_uvalue=uval … … 78 81 FUNCTION cw_pagelayout, parent, small, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, COLUMN = column, ROW = row, _extra = ex 79 82 ;------------------------------------------------ 83 ; 84 compile_opt idl2, strictarrsubs 85 ; 80 86 row = keyword_set(row)*(1-keyword_set(column)) 81 87 if NOT keyword_set(uvalue) then uvalue = '' -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro
r51 r114 1 1 pro cw_slide_slice_set_value, id, value 2 ; 3 compile_opt idl2, strictarrsubs 4 ; 2 5 @common 3 6 topid = findtopid(id) … … 34 37 ;---------------------------------------------------------------------- 35 38 FUNCTION cw_slide_slice_event, event 39 ; 40 compile_opt idl2, strictarrsubs 41 ; 36 42 @common 37 43 widget_control, event.id, get_uvalue=uval … … 104 110 ;-------------------------------------------------------------------------------- 105 111 FUNCTION cw_slide_slice, parent, boxzoom = boxzoom, UVALUE = uvalue, UNAME = uname, FRAME = frame, ROW = row, COLUMN = column, _extra = ex 112 ; 113 compile_opt idl2, strictarrsubs 114 ; 106 115 @common 107 116 ;------------------------------------------------ -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.pro
r69 r114 136 136 ;---------------------------------------------------------------------- 137 137 FUNCTION decvalue, value 138 ; 139 compile_opt idl2, strictarrsubs 140 ; 138 141 a = float(value[0]) 139 142 return, strtrim(string(floor(a) + 0.1*indgen(10), format = '(f15.1)'), 2) … … 141 144 ;---------------------------------------------------------------------- 142 145 FUNCTION decind, value 146 ; 147 compile_opt idl2, strictarrsubs 148 ; 143 149 a = float(value[0]) 144 150 return, round(10*(a - floor(a))) ; !! computation accuracy … … 146 152 ;---------------------------------------------------------------------- 147 153 PRO cw_slider_pm_set_value, id, value 154 ; 155 compile_opt idl2, strictarrsubs 156 ; 148 157 sbid = widget_info(id, find_by_uname = 'SliderBar') 149 158 dcid = widget_info(id, find_by_uname = 'decimal') … … 195 204 ;---------------------------------------------------------------------- 196 205 FUNCTION cw_slider_pm_get_value, id 206 ; 207 compile_opt idl2, strictarrsubs 208 ; 197 209 sbid = widget_info(id, find_by_uname = 'SliderBar') 198 210 dcid = widget_info(id, find_by_uname = 'decimal') … … 203 215 ;---------------------------------------------------------------------- 204 216 FUNCTION cw_slider_pm_event, event 217 ; 218 compile_opt idl2, strictarrsubs 219 ; 205 220 widget_control, event.id, get_uvalue = uval 206 221 ; … … 237 252 , STRMINLEN = strminlen, VALUE = value, UVALUE = uvalue $ 238 253 , UNAME = uname, title = title, _extra = ex 254 ; 255 compile_opt idl2, strictarrsubs 256 ; 239 257 240 258 IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.pro
r74 r114 2 2 ;***************************************************** 3 3 PRO cw_specifie_set_value, id, value 4 ; 5 compile_opt idl2, strictarrsubs 6 ; 4 7 @cm_general 5 8 if size(value, /type) NE 8 then return … … 26 29 ;***************************************************** 27 30 FUNCTION cw_specifie_get_value, id 31 ; 32 compile_opt idl2, strictarrsubs 33 ; 28 34 @cm_general 29 35 widget_control, widget_info(id,find_by_uname='min'), get_value = min … … 53 59 ;------------------------------------------------------------ 54 60 ;------------------------------------------------------------ 61 ; 62 compile_opt idl2, strictarrsubs 63 ; 55 64 widget_control, event.id, get_uvalue = uval 56 65 widget_control, event.top, get_uvalue = top_uvalue … … 87 96 FUNCTION cw_specifie, parent, ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname, FRAME = frame, FORXXX = forxxx, _extra = ex 88 97 ; cheking exclusive keywords 98 ; 99 compile_opt idl2, strictarrsubs 100 ; 89 101 column = keyword_set(column)*(1-keyword_set(row)) 90 102 row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) -
trunk/SRC/ToBeReviewed/WIDGET/findtopid.pro
r52 r114 34 34 ;------------------------------------------------------------ 35 35 FUNCTION findtopid, identite 36 ; 37 compile_opt idl2, strictarrsubs 38 ; 36 39 id = long(identite) 37 40 ; exist = widget_info(id, /managed) -
trunk/SRC/ToBeReviewed/WIDGET/slec.pro
r52 r114 2 2 ;--------------------------------------------------------- 3 3 ; include common 4 ; 5 compile_opt idl2, strictarrsubs 6 ; 4 7 @cm_4data 5 8 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ToBeReviewed/WIDGET/xnotice.pro
r52 r114 42 42 ; on separe le text en differentes lignes (separees par !C) si ce 43 43 ; n''est pas deja fait... 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim) 45 48 ; -
trunk/SRC/ToBeReviewed/WIDGET/xquestion.pro
r52 r114 54 54 ;------------------------------------------------------------------------- 55 55 pro xquestion_event, event 56 ; 57 compile_opt idl2, strictarrsubs 58 ; 56 59 ; we get the answer 57 60 widget_control, widget_info(event.top, find_by_uname = 'text') $ … … 66 69 ;------------------------------------------------------------------------- 67 70 FUNCTION xquestion, question, proposedanswer, CHKWIDGET = chkwidget, _extra = ex ; 71 ; 72 compile_opt idl2, strictarrsubs 73 ; 68 74 ; is separate line a scalar? we must cut it into pieces? 69 75 if n_elements(question) EQ 1 then question = str_sep(question, '!C', /trim) -
trunk/SRC/ToBeReviewed/WIDGET/xx.pro
r52 r114 1 1 2 2 PRO xx, JOUR = jour, MESHFILENAME = meshfilename, LISTVAR = listvar, LISTGRID = listgrid, FUNCLEC_NAME = funclec_name, CALENDAR = calendar, _extra = ex 3 ; 4 ; 5 compile_opt idl2, strictarrsubs 3 6 ; 4 7 @common … … 20 23 ENDIF 21 24 ; calendrier a utiliser (en jours juliens d''IDL 22 if NOT keyword_set(calendar) then BEGIN23 if keyword_set(jour) then calendar = calendriertotem(/julian_day) ELSE calendar = calendriertotem(/julian_day, /mensuel)24 ENDIF25 ;++++ if NOT keyword_set(calendar) then BEGIN 26 ;++++ if keyword_set(jour) then calendar = calendriertotem(/julian_day) ELSE calendar = calendriertotem(/julian_day, /mensuel) 27 ;++++ ENDIF 25 28 ; nom du fichier se rapportant au masque 26 29 if NOT keyword_set(meshfilename) then meshfilename = '/usr1/com/smasson/IDL/INIT/inittotem.pro' 27 meshparameters = whichgrid(meshfilename)30 ;++++ meshparameters = whichgrid(meshfilename) 28 31 ; parameteres specifiant comment doit etre lu le champ 29 32 readparameters= {funclec_name: funclec_name $ -
trunk/SRC/ToBeReviewed/WIDGET/xxx.pro
r74 r114 42 42 PRO xxx_event, event 43 43 ;------------------------------------------------------------ 44 ; 45 compile_opt idl2, strictarrsubs 46 ; 44 47 @common 45 48 ;------------------------------------------------------------ … … 129 132 , RESTORE = restore, _EXTRA = ex 130 133 ;------------------------------------------------------------ 134 ; 135 compile_opt idl2, strictarrsubs 136 ; 131 137 @all_cm 132 138 ;------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.