Changeset 2295


Ignore:
Timestamp:
May 26, 2016 11:31:57 AM (6 years ago)
Author:
vondreele
Message:

add merohedral twins tutorial
fix problem in GetImageZ

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r2284 r2295  
    38763876    ['MCsimanneal', 'MCsimanneal', 'MCSA in GSAS.htm',
    38773877        'Monte-Carlo simulated annealing structure'],
     3878       
     3879    ['MerohedralTwins', 'MerohedralTwins','Merohedral twin refinement in GSAS.htm',
     3880        'Merohedral twin refinements'],
    38783881
    38793882    ['2DCalibration', '2DCalibration', 'Calibration of an area detector in GSAS.htm',
  • trunk/GSASIIimgGUI.py

    r2290 r2295  
    6767    if darkImg:
    6868        Did = G2gd.GetPatternTreeItemId(G2frame, G2frame.root, darkImg)
    69         Ddata = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Did,'Image Controls'))
    70         dformatName = Ddata.get('formatName','')
    7169        if Did:
     70            Ddata = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Did,'Image Controls'))
     71            dformatName = Ddata.get('formatName','')
    7272            Npix,imagefile,imagetag = G2frame.PatternTree.GetImageLoc(Did)
    7373            imagefile = G2IO.CheckImageFile(G2frame,imagefile)
     
    8787            if darkImg:
    8888                Did = G2gd.GetPatternTreeItemId(G2frame, G2frame.root,darkImg)
    89                 Ddata = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Did,'Image Controls'))
    90                 dformatName = Ddata.get('formatName','')
    91                 Npix,imagefile,imagetag = G2frame.PatternTree.GetImageLoc(Did)
    92                 imagefile = G2IO.CheckImageFile(G2frame,imagefile)
    93                 darkImage = G2IO.GetImageData(G2frame,imagefile,True,ImageTag=imagetag,FormatName=dformatName)
    94                 backImage += np.array(darkImage*darkScale,dtype='int32')               
     89                if Did:
     90                    Ddata = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Did,'Image Controls'))
     91                    dformatName = Ddata.get('formatName','')
     92                    Npix,imagefile,imagetag = G2frame.PatternTree.GetImageLoc(Did)
     93                    imagefile = G2IO.CheckImageFile(G2frame,imagefile)
     94                    darkImage = G2IO.GetImageData(G2frame,imagefile,True,ImageTag=imagetag,FormatName=dformatName)
     95                    backImage += np.array(darkImage*darkScale,dtype='int32')               
    9596            sumImg += np.array(backImage*backScale,dtype='int32')
    9697    if darkImg: del darkImg         #force cleanup
Note: See TracChangeset for help on using the changeset viewer.