Ignore:
Timestamp:
05/02/06 16:55:58 (18 years ago)
Author:
pinsard
Message:

upgrade of PLOTS/DIVERS according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/ToBeReviewed/PLOTS/DIVERS/checktypeminmax.pro

    r35 r37  
    3434                     , XZ = xz, YZ = yz, XT = XT, YT = YT, ZT = zt $ 
    3535                     , TT = tt, XX = xx, YY = yy, ZZ = zz $ 
    36                      , XINDEX = xindex, YINDEX = yindex, BOITE = boite, ENDPOINTS = endpoints 
     36                     , XINDEX = xindex, YINDEX = yindex $ 
     37                     , ENDPOINTS = endpoints, _extra = ex 
    3738; 
    3839@common 
     
    8788; 
    8889   if keyword_set(type) then begin 
    89       if type EQ 'plt' then type = '' 
    90       if type EQ 'pltz' then type = '' 
    91       if type EQ 'pltt' then type = '' 
    92       if type EQ 'plt1d' then type = '' 
     90     if type EQ 'plt' then type = '' 
     91     if type EQ 'pltz' then type = '' 
     92     if type EQ 'pltt' then type = '' 
     93     if type EQ 'plt1d' then type = '' 
    9394   endif 
    9495;-------------------------------------------------------------- 
     
    9798   if NOT keyword_set(type) then BEGIN 
    9899      case procedure of 
    99          'plt':type = 'xy' 
    100          'pltz':BEGIN 
    101             @common 
    102             if keyword_set(endpoints) then BEGIN  
    103                lon1 = min([endpoints[0], endpoints[2]]) 
    104                lon2 = max([endpoints[0], endpoints[2]]) 
    105                lat1 = min([endpoints[1], endpoints[3]]) 
    106                lat2 = max([endpoints[1], endpoints[3]]) 
    107             ENDIF ELSE BEGIN 
    108                if n_elements(boite) GE 4 then BEGIN 
    109                   if keyword_set(xindex) then begin 
    110                      lon1 = glamt[boite[0], 0] 
    111                      lon2 = glamf[boite[1], 0] 
    112                   ENDIF ELSE BEGIN 
    113                      lon1 = boite[0] 
    114                      lon2 = boite[1] 
    115                   ENDELSE 
    116                   if keyword_set(yindex) then begin 
    117                      lat1 = gphit[0, boite[2]] 
    118                      lat2 = gphif[0, boite[3]] 
    119                   ENDIF ELSE BEGIN 
    120                      lat1 = boite[2] 
    121                      lat2 = boite[3] 
    122                   ENDELSE 
    123                ENDIF 
    124             ENDELSE 
    125             if lon2-lon1 gt lat2-lat1 then type='xz' else type='yz'  
    126          END 
    127          'pltt':BEGIN 
    128             if keyword_set(endpoints) then BEGIN  
    129                lon1 = min([endpoints[0], endpoints[2]]) 
    130                lon2 = max([endpoints[0], endpoints[2]]) 
    131                lat1 = min([endpoints[1], endpoints[3]]) 
    132                lat2 = max([endpoints[1], endpoints[3]]) 
    133             ENDIF ELSE BEGIN 
    134                if n_elements(boite) GE 4 then BEGIN 
    135                   if keyword_set(xindex) then begin 
    136                      lon1 = glamt[boite[0], 0] 
    137                      lon2 = glamf[boite[1], 0] 
    138                   ENDIF ELSE BEGIN 
    139                      lon1 = boite[0] 
    140                      lon2 = boite[1] 
    141                   ENDELSE 
    142                   if keyword_set(yindex) then begin 
    143                      lat1 = gphit[0, boite[2]] 
    144                      lat2 = gphif[0, boite[3]] 
    145                   ENDIF ELSE BEGIN 
    146                      lat1 = boite[2] 
    147                      lat2 = boite[3] 
    148                   ENDELSE 
    149                ENDIF 
    150             ENDELSE 
    151             if (lon2-lon1) gt (lat2-lat1) then type='xt' else type='yt' 
    152 ;             type = '' 
    153 ;             WHILE type NE 't' AND type NE 'xt' AND type NE 'yt' AND type NE 'zt' DO BEGIN 
    154 ;                type = xquestion('Quel type de hovmoeller voulez-vous faire? t,xt,yt,zt ? ' $ 
    155 ;                                 , /chkwidget) 
    156 ;                type = strlowcase(type) 
    157 ;             ENDWHILE  
    158          END 
    159          'plt1d':BEGIN 
    160             if keyword_set(endpoints) then BEGIN  
    161                lon1 = min([endpoints[0], endpoints[2]]) 
    162                lon2 = max([endpoints[0], endpoints[2]]) 
    163                lat1 = min([endpoints[1], endpoints[3]]) 
    164                lat2 = max([endpoints[1], endpoints[3]]) 
    165                if (lon2-lon1) gt (lat2-lat1) then type='x' else type='y' 
    166             ENDIF ELSE BEGIN 
    167                type = '' 
    168                WHILE type NE 'x' AND type NE 'y' AND type NE 'z' DO BEGIN 
    169                   type = xquestion('Quel type de plot 1D voulez-vous faire? x,y,z ou t ?' $ 
    170                                    , /chkwidget) 
    171                   type = strlowcase(type) 
    172                endwhile 
    173             ENDELSE 
    174          END 
     100        'plt':type = 'xy' 
     101        'pltz':BEGIN 
     102          if keyword_set(endpoints) then BEGIN  
     103            lon1 = min([endpoints[0], endpoints[2]], max = lon2) 
     104            lat1 = min([endpoints[1], endpoints[3]], max = lat2) 
     105            if (lon2-lon1) gt (lat2-lat1) then type = 'xz' else type = 'yz' 
     106          ENDIF ELSE type = 'z' 
     107        END 
     108        'pltt':BEGIN 
     109          if keyword_set(endpoints) then BEGIN  
     110            lon1 = min([endpoints[0], endpoints[2]], max = lon2) 
     111            lat1 = min([endpoints[1], endpoints[3]], max = lat2) 
     112            lat2 = max([endpoints[1], endpoints[3]]) 
     113            if (lon2-lon1) gt (lat2-lat1) then type = 'xt' else type = 'yt' 
     114          ENDIF ELSE type = 'unkownpltt' 
     115        END 
     116        'plt1d':BEGIN 
     117          if keyword_set(endpoints) then BEGIN  
     118            lon1 = min([endpoints[0], endpoints[2]], max = lon2) 
     119            lat1 = min([endpoints[1], endpoints[3]], max = lat2) 
     120            if (lon2-lon1) gt (lat2-lat1) then type = 'x' else type = 'y' 
     121          ENDIF ELSE BEGIN 
     122            type = '' 
     123            WHILE type NE 'x' AND type NE 'y' AND type NE 'z' DO BEGIN 
     124              type = xquestion('Quel type de plot 1D voulez-vous faire? x,y,z ou t ?' $ 
     125                               , /chkwidget) 
     126              type = strlowcase(type) 
     127            endwhile 
     128          ENDELSE 
     129        END 
    175130      endcase 
    176    ENDIF  
    177    WHILE type NE 'xy' AND type NE 'xz' AND type NE 'yz' $ 
    178     AND type NE 'xt' AND type NE 'yt' AND type NE 'zt' $ 
    179     AND type NE 't' AND type NE 'x' AND type NE 'y' AND type NE 'z' DO BEGIN 
    180       type = xquestion('Quel type de plot voulez-vous faire? xy,xz,yz,xt,yt,zt,t,x,y,z ? ' $ 
     131    ENDIF  
     132    WHILE type NE 'xy' AND type NE 'xz' AND type NE 'yz' $ 
     133      AND type NE 'xt' AND type NE 'yt' AND type NE 'zt' $ 
     134      AND type NE 't' AND type NE 'x' AND type NE 'y' $ 
     135      AND type NE 'z' AND type NE 'unkownpltt' DO BEGIN 
     136      type = xquestion('What kind of plot do you want to do? xy,xz,yz,xt,yt,zt,t,x,y,z ? ' $ 
    181137                       , /chkwidget) 
    182138      type = strlowcase(type) 
    183    ENDWHILE  
     139    ENDWHILE  
    184140; 
    185141; 
    186  
    187    return 
    188 end 
     142     
     143    return 
     144  end 
Note: See TracChangeset for help on using the changeset viewer.