Changeset 4634


Ignore:
Timestamp:
Oct 31, 2020 10:46:47 AM (12 months ago)
Author:
vondreele
Message:

fix crash on unknown rId in plot inv pole figure
change CF map roll from steps to cell fractions; range -1 --> 1

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4624 r4634  
    1226312263            Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])           
    1226412264            dims = mapData['rho'].shape
    12265             dims = [[-D,D] for D in dims]
    12266             dlg = G2G.MultiDataDialog(G2frame,title='Roll map by steps',
    12267                 prompts=['X steps (%d to %d)'%(dims[0][0],dims[0][1]),
    12268                          'Y steps (%d to %d)'%(dims[1][0],dims[1][1]),
    12269                          'Z steps (%d to %d)'%(dims[2][0],dims[2][1])],values=[0,0,0,],
    12270                     limits=dims,formats=['%6d','%6d','%6d'])
     12265            dlg = G2G.MultiDataDialog(G2frame,title='Roll map shifts',
     12266                prompts=['delt-X (-1. to 1.)','delt-Y (-1. to 1.)',
     12267                         'delt-Z (-1. to 1.)'],values=[0.,0.,0.,],
     12268                    limits=[[-1.,1.],[-1.,1.],[-1.,1.]],formats=['%.4f','%.4f','%.4f'])
     12269           
    1227112270            if dlg.ShowModal() == wx.ID_OK:
    1227212271                rollsteps = dlg.GetValues()
    12273                 rollsteps = [int(R) for R in rollsteps]
     12272                dxy = np.array([float(R) for R in rollsteps])
     12273                rollsteps = np.array([round(float(R)*dims[iR]) for iR,R in enumerate(rollsteps)])
    1227412274                mapData['rho'] = np.roll(np.roll(np.roll(mapData['rho'],rollsteps[0],axis=0),rollsteps[1],axis=1),rollsteps[2],axis=2)
    12275                 steps = 1./np.array(dims)
    12276                 dxy = rollsteps*steps.T[1]
    1227712275                for peak in mapPeaks:
    1227812276                    peak[1:4] += dxy
  • trunk/GSASIIplot.py

    r4624 r4634  
    59285928        Id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,hist)
    59295929        rId = G2gd.GetGPXtreeItemId(G2frame,Id,'Reflection Lists')
     5930        if not rId:
     5931            return
    59305932        RefData = G2frame.GPXtree.GetItemPyData(rId)[phase]
    59315933        if 'Type' not in RefData or 'RefList' not in RefData:
Note: See TracChangeset for help on using the changeset viewer.