Changeset 2278


Ignore:
Timestamp:
May 19, 2016 2:47:49 PM (7 years ago)
Author:
vondreele
Message:

add calculation of total fault density to Layers GUI
trap another plot error

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r2276 r2278  
    28002800                    G2plt.PlotLayers(G2frame,Layers,[Yi,Xi,],plotDefaults)
    28012801                else:
     2802                    Psum = 0.
     2803                    for Xi in range(len(transArray)):
     2804                        Psum += transArray[Xi][Xi][0]
     2805                    Psum /= len(transArray)
     2806                    totalFault.SetLabel(' Total fault density = %.3f'%(1.-Psum))
    28022807                    event.Skip()
    28032808                   
     
    28452850            if not Names or not transArray:
    28462851                return transSizer
     2852            diagSum = 0.
    28472853            for Yi,Yname in enumerate(Names):
    28482854                transSizer.Add(wx.StaticText(layerData,label=' From %s to:'%(Yname)),0,WACV)
    28492855                table = []
    28502856                rowLabels = []
     2857                diagSum += transArray[Yi][Yi][0]
    28512858                for Xi,Xname in enumerate(Names):
    28522859                    table.append(transArray[Yi][Xi])
     
    28682875                transSizer.Add(transGrid)
    28692876                layerData.transGrids.append(transGrid)
     2877            if len(transArray):
     2878                diagSum /= len(transArray)
     2879                totalFault = wx.StaticText(layerData,
     2880                    label=' Total fault density = %.3f'%(1.-diagSum))
     2881                transSizer.Add(totalFault,0,WACV)
    28702882            return transSizer
    28712883           
  • trunk/GSASIIplot.py

    r2276 r2278  
    16031603        Plot = Page.figure.gca()          #get a fresh plot after clf()
    16041604        G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab
    1605     except ValueError:
     1605    except (ValueError,AttributeError):
    16061606        if plottype == 'SASD':
    16071607            G2frame.logPlot = True
Note: See TracChangeset for help on using the changeset viewer.