Changeset 1519


Ignore:
Timestamp:
Oct 6, 2014 3:05:14 PM (9 years ago)
Author:
vondreele
Message:

fix TOF contour plot issues - log bins can't be directly plotted. Now shows "Channel no." for x-axis. Motion gives TOF, D & q correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1506 r1519  
    969969                    q = 2.*np.pi/dsp
    970970                    xpos = G2lat.Dsp2pos(Parms,xpos)
     971                elif G2frame.Contour and 'T' in Parms['Type'][0]:
     972                    xpos = X[xpos]                   
     973                    dsp = G2lat.Pos2dsp(Parms,xpos)
     974                    q = 2.*np.pi/dsp
    971975                else:
    972976                    dsp = G2lat.Pos2dsp(Parms,xpos)
     
    12901294        Title = 'log('+Title+')'
    12911295    Plot.set_title(Title)
    1292     if G2frame.qPlot or 'SASD' in plottype:
     1296    if G2frame.qPlot or 'SASD' in plottype and not G2frame.Contour:
    12931297        Plot.set_xlabel(r'$Q, \AA^{-1}$',fontsize=16)
    1294     elif G2frame.dPlot and 'PWDR' in plottype:
     1298    elif G2frame.dPlot and 'PWDR' in plottype and not G2frame.Contour:
    12951299        Plot.set_xlabel(r'$d, \AA$',fontsize=16)
    12961300    else:
     
    12981302            Plot.set_xlabel(r'$\mathsf{2\theta}$',fontsize=16)
    12991303        else:
    1300             Plot.set_xlabel(r'$TOF, \mathsf{\mu}$s',fontsize=16)           
     1304            if G2frame.Contour:
     1305                Plot.set_xlabel(r'Channel no.',fontsize=16)           
     1306            else:
     1307                Plot.set_xlabel(r'$TOF, \mathsf{\mu}$s',fontsize=16)           
    13011308    if G2frame.Weight:
    13021309        if 'PWDR' in plottype:
     
    13801387                Lines.append(Plot.axvline(item[1],color='m',dashes=(5,5),picker=3.))
    13811388                exclLines += [2*i+2,2*i+3]
    1382         if G2frame.Contour:
    1383            
     1389        if G2frame.Contour:           
    13841390            if lenX == len(X):
    13851391                ContourY.append(N)
    13861392                ContourZ.append(Y)
    1387                 ContourX = X
     1393                if 'C' in ParmList[0]['Type'][0]:       
     1394                    ContourX = X
     1395                else: #'T'OF
     1396                    ContourX = range(lenX)
    13881397                Nseq += 1
    13891398                Plot.set_ylabel('Data sequence',fontsize=12)
Note: See TracChangeset for help on using the changeset viewer.