Changeset 1660


Ignore:
Timestamp:
Feb 17, 2015 3:27:12 PM (7 years ago)
Author:
vondreele
Message:

fix crash in viewing PWDR data Limits
add new item to PWDR data ('Super':True/False?)
fix plotting problem with reflection tic mark positions
add recovery after bas LS fails making new copy of gpx file

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1657 r1660  
    41684168    elif G2frame.PatternTree.GetItemText(item) == 'Limits':
    41694169        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    4170         datatype = G2frame.PatternTree.GetItemPyData(G2frame.PatternId)[2][:4]
     4170        datatype = G2frame.PatternTree.GetItemText(G2frame.PatternId)[:4]
    41714171        G2frame.PickId = item
    41724172        data = G2frame.PatternTree.GetItemPyData(item)
  • trunk/GSASIIplot.py

    r1657 r1660  
    16851685                if not len(peaks):
    16861686                    continue
    1687                 if len(peaks[0]) > 15:  #is there a way to plot ss lines differnt color than main ones?
     1687                if Phases[phase].get('Super',False):
    16881688                    peak = np.array([[peak[5],peak[6]] for peak in peaks])
    16891689                else:
  • trunk/GSASIIstrIO.py

    r1635 r1660  
    461461    '''
    462462                       
     463    import distutils.file_util as dfu
    463464    GPXback = GPXBackup(GPXfile,makeBack)
    464465    print 'Read from file:',GPXback
     
    493494        except KeyError:
    494495            pass
    495                                
    496         cPickle.dump(data,outfile,1)
    497     infile.close()
    498     outfile.close()
     496        try:                       
     497            cPickle.dump(data,outfile,1)
     498        except AttributeError:
     499            print 'ERROR - bad data in least squares result'
     500            infile.close()
     501            outfile.close()
     502            dfu.copy_file(GPXback,GPXfile)
     503            print 'GPX file save failed - old version retained'
     504            return
     505           
    499506    print 'GPX file save successful'
    500507   
     
    21012108                    Phi = []
    21022109                    if Phases[phase]['General']['Type'] in ['modulated','magnetic']:
     2110                        ifSuper = True
    21032111                        HKLd = np.array(G2lat.GenSSHLaue(dmin,SGData,SSGData,Vec,maxH,A))
    21042112                        HKLd = G2mth.sortArray(HKLd,4,reverse=True)
     
    21232131                                        Phi.append(phi)
    21242132                    else:
     2133                        ifSuper = False
    21252134                        HKLd = np.array(G2lat.GenHLaue(dmin,SGData,A))
    21262135                        HKLd = G2mth.sortArray(HKLd,3,reverse=True)
     
    21452154                                    Uniq.append(uniq)
    21462155                                    Phi.append(phi)
    2147                     Histogram['Reflection Lists'][phase] = {'RefList':np.array(refList),'FF':{},'Type':inst['Type'][0]}
     2156                    Histogram['Reflection Lists'][phase] = {'RefList':np.array(refList),'FF':{},'Type':inst['Type'][0],'Super':ifSuper}
    21482157            elif 'HKLF' in histogram:
    21492158                inst = Histogram['Instrument Parameters'][0]
Note: See TracChangeset for help on using the changeset viewer.