Changeset 49 for trunk


Ignore:
Timestamp:
05/09/06 11:47:44 (18 years ago)
Author:
pinsard
Message:

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

Location:
trunk
Files:
1 deleted
24 copied

Legend:

Unmodified
Added
Removed
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcommand.pro

    r47 r49  
    3232;------------------------------------------------------------ 
    3333;------------------------------------------------------------ 
    34 FUNCTION buildcommand, base, FORPLTH = forplth, FORPLTZ = forpltz, FORPLTT = forpltt, BOITE = boite 
     34FUNCTION buildcommand, base, FORPLTH = forplth, FORPLTZ = forpltz, FORPLTT = forpltt, BOXZOOM = boxzoom 
     35; 
    3536;------------------------------------------------------------ 
    3637; on recuper les ID des differents widgets  
     
    4647;------------------------------------------------------------ 
    4748   widget_control,base, get_uvalue = top_uvalue 
    48    petitin = extractatt(top_uvalue, 'petitin') 
    49    numdessinin = petitin[2]-1 
    50    petitout = extractatt(top_uvalue, 'petitout') 
    51    numdessinout = petitout[2]-1 
     49   smallin = extractatt(top_uvalue, 'smallin') 
     50   numdessinin = smallin[2]-1 
     51   smallout = extractatt(top_uvalue, 'smallout') 
     52   numdessinout = smallout[2]-1 
    5253;------------------------------------------------------------ 
    5354;--------------- 
     
    139140   cutcommand, widcommand, toread, coef, numberofread, operation, nameexp, separator, add 
    140141; 
    141    readcommande = buildreadcommand(base, ''''+nameexp+'''', procedure, type, BOITE = boite, complete = whichread EQ 'classic' AND alreadyread EQ -1) 
     142   readcommande = buildreadcommand(base, ''''+nameexp+'''', procedure, type, BOXZOOM = boxzoom, complete = whichread EQ 'classic' AND alreadyread EQ -1) 
    142143; on choppe la ligne ou il y a litchamp pour appliquer coef et operateur 
    143144   i = 0 
     
    196197               ENDIF ELSE BEGIN 
    197198; on fait un trace automatique en appelant un et vn ... 
    198                   readuncommande = buildreadcommand(base, ''''+nameexp+'''', procedure, type, BOITE = boite, complete = 0, namefield = 'un') 
     199                  readuncommande = buildreadcommand(base, ''''+nameexp+'''', procedure, type, BOXZOOM = boxzoom, complete = 0, namefield = 'un') 
    199200                  i = 0 
    200201                  while strpos(readuncommande[i], 'litchamp') EQ -1 do i = i+1 
     
    203204                  readuncommande = [readuncommande,'fieldu = create_struct({tab:fieldu, grille:vargrid, unite:varunit, experience:varexp, nom:varname})'] 
    204205; 
    205                   readvncommande = buildreadcommand(base, ''''+nameexp+'''', procedure, type, BOITE = boite, complete = 0, namefield = 'vn') 
     206                  readvncommande = buildreadcommand(base, ''''+nameexp+'''', procedure, type, BOXZOOM = boxzoom, complete = 0, namefield = 'vn') 
    206207                  i = 0 
    207208                  while strpos(readvncommande[i], 'litchamp') EQ -1 do i = i+1 
     
    354355;----------------------- 
    355356;--------------- 
    356 ; determination du nom de la boite  
    357 ;--------------- 
    358    if NOT keyword_set(boite) then widget_control, domainid, get_value = boite 
     357; determination du nom de la boxzoom  
     358;--------------- 
     359   if NOT keyword_set(boxzoom) then widget_control, domainid, get_value = boxzoom 
    359360; ecriture de celle-ci sous forme d''un string 
    360    box = '['+strtrim(boite[0], 1) 
    361    for i = 1, (n_elements(boite)-1) < (3+2*(strpos(type, 'z') EQ -1)) do $ 
    362     box = box+', '+strtrim(boite[i], 1) 
     361   box = '['+strtrim(boxzoom[0], 1) 
     362   for i = 1, (n_elements(boxzoom)-1) < (3+2*(strpos(type, 'z') EQ -1)) do $ 
     363    box = box+', '+strtrim(boxzoom[i], 1) 
    363364; pour les [plots en z, box doit avoir par defaut 0,profmax 
    364365   if strpos(type, 'z') NE -1 then BEGIN 
     
    369370      niv2 = niv2.droplist_select 
    370371      if niv1 NE niv2 then begin 
    371          box = box+','+strtrim(boite[4], 1)+','+strtrim(boite[5], 1) 
     372         box = box+','+strtrim(boxzoom[4], 1)+','+strtrim(boxzoom[5], 1) 
    372373      ENDIF ELSE BEGIN 
    373374         if chkstru(exextra, 'profmax') then  pmax = exextra.profmax $ 
     
    383384;--------------- 
    384385;--------------- 
    385 ; determination de petit 
    386 ;--------------- 
    387    spetit = tostr(petitout) 
     386; determination de small 
     387;--------------- 
     388   ssmall = tostr(smallout) 
    388389;------------------------------------------------------------ 
    389390; on va definir le string qui contiendra la commande a executer par widgetdessine.pro 
    390391;------------------------------------------------------------ 
    391    Commande = [readCommande, procedure+', field $', ', boite=' $ 
    392                +box+', typein='+typein+', petit='+spetit+' $'] 
     392   Commande = [readCommande, procedure+', field $', ', boxzoom=' $ 
     393               +box+', typein='+typein+', small='+ssmall+' $'] 
    393394   IF drawvecteur then Commande = [Commande, ', vecteur = {u: fieldu,v: fieldv} $'] 
    394395   IF drawover then Commande = [Commande, ', contour = fieldover $'] 
     
    403404   (*top_uvalue[1, findline(top_uvalue, 'nameprocedures')])[numdessinout] = procedure 
    404405   (*top_uvalue[1, findline(top_uvalue, 'types')])[numdessinout] = type 
    405    (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinout] = boite 
     406   (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinout] = boxzoom 
    406407   (*top_uvalue[1, findline(top_uvalue, 'prefixes')])[numdessinout] = widcommand 
    407408   (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[*, numdessinout] = flags 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcommand.pro

    r47 r49  
    3131;------------------------------------------------------------ 
    3232;------------------------------------------------------------ 
    33 FUNCTION buildreadcommand, base, snameexp, procedure, type, BOITE = boite, COMPLETE = complete, NAMEFIELD = namefield 
     33FUNCTION buildreadcommand, base, snameexp, procedure, type, BOXZOOM = boxzoom, COMPLETE = complete, NAMEFIELD = namefield 
    3434;------------------------------------------------------------ 
    3535; on recuper les ID des differents widgets  
     
    4444;------------------------------------------------------------ 
    4545   widget_control,base, get_uvalue = top_uvalue 
    46    numdessinin = (extractatt(top_uvalue, 'petitin'))[2]-1 
    47    numdessinout = (extractatt(top_uvalue, 'petitout'))[2]-1 
     46   numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
     47   numdessinout = (extractatt(top_uvalue, 'smallout'))[2]-1 
    4848;--------------- 
    4949; determination du nom du fichier 
     
    103103   sdate1 = strtrim(date1, 1) & sdate2 = strtrim(date2, 1) 
    104104;--------------- 
    105 ; determination du nom de la boite  
     105; determination du nom de la boxzoom  
    106106;--------------- 
    107    if NOT keyword_set(boite) then widget_control, domainid, get_value = boite 
     107   if NOT keyword_set(boxzoom) then widget_control, domainid, get_value = boxzoom 
    108108; ecriture de celle-ci sous forme d''un string 
    109    box = '['+strtrim(boite[0], 1) 
    110    for i = 1, (n_elements(boite)-1) < (3+2*(strpos(type, 'z') EQ -1)) do $ 
    111     box = box+', '+strtrim(boite[i], 1) 
     109   box = '['+strtrim(boxzoom[0], 1) 
     110   for i = 1, (n_elements(boxzoom)-1) < (3+2*(strpos(type, 'z') EQ -1)) do $ 
     111    box = box+', '+strtrim(boxzoom[i], 1) 
    112112   if strpos(type, 'z') NE -1 then BEGIN 
    113113      @common 
     
    140140                  , 'if keyword_set(date2in) then date2 = date2in else date2 = '+sdate2 $ 
    141141                  , 'litchamp('+funclec_name+'('+snomvariable+', date1, date2,'+snameexp $ 
    142                   +',parent='+strtrim(base, 1)+',boite='+box+' $',', filename='+sfilename+' $' $ 
     142                  +',parent='+strtrim(base, 1)+',boxzoom='+box+' $',', filename='+sfilename+' $' $ 
    143143                  , ', _extra=mixstru(ex, extra)))'] 
    144144      (*top_uvalue[1, findline(top_uvalue, 'champs')])[*, numdessinout] = [filename, nomvariable] 
     
    149149                  , 'if keyword_set(date2in) then date2 = date2in else date2 = '+sdate2 $ 
    150150                  , 'litchamp('+funclec_name+'('+snomvariable+', date1, date2,'+snameexp $ 
    151                   +',parent='+strtrim(base, 1)+',boite='+box+' $',', filename='+sfilename+' $' $ 
     151                  +',parent='+strtrim(base, 1)+',boxzoom='+box+' $',', filename='+sfilename+' $' $ 
    152152                  , ', _extra=mixstru(ex, extra)))'] 
    153153   ENDELSE 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.pro

    r47 r49  
    1 PRO changefield, base, newfieldname, BOITE = boite 
     1PRO changefield, base, newfieldname, BOXZOOM = boxzoom 
    22; 
    33   widget_control, base, get_uvalue = top_uvalue 
     
    1818   if zgrid NE oldzgrid then BEGIN 
    1919      *top_uvalue[1, findline(top_uvalue, 'zgrid')] = zgrid 
    20       if NOT keyword_set(boite) THEN BEGIN 
    21          widget_control, widget_info(base, find_by_uname = 'domain'), get_value = boite 
    22          widget_control, widget_info(base, find_by_uname = 'domain'), set_value = boite 
     20      if NOT keyword_set(boxzoom) THEN BEGIN 
     21         widget_control, widget_info(base, find_by_uname = 'domain'), get_value = boxzoom 
     22         widget_control, widget_info(base, find_by_uname = 'domain'), set_value = boxzoom 
    2323      endif 
    2424   endif 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefile.pro

    r47 r49  
    1 PRO changefile, base, newfilename, BOITE = boite, DATE1 = date1, DATE2 = date2, FIELDNAME = fieldname 
    2  
     1PRO changefile, base, newfilename, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2, FIELDNAME = fieldname 
     2; 
    33   widget_control, base, /hourglass 
    44   widget_control, base, get_uvalue = top_uvalue 
     
    1414   oldfilename = filelist[oldfile] 
    1515; a-t-on reelement change de fichier? 
    16    if oldfile EQ newfile AND NOT (keyword_set(BOITE) OR keyword_set(DATE1) OR keyword_set(DATE2) OR keyword_set(FIELDNAME)) then return 
     16   if oldfile EQ newfile AND NOT (keyword_set(BOXZOOM) OR keyword_set(DATE1) OR keyword_set(DATE2) OR keyword_set(FIELDNAME)) then return 
    1717;-------------- 
    1818   widget_control, base, update = 0 
     
    4040; on a modifiee le nom de la variable? 
    4141   if newfieldname NE oldfieldname then BEGIN 
    42       changefield, base, newfieldname, BOITE = boite 
     42      changefield, base, newfieldname, BOXZOOM = boxzoom 
    4343      widget_control, champid, set_droplist_select = indexvar 
    4444   ENDIF 
     
    5454      date1id = widget_info(base, find_by_uname = 'calendar1') 
    5555      if NOT keyword_set(date1) then widget_control, date1id, get_value = date1 
    56       if (where(newcalendar EQ juldate(date1,/vraidate)))[0] EQ -1 then date1 = newcalendar[0] 
     56      if (where(newcalendar EQ juldate(date1)))[0] EQ -1 then date1 = newcalendar[0] 
    5757      date2id = widget_info(base, find_by_uname = 'calendar2') 
    5858      if NOT keyword_set(date2) then widget_control, date2id, get_value = date2 
    59       if (where(newcalendar EQ juldate(date2,/vraidate)))[0] EQ -1 then date2 = date1 
     59      if (where(newcalendar EQ juldate(date2)))[0] EQ -1 then date2 = date1 
    6060      if date2 LT date1 THEN date2 = date1 
    6161      widget_control, date1id, /destroy 
    6262      widget_control, date2id, /destroy 
    6363      base12 = widget_info(base, find_by_uname = 'base12') 
    64       rien = cw_calendar(base12,newcalendar, juldate(date1,/vraidate), uname = 'calendar1' $ 
     64      rien = cw_calendar(base12,newcalendar, juldate(date1), uname = 'calendar1' $ 
    6565                         , uvalue = {name:'calendar1'}, /frame) 
    66       rien = cw_calendar(base12,newcalendar, juldate(date2,/vraidate), uname = 'calendar2' $ 
     66      rien = cw_calendar(base12,newcalendar, juldate(date2), uname = 'calendar2' $ 
    6767                         , uvalue = {name:'calendar2'}, /frame) 
    6868   ENDIF ELSE BEGIN  
     
    8181   newgrid = *(extractatt(top_uvalue, 'meshparameters'))[newfile] 
    8282   change = changegrid(newgrid) 
    83    if change OR keyword_set(boite) then BEGIN 
    84       if NOT keyword_set(boite) then boite = -1 
     83   if change OR keyword_set(boxzoom) then BEGIN 
     84      if NOT keyword_set(boxzoom) then boxzoom = -1 
    8585      domainid = widget_info(base, find_by_uname = 'domain') 
    86       widget_control, domainid, set_value = boite 
     86      widget_control, domainid, set_value = boxzoom 
    8787   endif 
    8888;-------------- 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.pro

    r47 r49  
    1 PRO createhistory, base, petit 
     1PRO createhistory, base, small 
    22; 
    33;------------------------------------------------------------- 
     
    2020            , ';' $ 
    2121            , '; end of 1'] 
    22    if petit[0]*petit[1] GT 1 then begin 
    23       for draw = 1, petit[0]*petit[1]-1  do begin 
     22   if small[0]*small[1] GT 1 then begin 
     23      for draw = 1, small[0]*small[1]-1  do begin 
    2424         texte = [texte $ 
    2525                  , '; beginning of '+strtrim(draw+1, 2) $ 
     
    3131            , 'if keyword_set(postscript) then begin' $ 
    3232            , '    closeps, infowidget = infowidget' $ 
    33             , '    imprime' $ 
     33            , '    printps' $ 
    3434            , 'endif'] 
    3535; the new globalcommand 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/doubleclickaction.pro

    r47 r49  
    77   wset, win 
    88; quel est le dessin selectionne?? 
    9    petitin = extractatt(top_uvalue, 'petitin') 
    10    petitout = extractatt(top_uvalue, 'petitout') 
     9   smallin = extractatt(top_uvalue, 'smallin') 
     10   smallout = extractatt(top_uvalue, 'smallout') 
    1111   x = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[0] 
    1212   y = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[1] 
    13    numcolonne = n_elements(where(findgen(petitin[0])/petitin[0] lt x))-1 
    14    numligne = n_elements(where(findgen(petitin[1])/petitin[1] lt 1-y))-1 
    15    numdessin = numcolonne+numligne*petitin[0]+1 
     13   numcolonne = n_elements(where(findgen(smallin[0])/smallin[0] lt x))-1 
     14   numligne = n_elements(where(findgen(smallin[1])/smallin[1] lt 1-y))-1 
     15   numdessin = numcolonne+numligne*smallin[0]+1 
    1616; choix du type d''action 
    1717   case uval.press of 
    1818      1:BEGIN 
    19 ;         if top_uvalue.petitin[2] NE numdessin then begin 
    20          tracecadre, petitin, /erase 
    21          if total(petitin EQ petitout) EQ 3 then $ 
    22           tracecadre, petitout, /out 
    23          petitin = [petitin[0:1], numdessin] 
    24          *top_uvalue[1, findline(top_uvalue, 'petitin')] = petitin 
    25          tracecadre, petitin 
     19;         if top_uvalue.smallin[2] NE numdessin then begin 
     20         tracecadre, smallin, /erase 
     21         if total(smallin EQ smallout) EQ 3 then $ 
     22          tracecadre, smallout, /out 
     23         smallin = [smallin[0:1], numdessin] 
     24         *top_uvalue[1, findline(top_uvalue, 'smallin')] = smallin 
     25         tracecadre, smallin 
    2626         !p = (extractatt(top_uvalue, 'penvs'))[numdessin-1] 
    2727         !x = (extractatt(top_uvalue, 'xenvs'))[numdessin-1] 
     
    3030      END 
    3131      2:BEGIN  
    32 ;         if top_uvalue.petitout[2] NE numdessin then begin 
    33          tracecadre, petitout, /erase 
    34          if total(petitin EQ petitout) EQ 3 then $ 
    35           tracecadre, petitin 
    36          petitout = [petitin[0:1], numdessin] 
    37          *top_uvalue[1, findline(top_uvalue, 'petitout')] = petitout 
    38          tracecadre, petitout, /out 
     32;         if top_uvalue.smallout[2] NE numdessin then begin 
     33         tracecadre, smallout, /erase 
     34         if total(smallin EQ smallout) EQ 3 then $ 
     35          tracecadre, smallin 
     36         smallout = [smallin[0:1], numdessin] 
     37         *top_uvalue[1, findline(top_uvalue, 'smallout')] = smallout 
     38         tracecadre, smallout, /out 
    3939;         endif 
    4040      END 
    4141      4:BEGIN 
    42          tracecadre, [petitin[0:1], numdessin], /fill 
     42         tracecadre, [smallin[0:1], numdessin], /fill 
    4343         inserthistory, event.top, ';', '; beginning of '+strtrim(numdessin, 2) $ 
    4444          , '; end of '+strtrim(numdessin, 2) 
     
    5353         (*top_uvalue[1, findline(top_uvalue, 'prefixes')])[numdessin] = '' 
    5454 
    55          if numdessin EQ petitin[2] then $ 
    56           tracecadre, petitin 
    57          if numdessin EQ petitout[2] then $ 
    58           tracecadre, petitout, /out 
    59       END 
     55         if numdessin EQ smallin[2] then $ 
     56          tracecadre, smallin 
     57         if numdessin EQ smallout[2] then $ 
     58          tracecadre, smallout, /out 
     59       END 
     60       ELSE: 
    6061   endcase 
    6162   updatewidget, event.top 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.pro

    r47 r49  
    7575;    ENDIF 
    7676; 
    77    petitout = long(extractatt(top_uvalue, 'petitout')) 
    78    numdessinout = petitout[2]-1 
     77   smallout = long(extractatt(top_uvalue, 'smallout')) 
     78   numdessinout = smallout[2]-1 
    7979; 
    80    tracecadre, petitout, /fill 
     80   tracecadre, smallout, /fill 
    8181; 
    8282; 
     
    9090               , 'portrait = '+portrait $ 
    9191               , Commande] $ 
    92     , filename = isafile(file = 'xxx_oneplot', io = homedir,/new) 
     92    , filename =  myuniquetmpdir + 'xxx_oneplot.pro' 
    9393; 
    94    inserthistory, base, Commande,'; beginning of '+strtrim(petitout[2], 1) $ 
    95     , '; end of '+strtrim(petitout[2], 1) 
     94   inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $ 
     95    , '; end of '+strtrim(smallout[2], 1) 
    9696; 
    9797   (*top_uvalue[1, findline(top_uvalue, 'penvs')])[numdessinout] = !p 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/longclickaction.pro

    r47 r49  
    33   widget_control,event.top, get_uvalue = top_uvalue 
    44; quel est le dessin selectionne?? 
    5    petitout = extractatt(top_uvalue, 'petitout') 
    6    petitin = extractatt(top_uvalue, 'petitin') 
    7    petit = petitin 
     5   smallout = extractatt(top_uvalue, 'smallout') 
     6   smallin = extractatt(top_uvalue, 'smallin') 
     7   small = smallin 
    88   x = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[0] 
    99   y = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[1] 
    10    numcolonne = n_elements(where(findgen(petit[0])/petit[0] lt x))-1 
    11    numligne = n_elements(where(findgen(petit[1])/petit[1] lt 1-y))-1 
    12    numdessin = numcolonne+numligne*petit[0] 
     10   numcolonne = n_elements(where(findgen(small[0])/small[0] lt x))-1 
     11   numligne = n_elements(where(findgen(small[1])/small[1] lt 1-y))-1 
     12   numdessin = numcolonne+numligne*small[0] 
    1313; on met ce cadrant en leader 
    14    tracecadre, petitin, /erase 
    15    if total(petitin EQ petitout) EQ 3 then $ 
    16     tracecadre, petitout, /out 
    17    petitin = [petitin[0:1], numdessin+1] 
    18    *top_uvalue[1, findline(top_uvalue, 'petitin')] = petitin 
    19    tracecadre, petitin 
     14   tracecadre, smallin, /erase 
     15   if total(smallin EQ smallout) EQ 3 then $ 
     16    tracecadre, smallout, /out 
     17   smallin = [smallin[0:1], numdessin+1] 
     18   *top_uvalue[1, findline(top_uvalue, 'smallin')] = smallin 
     19   tracecadre, smallin 
    2020   !p = (extractatt(top_uvalue, 'penvs'))[numdessin] 
    2121   !x = (extractatt(top_uvalue, 'xenvs'))[numdessin] 
     
    2929   y = [coor[1, 0],coor[1, 1]] 
    3030   domainid = widget_info(event.top,find_by_uname = 'domain') 
    31    boite = [x, y] 
    32 ; faut-il passer la boite en indexes ??? 
    33    currentplot = (extractatt(top_uvalue, 'petitin'))[2]-1 
     31   boxzoom = [x, y] 
     32; faut-il passer la boxzoom en indexes ??? 
     33   currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 
    3434   options = extractatt(top_uvalue, 'options')    
    3535   flags = extractatt(top_uvalue, 'optionsflag') 
     
    4343      indexvar = widget_info(widget_info(event.top, find_by_uname = 'champ'), /droplist_select) 
    4444      vargrid = strupcase(listgrid[indexvar]) 
    45       domdef, boite, grille = vargrid 
    46       grille, mask,glam,gphi,gdep,nx,ny,nz,premierx,premiery,premierz,dernierx,derniery,dernierz 
    47       if changex then boite[0:1] = [premierx, dernierx] 
    48       if changey then boite[2:3] = [premiery, derniery] 
     45      domdef, boxzoom, gridtype = vargrid 
     46      grille, -1, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
     47      if changex then boxzoom[0:1] = [firstx, lastx] 
     48      if changey then boxzoom[2:3] = [firsty, lasty] 
    4949   endif 
    5050; 
    51    widget_control, domainid, set_value = boite 
     51   widget_control, domainid, set_value = boxzoom 
    5252; 
    5353;------------------------------------------------------------ 
     
    5858      1:BEGIN 
    5959         nodates = (type EQ 'xt' OR type EQ 'yt' OR type EQ 'zt' OR type EQ 't') 
    60          updatewidget, event.top, /noboite, nodates = nodates, notype = type NE 'plt' 
     60         updatewidget, event.top, /noboxzoom, nodates = nodates, notype = type NE 'plt' 
    6161         forplth = type EQ 'plt' 
    6262         letsdraw, event.top, forplth = forplth 
    6363      END 
    6464      2:BEGIN  
    65          updatewidget, event.top, /noboite 
     65         updatewidget, event.top, /noboxzoom 
    6666         forpltz = type EQ 'plt' 
    6767         letsdraw, event.top, forpltz = forpltz 
    6868      END 
    6969      4:BEGIN 
    70          updatewidget, event.top, /noboite, /nodates 
     70         updatewidget, event.top, /noboxzoom, /nodates 
    7171         forpltt = type EQ 'plt' 
    7272         letsdraw, event.top, forpltt = forpltt 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/read_vermair.pro

    r47 r49  
    1 FUNCTION read_vermair, name,debut,fin, nomexp, PARENT = parent, BOITE=boite, _EXTRA = ex 
     1FUNCTION read_vermair, name,debut,fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 
    22@common 
    33;------------------------------------------------------------  
     
    55   if name EQ 'vn' then name = 'vomecrty' 
    66   if debut EQ fin then begin 
    7       res = lec(name,debut,nomexp, BOITE=boite, _EXTRA = ex) 
    8    ENDIF ELSE res = lec(name,debut,fin, nomexp, BOITE=boite, _EXTRA = ex) 
     7      res = lec(name,debut,nomexp, BOXZOOM=boxzoom, _EXTRA = ex) 
     8   ENDIF ELSE res = lect(name,debut,fin, nomexp, BOXZOOM=boxzoom, _EXTRA = ex) 
    99;------------------------------------------------------------  
    1010   return, {tab:res, grille:vargrid, unite:'', experience:varexp, nom:varname} 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro

    r47 r49  
    2828; 
    2929;------------------------------------------------------------ 
    30 FUNCTION scanfile, nomficher, IODIRECTORY = iodirectory 
     30FUNCTION scanfile, nomficher, _extra = ex 
    3131@common 
    3232;------------------------------------------------------------ 
     
    3434; declarees ds un common) 
    3535;------------------------------------------------------------ 
    36    res = -1 
     36  res = -1 
    3737;------------------------------------------------------------ 
    3838; choix du nom du fichier 
    3939;------------------------------------------------------------ 
    40    if NOT keyword_set(iodirectory) then iodirectory = iodir 
    41    nom = isafile(filename = nomficher, IODIRECTORY = iodirectory) 
     40  nom = isafile(filename = nomficher, IODIRECTORY = iodir, _extra = ex) 
    4241;------------------------------------------------------------ 
    4342; ouverture du fichier nom 
    4443;------------------------------------------------------------ 
    45    cdfid=ncdf_open(nom) 
     44  cdfid = ncdf_open(nom) 
    4645;------------------------------------------------------------ 
    4746; que contient le fichier?? 
    4847;------------------------------------------------------------ 
    49    contient=ncdf_inquire(cdfid) 
    50    vargrid = strupcase(strmid(nom, strlen(nom)-9)) 
    51    if vargrid EQ 'GRID.T.NC' OR vargrid EQ 'GRID.U.NC' $ 
    52     OR vargrid EQ 'GRID.V.NC' OR vargrid EQ 'GRID.F.NC' $ 
    53     OR vargrid eq 'GRID.W.NC' $ 
    54     OR vargrid EQ 'GRID_T.NC' OR vargrid EQ 'GRID_U.NC' $ 
    55     OR vargrid EQ 'GRID_V.NC' OR vargrid EQ 'GRID_F.NC' $ 
    56     OR vargrid eq 'GRID_W.NC' then $ 
    57     vargrid = strupcase(strmid(nom, strlen(nom)-4, 1)) ELSE vargrid='T' 
     48  contient = ncdf_inquire(cdfid); 
     49; find vargrid ... 
     50  vargrid = 'T'                 ; default definition 
     51  pattern = ['GRID.', 'GRID_', 'GRID', 'UPID_', '30ID_'] 
     52  gdtype = ['T', 'U', 'V', 'W', 'F'] 
     53  fnametest = strupcase(nom) 
     54  FOR i = 0, n_elements(pattern)-1 DO BEGIN 
     55    FOR j = 0, n_elements(gdtype)-1 DO BEGIN 
     56      substr = pattern[i]+gdtype[j] 
     57      pos = strpos(fnametest, substr) 
     58      IF pos NE -1 THEN $ 
     59        vargrid = strmid(fnametest, pos+strlen(substr)-1, 1) 
     60    ENDFOR 
     61  ENDFOR 
    5862;------------------------------------------------------------ 
    5963; nom des differentes variables 
     
    6266; contient au moins les dimensions qui doivent etre appelles x et y 
    6367; et la dimension infinie 
    64    nomdim   =strarr(contient.ndims) 
    65    for dimiq=0,contient.ndims-1 do begin 
    66       ncdf_diminq,cdfid,dimiq,name,value ; nom et valeur de la dimension 
    67       nomdim[dimiq]=strlowcase(name) 
    68    ENDFOR 
    69    indexdimx = where(nomdim EQ 'x' OR nomdim EQ 'lon' OR nomdim EQ 'longitude') 
    70    indexdimx = indexdimx[0] 
    71    if indexdimx EQ -1 then begin 
    72       print, 'one of the dimensions must have the name: ''x'' or ''lon'' or ''longitude''' 
    73       stop 
    74    endif 
    75    indexdimy = where(nomdim EQ 'y' OR nomdim EQ 'lat' OR nomdim EQ 'latitude') 
    76    indexdimy = indexdimy[0] 
    77    if indexdimy EQ -1 then begin 
    78       print, 'one of the dimensions must have the name: ''y'' or ''lat'' or ''latitude''' 
    79       stop 
    80    endif 
     68  nomdim   = strarr(contient.ndims) 
     69  for dimiq = 0, contient.ndims-1 do begin 
     70    ncdf_diminq, cdfid, dimiq, name, value ; nom et valeur de la dimension 
     71    nomdim[dimiq] = strlowcase(name) 
     72  ENDFOR 
     73  indexdimx = where(nomdim EQ 'x' OR nomdim EQ 'lon' OR nomdim EQ 'longitude' OR nomdim EQ 'xt_i7_156' OR nomdim EQ 'xi_rho' OR nomdim EQ 'xi_u' OR nomdim EQ 'xi_v' OR nomdim EQ 'xi_psi') 
     74  indexdimx = indexdimx[0] 
     75  if indexdimx EQ -1 then begin 
     76    print, 'one of the dimensions must have the name: ''x'' or ''lon'' or ''longitude'' or ''xt_i7_156''' 
     77    stop 
     78  endif 
     79  indexdimy = where(nomdim EQ 'y' OR nomdim EQ 'lat' OR nomdim EQ 'latitude' OR nomdim EQ 'yt_j6_75' OR nomdim EQ 'eta_rho' OR nomdim EQ 'eta_u' OR nomdim EQ 'eta_v' OR nomdim EQ 'eta_psi') 
     80  indexdimy = indexdimy[0] 
     81  if indexdimy EQ -1 then begin 
     82    print, 'one of the dimensions must have the name: ''y'' or ''lat'' or ''latitude'' or ''yt_j6_75''' 
     83    stop 
     84  endif 
    8185; 
    82    namevar = strarr(contient.nvars) 
    83    for varid=0,contient.nvars-1 do begin 
    84       varcontient=ncdf_varinq(cdfid,varid) ; que contient la variable 
    85       if (where(varcontient.dim EQ indexdimx))[0] NE -1 AND $ 
    86        (where(varcontient.dim EQ indexdimy))[0] NE -1 AND $ 
    87        (where(varcontient.dim EQ contient.recdim))[0] NE -1 THEN namevar[varid]=varcontient.name  
    88    ENDFOR 
    89    namevar = namevar[where(namevar NE '')] 
    90    listgrid = replicate(vargrid,  n_elements(namevar)) 
     86  namevar = strarr(contient.nvars) 
     87  for varid = 0, contient.nvars-1 do begin 
     88    varcontient = ncdf_varinq(cdfid, varid) ; que contient la variable 
     89    if (where(varcontient.dim EQ indexdimx))[0] NE -1 AND $ 
     90      (where(varcontient.dim EQ indexdimy))[0] NE -1 AND $ 
     91      (where(varcontient.dim EQ contient.recdim))[0] NE -1 THEN namevar[varid] = varcontient.name  
     92  ENDFOR 
     93  namevar = namevar[where(namevar NE '')] 
     94  listgrid = replicate(vargrid,  n_elements(namevar)) 
    9195;------------------------------------------------------------ 
    9296; on recupere l''axe des temps 
    9397;------------------------------------------------------------ 
    9498; on recupere le nom de la variable contenant l''axe des temps 
    95    varid = 0 
    96    repeat BEGIN                ; tant que l''on a pas trouve une variable qui n''a qu'' 
     99  varid = 0 
     100  repeat BEGIN ; tant que l''on a pas trouve une variable qui n''a qu'' 
    97101                                ; une dimension: la dimension infinie 
    98       varcontient=ncdf_varinq(cdfid,varid) ; que contient la variable 
    99       varid = varid+1 
    100    endrep until n_elements(varcontient.dim) EQ 1 AND varcontient.dim[0] EQ contient.recdim 
     102    varcontient = ncdf_varinq(cdfid, varid) ; que contient la variable 
     103    varid = varid+1 
     104  endrep until n_elements(varcontient.dim) EQ 1 AND varcontient.dim[0] EQ contient.recdim ; 
     105  varid = varid-1 
     106; 
     107; we want to know which attrributes are attached to the time variable... 
     108; 
     109  if varcontient.natts EQ 0 then BEGIN 
     110    ncdf_close, cdfid 
     111    return, report('the variable '+varcontient.name+' has no attribut.!C we need attribut ''units'' for the calendar ...') 
     112  endif 
     113  attnames = strarr(varcontient.natts) 
     114  for attiq = 0, varcontient.natts-1 do attnames[attiq] = ncdf_attname(cdfid, varid, attiq) 
     115  if (where(attnames EQ 'units'))[0] EQ -1 then BEGIN 
     116    ncdf_close, cdfid 
     117    return, report('Attribut ''units'' not found for the variable '+varid.name+'we need it for the calendar...') 
     118  endif 
    101119; on lit l''axe des temps 
    102    varid = varid-1 
    103    ncdf_varget, cdfid, varid, time 
    104    time = long(time) 
    105    ncdf_attget,cdfid,varid,'units',value 
     120  ncdf_varget, cdfid, varid, time 
     121  time = double(time) 
     122  ncdf_attget, cdfid, varid, 'units', value 
    106123; time_counter:units = "seconds since 0001-01-01 00:00:00" ; 
    107124; time_counter:units = "hours since 0001-01-01 00:00:00" ; 
     
    109126; time_counter:units = "months since 1979-01-01 00:00:00" ; 
    110127; time_counter:units = "years since 1979-01-01 00:00:00" ; 
    111    value = strtrim(strcompress(string(value)), 2) 
    112    mots = str_sep(value, ' ') 
    113    unite = mots[0] 
    114    debut = str_sep(mots[2], '-') 
     128  value = strtrim(strcompress(string(value)), 2) 
     129  mots = str_sep(value, ' ') 
     130  unite = mots[0] 
     131  debut = str_sep(mots[2], '-') 
    115132; 
     133; now we try to find the attribut called calendar... 
     134; the the attribute "calendar" exists? 
     135; If no, we suppose that the calendar is gregorian calendar 
    116136; 
    117 ; ATTENTION il faut recuperer l''atribut calendar et ajuster time en 
     137  if (where(attnames EQ 'calendar'))[0] NE -1 then BEGIN 
     138      ncdf_attget, cdfid, varid, 'calendar', value 
     139      value = string(value) 
     140        CASE value OF 
     141          '360d':key_caltype = '360d' 
     142          'greg':IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
     143          ELSE:BEGIN 
     144;            notused = report('Unknown calendar: '+value+', we use greg calendar.')  
     145            key_caltype = 'greg' 
     146          END 
     147        ENDCASE 
     148      ENDIF ELSE BEGIN 
     149;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.')  
     150        IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
     151      ENDELSE 
     152; 
     153; ATTENTION il faut recuperer l''attribut calendar et ajuster time en 
    118154; consequense... 
    119155; 
     
    122158; on suppose qu''on utilise le vrai calendrier. 
    123159; 
    124    case strlowcase(unite) of 
    125       'seconds':time = julday(debut[1], debut[2], debut[0])+time/(long(24)*3600) 
    126       'hours':time = julday(debut[1], debut[2], debut[0])+time/(long(24)) 
    127       'days':time = julday(debut[1], debut[2], debut[0])+time 
    128       'months':BEGIN  
    129          for t = 0, n_elements(time)-1  do begin 
    130             time[t] = julday(debut[1]+time[t], debut[2], debut[0]) 
    131          endfor 
    132       END 
    133       'years':BEGIN 
    134          for t = 0, n_elements(time)-1  do begin 
    135             time[t] = julday(debut[1], debut[2], debut[0]+time[t]) 
    136          endfor 
    137       END 
    138    ENDCASE 
     160  unite = strlowcase(unite) 
     161  IF strpos(unite, 's', strlen(unite)-1) NE -1 THEN unite = strmid(unite, 0, strlen(unite)-1) 
     162  IF strpos(unite, 'julian_') NE -1 THEN unite = strmid(unite, 7) 
     163  case unite of 
     164    'second':time = julday(debut[1], debut[2], debut[0])+time/(long(24)*3600) 
     165    'hour':time = julday(debut[1], debut[2], debut[0])+time/(long(24)) 
     166    'day':time = julday(debut[1], debut[2], debut[0])+time 
     167    'month':BEGIN  
     168      if total(fix(time) NE time) NE 0 then $ ; we switch to days with 30d/m 
     169        time = julday(debut[1], debut[2], debut[0])+round(time*30) $ 
     170      ELSE for t = 0, n_elements(time)-1 DO $ 
     171        time[t] = julday(debut[1]+time[t], debut[2], debut[0]) 
     172    END 
     173    'year':BEGIN 
     174      if total(fix(time) NE time) NE 0 then $ ; we switch to days with 365d/y 
     175        time = julday(debut[1], debut[2], debut[0])+round(time*365) $ 
     176      ELSE for t = 0, n_elements(time)-1 do $ 
     177        time[t] = julday(debut[1], debut[2], debut[0]+time[t]) 
     178    END 
     179  ENDCASE 
     180  time = long(time) 
    139181;------------------------------------------------------------ 
    140    return, {filename:nom, time_counter:time, listvar:namevar, listgrid:strupcase(listgrid)} 
     182  return, {filename:nom, time_counter:time, listvar:namevar, listgrid:strupcase(listgrid), calendartype:key_caltype} 
    141183end 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/tracecadre.pro

    r47 r49  
    1 PRO tracecadre, petit, out = out, erase = erase, fill = fill 
     1PRO tracecadre, small, out = out, erase = erase, fill = fill 
    22;------------------------------------------------------------ 
    3 ; determination de la colonne et de la ligne correspondant au petit en 
     3; determination de la colonne et de la ligne correspondant au small en 
    44; entree 
    5    numdessin = petit[2]-1 
    6    numligne = numdessin/petit[0] 
    7    numcolonne = numdessin-numligne*petit[0] 
     5   numdessin = small[2]-1 
     6   numligne = numdessin/small[0] 
     7   numcolonne = numdessin-numligne*small[0] 
    88; determination de poscadre 
    9    largeurcolonne = 1./petit[0] 
    10    largeurligne = 1./petit[1] 
     9   largeurcolonne = 1./small[0] 
     10   largeurligne = 1./small[1] 
    1111   cadre = [numcolonne*largeurcolonne,1.-((numligne+1)*largeurligne) $ 
    1212            , (numcolonne+1)*largeurcolonne, 1.-(numligne*largeurligne)] 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.pro

    r47 r49  
    1 PRO updatewidget, base, NOBOITE = noboite, NODATES = nodates, NOTYPE = notype 
     1PRO updatewidget, base, NOBOXZOOM = noboxzoom, NODATES = nodates, NOTYPE = notype 
    22;---------------------------------------------------------------------- 
    33   widget_control,base, get_uvalue = top_uvalue 
    4    petitin = extractatt(top_uvalue, 'petitin') 
    5    numdessinin = petitin[2]-1 
     4   smallin = extractatt(top_uvalue, 'smallin') 
     5   numdessinin = smallin[2]-1 
    66; 
    77;---------------------------------------------------------------------- 
     
    2020; domaine 
    2121;-------------- 
    22    boite = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
    23    if total(boite) EQ 0 then boite = -1 
    24    if keyword_set(noboite) then boite = 0 
     22   boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
     23   if total(boxzoom) EQ 0 then boxzoom = -1 
     24   if keyword_set(noboxzoom) then boxzoom = 0 
    2525;-------------- 
    2626; champ: filename & nomvar 
     
    3030; 
    3131   if filename NE '' OR nomvar NE '' THEN BEGIN 
    32       changefile, base, filename, fieldname = nomvar, BOITE = boite, DATE1 = date1, DATE2 = date2 
     32      changefile, base, filename, fieldname = nomvar, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2 
    3333   ENDIF ELSE BEGIN 
    3434      if date1 NE 0 then begin 
     
    4040         widget_control, date2id, set_value = date2 
    4141      endif 
    42       if keyword_set(boite) then BEGIN  
     42      if keyword_set(boxzoom) then BEGIN  
    4343         domainid = widget_info(base, find_by_uname = 'domain') 
    44          widget_control, domainid, set_value = boite 
     44         widget_control, domainid, set_value = boxzoom 
    4545      endif 
    4646   ENDELSE 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/widgetdessine.pro.old

    r47 r49  
    4848; help,  top_uvalue.exextra, /struct 
    4949   if NOT keyword_set(commande) then $ 
    50     commande = construitcommande(base, FORPLTH = forplt, FORPLTZ = forpltz, FORPLTT = forpltt, _extra = ex) 
     50    commande = construitcommande(base, FORPLTH = forplth, FORPLTZ = forpltz, FORPLTT = forpltt, _extra = ex) 
    5151   widget_control,base, get_uvalue = top_uvalue 
    5252; print, '*****************' 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.pro

    r47 r49  
    2424   widget_control, widget_info(event.top, find_by_uname = 'debut') $ 
    2525    , get_value = vdate1 
    26    index1 = where(calendar eq juldate(vdate1, /vraidate)) & index1 = index1[0]  
     26   index1 = where(calendar eq juldate(vdate1)) & index1 = index1[0]  
    2727   if index1 EQ -1 then return 
    2828; 
    2929   widget_control, widget_info(event.handler, find_by_uname = 'fin') $ 
    3030    , get_value = vdate2 
    31    index2 = where(calendar eq juldate(vdate2, /vraidate)) & index2 = index2[0]  
     31   index2 = where(calendar eq juldate(vdate2)) & index2 = index2[0]  
    3232   if index2 EQ -1 OR index2 LE index1 then return 
    3333; on detruit le widget avant de creer le fichier .ps 
     
    4444   globalcommand = extractatt(top_uvalue, 'globalcommand') 
    4545; on complete par le premiere et les dernieres lignes du programme 
    46    globalcommand = ['pro xxx2ps, NOERASE = noerase, POSTSCRIPT = postscript, DATE1IN = date1in, DATE2IN = date2in' $ 
    47                     , globalcommand $ 
    48                     , 'return',  'end'] 
    49    putfile, isadirectory(io = homedir, title = 'Bad definition of homedir')+'xxx2ps.pro', globalcommand ; on l''ecrit 
    50    resolve_routine, 'xxx2ps' ; on le compile 
     46   createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
     47              , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, DATE1IN = date1in, DATE2IN = date2in' 
    5148; 
    5249;--------creation du fichier---------- 
  • trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar.pro

    r47 r49  
    9191      end 
    9292      'PS' :BEGIN 
    93 ; we find homedir 
    94          homedir = isadirectory(io = homedir, title = 'Bad definition of homedir') 
     93         IF lmgr(/demo) EQ 1 THEN BEGIN 
     94            dummy = report('impossible to save as postscript in demo mode') 
     95            return 
     96         ENDIF 
    9597         widget_control,event.top, get_uvalue = top_uvalue 
    9698; portrait ou landscape ??? 
     
    101103         globalcommand = extractatt(top_uvalue, 'globalcommand') 
    102104; on complete par le premiere et les dernieres lignes du programme 
    103          globalcommand = ['pro xxx2ps, NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape, DATE1IN = date1in, DATE2IN = date2in, _extra = ex' $ 
    104                           , globalcommand $ 
    105                           , 'return',  'end'] 
    106          putfile, homedir+'xxx2ps.pro', globalcommand ; on l''ecrit 
    107          resolve_routine, 'xxx2ps' ; on le compile 
    108          xxx2ps, /post, portrait = portrait ; on l''applique 
    109       END 
     105         createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
     106                    , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape, DATE1IN = date1in, DATE2IN = date2in, _extra = ex' $ 
     107                    , KWDUSED = ', /POSTSCRIPT, PORTRAIT = portrait' 
     108       END 
    110109      'Anim' :begin  
    111          xcreateanim, event.top 
     110;;; no more working...         xcreateanim, event.top 
    112111      end 
    113112      'Gif' :BEGIN 
     113         IF lmgr(/demo) EQ 1 THEN BEGIN 
     114            dummy = report('impossible to save as an image in demo mode') 
     115            return 
     116         ENDIF 
    114117         widget_control,event.top, get_uvalue = top_uvalue 
    115          petitin = extractatt(top_uvalue, 'petitin') 
    116          numdessinin = petitin[2]-1 
    117          petitout = extractatt(top_uvalue, 'petitout') 
    118          numdessinout = petitout[2]-1 
    119          tracecadre, petitin, /erase 
    120          tracecadre, petitout, /erase 
     118         smallin = extractatt(top_uvalue, 'smallin') 
     119         numdessinin = smallin[2]-1 
     120         smallout = extractatt(top_uvalue, 'smallout') 
     121         numdessinout = smallout[2]-1 
     122         tracecadre, smallin, /erase 
     123         tracecadre, smallout, /erase 
    121124         filename = xquestion('dans quelle fichier gif voulez vous sauver !C l''ecran de xxx?', 'xxx_image.gif') 
    122125         if rstrpos(filename, '.gif') NE strlen(filename)-4 then filename = filename+'.gif' 
     
    125128      end 
    126129      'Script':BEGIN 
     130         IF lmgr(/demo) EQ 1 THEN BEGIN 
     131            dummy = report('impossible to save as a idl program file in demo mode') 
     132            return 
     133         ENDIF 
    127134; on recupere le nom du fichier 
    128135         filename = xquestion('dans quelle procedure IDL voulez vous sauver !C la realisation de ce graph?', 'xxx_figure.pro') 
     
    158165      END 
    159166      'Widget':BEGIN 
     167         IF lmgr(/demo) EQ 1 THEN BEGIN 
     168            dummy = report('impossible to save the widget in demo mode') 
     169            return 
     170         ENDIF 
    160171; on recupere le nom du fichier 
    161172         filename = xquestion('dans quel fichier bianire voulez vous sauver le widget ?', 'xxx_widget.dat') 
     
    172183      END 
    173184      'Prompt':BEGIN 
    174          commande = getfile(isadirectory(io = homedir)+'xxx_oneplot.pro') 
     185         commande = getfile(myuniquetmpdir + 'xxx_oneplot.pro') 
    175186         for i = 0,  n_elements(commande)-1 do print, commande[i] 
    176187      end 
     
    206217            xmanager,'xxx',basegraph, /no_block 
    207218; on redessine ce qu''il y avait dedans 
    208 ; we find homedir 
    209             homedir = isadirectory(io = homedir, title = 'Bad definition of homedir') 
    210219; on recupere la liste des instructions 
    211220            globalcommand = extractatt(top_uvalue, 'globalcommand') 
    212221; on complete par le premiere et les dernieres lignes du programme 
    213             globalcommand = ['pro xxx2ps, NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape' $ 
    214                              , globalcommand $ 
    215                              , 'return',  'end'] 
    216             putfile, homedir+'xxx2ps.pro', globalcommand ; on l''ecrit 
    217             resolve_routine, 'xxx2ps' ; on le compile 
    218             xxx2ps, /noerase, portrait = key_portrait ; on l''applique 
     222            createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
     223                       , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape' $ 
     224                       , KWDUSED = ', /noerase, PORTRAIT = portrait' 
    219225; on reattribue l''element graphid de la top_uvalue 
    220226            *top_uvalue[1, findline(top_uvalue, 'graphid')] = graphid 
     
    227233      'Overlay' :begin  
    228234         widget_control, event.top, get_uvalue = top_uvalue 
    229          numdessinin = (extractatt(top_uvalue, 'petitin'))[2]-1 
     235         numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    230236         options = extractatt(top_uvalue, 'options')    
    231237         flags = extractatt(top_uvalue, 'optionsflag') 
     
    238244      'Vecteur':BEGIN 
    239245         widget_control, event.top, get_uvalue = top_uvalue 
    240          numdessinin = (extractatt(top_uvalue, 'petitin'))[2]-1 
     246         numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    241247         options = extractatt(top_uvalue, 'options')    
    242248         flags = extractatt(top_uvalue, 'optionsflag') 
     
    249255      'Longitude / x index':BEGIN 
    250256         widget_control, event.top, get_uvalue = top_uvalue 
    251          numdessinin = (extractatt(top_uvalue, 'petitin'))[2]-1 
     257         numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    252258         options = extractatt(top_uvalue, 'options')    
    253259         flags = extractatt(top_uvalue, 'optionsflag') 
     
    257263; on le reeatribue 
    258264         (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 
    259 ; maintenant on va changer les sliders definissant la boite 
     265; maintenant on va changer les sliders definissant la boxzoom 
    260266         domainid = widget_info(event.top, find_by_uname = 'domain') 
    261          boite = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
     267         boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
    262268; on veut retrouver le type de grille qui est utilisee 
    263269         currentfile = extractatt(top_uvalue, 'currentfile') 
     
    267273         if flag EQ 0 then BEGIN ; longitudes 
    268274; on fait un domdef pour retrouver le lon1 lon2 correspondant a la 
    269 ; boite definie sur le widget...  
    270             domdef, boite, grille = vargrid, /xindex $ 
     275; boxzoom definie sur le widget...  
     276            domdef, boxzoom, gridtype = vargrid, /xindex $ 
    271277             , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] 
    272             widget_control, domainid, set_value = [lon1, lon2, boite[2:3]] 
     278            widget_control, domainid, set_value = [lon1, lon2, boxzoom[2:3]] 
    273279         ENDIF ELSE BEGIN       ; xindex 
    274 ; maintenant ion veut retrouver premierx, dernierx correspondant a la 
    275 ; boite definie sur le widget... 
    276             domdef, boite, grille = vargrid $ 
     280; maintenant ion veut retrouver firstx, lastx correspondant a la 
     281; boxzoom definie sur le widget... 
     282            domdef, boxzoom, gridtype = vargrid $ 
    277283             , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] 
    278             grille, mask,glam,gphi,gdep,nx,ny,nz,premierx,premiery,premierz,dernierx,derniery,dernierz 
    279             widget_control, domainid, set_value = [premierx, dernierx, boite[2:3]] 
     284            grille, -1, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
     285            widget_control, domainid, set_value = [firstx, lastx, boxzoom[2:3]] 
    280286         ENDELSE 
    281287; on met a jour la top_uvalue 
    282          widget_control, domainid, get_value = boite 
    283          (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boite 
     288         widget_control, domainid, get_value = boxzoom 
     289         (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom 
    284290      end 
    285291      'Latitude / y index':begin  
    286292         widget_control, event.top, get_uvalue = top_uvalue 
    287          numdessinin = (extractatt(top_uvalue, 'petitin'))[2]-1 
     293         numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    288294         options = extractatt(top_uvalue, 'options')    
    289295         flags = extractatt(top_uvalue, 'optionsflag') 
     
    293299; on le reeatribue 
    294300         (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 
    295 ; maintenant on va changer les sliders definissant la boite 
     301; maintenant on va changer les sliders definissant la boxzoom 
    296302         domainid = widget_info(event.top, find_by_uname = 'domain') 
    297          boite = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
     303         boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
    298304; on veut retrouver le type de grille qui est utilisee 
    299305         currentfile = extractatt(top_uvalue, 'currentfile') 
     
    303309         if flag EQ 0 then BEGIN ; latitudes 
    304310; on fait un domdef pour retrouver le lat1 lat2 correspondant a la 
    305 ; boite definie sur le widget...  
    306             domdef, boite, grille = vargrid, /yindex $ 
     311; boxzoom definie sur le widget...  
     312            domdef, boxzoom, gridtype = vargrid, /yindex $ 
    307313             , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] 
    308             widget_control, domainid, set_value = [boite[0:1], lat1, lat2] 
     314            widget_control, domainid, set_value = [boxzoom[0:1], lat1, lat2] 
    309315         ENDIF ELSE BEGIN       ; yindex 
    310 ; maintenant ion veut retrouver premiery, derniery correspondant a la 
    311 ; boite definie sur le widget... 
    312             domdef, boite, grille = vargrid $ 
     316; maintenant ion veut retrouver firsty, lasty correspondant a la 
     317; boxzoom definie sur le widget... 
     318            domdef, boxzoom, gridtype = vargrid $ 
    313319             , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] 
    314             grille, mask,glam,gphi,gdep,nx,ny,nz,premierx,premiery,premierz,dernierx,derniery,dernierz 
    315             widget_control, domainid, set_value = [boite[0:1], premiery, derniery] 
     320            grille, -1, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
     321            widget_control, domainid, set_value = [boxzoom[0:1], firsty, lasty] 
    316322         ENDELSE 
    317323; on met a jour la top_uvalue 
    318          widget_control, domainid, get_value = boite 
    319          (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boite 
     324         widget_control, domainid, get_value = boxzoom 
     325         (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom 
    320326      end 
    321327   endcase 
Note: See TracChangeset for help on using the changeset viewer.