Changeset 251 for trunk


Ignore:
Timestamp:
06/14/07 14:41:34 (17 years ago)
Author:
smasson
Message:

small bugfix: z2d[0] = -1 and z2d has more than 1 element

Location:
trunk/SRC/ToBeReviewed/PLOTS/DESSINE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro

    r246 r251  
    239239  checktypeminmax, 'plt', TYPE = type, MIN = min, MAX = max, _extra = ex 
    240240  z2d = checkfield(tab1, 'plt', TYPE = type, BOXZOOM = boxzoom, DIREC = direc, VECTEUR = vecteur, _extra = ex) 
    241   if z2d[0] EQ -1 then BEGIN 
     241  if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 then BEGIN 
    242242    IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt.dat' 
    243243    return 
     
    293293  determineminmax, z2d, mask, mi, ma, glam, gphi, MININ = min, MAXIN = max $ 
    294294    , nan = nan, INTERVALLE = intervalle, usetri = usetri, _extra = ex 
    295   if z2d[0] EQ -1 THEN GOTO, sortie 
     295  if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 THEN GOTO, sortie 
    296296; We do an autoscale if needed. 
    297297  if autoscale then autoscale, min, max, intervalle 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt1d.pro

    r232 r251  
    179179    grille, mask, glam, gphi, gdep, nx, ny, nz, type = type 
    180180  ENDELSE 
    181   if z1d[0] EQ -1 then BEGIN 
     181  if n_elements(z2d) EQ 1 AND z1d[0] EQ -1 then BEGIN 
    182182    IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt1d.dat' 
    183183    return 
     
    199199  nan = total(finite(z1d, /nan)) < 1 
    200200  determineminmax, z1d, mask, mi, ma, MININ = min, MAXIN = max, nan = nan, INTERVALLE = intervalle, _extra = ex 
    201   if z1d[0] EQ -1 THEN return 
     201  if n_elements(z2d) EQ 1 AND z1d[0] EQ -1 THEN return 
    202202;----------------------------------------------------------------------------- 
    203203;----------------------------------------------------------------------------- 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro

    r246 r251  
    261261      z2d = checkfield(tab, 'pltt', TYPE = type, BOXZOOM = boxzoom $ 
    262262                       , direc = direc, _extra = ex) 
    263       if z2d[0] EQ -1 then BEGIN 
     263      if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 then BEGIN 
    264264        IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltt.dat' 
    265265        return 
     
    347347   autoscale = testvar(var = min) EQ testvar(var = max) AND NOT keyword_set(intervalle) 
    348348   determineminmax, z2d, mask, mi, ma, MININ = min, MAXIN = max, nan = nan, INTERVALLE = intervalle, _extra = ex 
    349    if z2d[0] EQ -1 THEN return 
     349   if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 THEN return 
    350350; We do an autoscale if needed. 
    351351   if autoscale then autoscale, min, max, intervalle 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro

    r231 r251  
    9090    ENDIF 
    9191    z2d = checkfield(temporary(z2d), 'plt', TYPE = 'xy', direc = direc, BOXZOOM = boxzoom) 
    92     if z2d[0] EQ -1 then BEGIN 
     92    if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 then BEGIN 
    9393      IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat' 
    9494      return 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

    r246 r251  
    219219    section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 
    220220    , BOXZOOM = boxzoom, DIREC = direc, WDEPTH = wdepth, _extra = ex 
    221     if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
     221    if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
    222222      restoreboxparam, 'boxparam4pltz.dat' 
    223223      return 
     
    236236    z2d = checkfield(tab, 'pltz', TYPE = type, BOXZOOM = boxzoom $ 
    237237                     , DIREC = direc, WDEPTH = wdepth, _extra = ex) 
    238     if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
     238    if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
    239239      restoreboxparam, 'boxparam4pltz.dat' 
    240240      return 
     
    263263  autoscale = testvar(var = min) EQ testvar(var = max) AND NOT keyword_set(intervalle) 
    264264  determineminmax, z2d, mask, mi, ma, MININ = min, MAXIN = max, nan = nan, INTERVALLE = intervalle, _extra = ex 
    265   if z2d[0] EQ -1 THEN GOTO, sortie 
     265  if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 THEN GOTO, sortie 
    266266; We do an autoscale if needed. 
    267267  if autoscale then autoscale, min, max, intervalle 
Note: See TracChangeset for help on using the changeset viewer.