Changeset 3570


Ignore:
Timestamp:
Aug 24, 2018 11:01:07 AM (3 years ago)
Author:
vondreele
Message:

implement auto save after Bilbao result obtained
and auto saveas when magnetic phase is chosen
rename atoms with added new number

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3567 r3570  
    27052705        self.ExpandingAll = False
    27062706        self.SeqTblHideList = None
     2707        self.newGPXfile = ''
    27072708        self.lastSelectedPhaseTab = None # track the last tab pressed on a phase window
    27082709       
     
    37533754        else:
    37543755            pth = '.'
    3755         dlg = wx.FileDialog(self, 'Choose GSAS-II project file name', pth, '',
     3756        dlg = wx.FileDialog(self, 'Choose GSAS-II project file name', pth, self.newGPXfile,
    37563757            'GSAS-II project file (*.gpx)|*.gpx',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
    37573758        try:
  • trunk/GSASIIphsGUI.py

    r3568 r3570  
    24502450            return
    24512451        dlg = wx.SingleChoiceDialog(G2frame,'Select magnetic space group','Make new magnetic phase',magchoices)
    2452         if dlg.ShowModal() == wx.ID_OK:
     2452        opt = dlg.ShowModal()
     2453        if opt == wx.ID_OK:
    24532454            vvec = np.zeros(3)  #spg2origins
    2454             magchoice = magKeep[dlg.GetSelection()]
    2455             phaseName = magchoice['Name']+ ' mag'
     2455            sel = dlg.GetSelection()
     2456            magchoice = magKeep[sel]
     2457            phaseName = '%s mag (%d)'%(data['General']['Name'],sel)
    24562458            newPhase = copy.deepcopy(data)
    24572459            del newPhase['magPhases']
     
    24612463            SGData = generalData['SGData']
    24622464            newPhase,atCodes = G2lat.TransformPhase(data,newPhase,magchoice['Trans'],magchoice['Uvec'],vvec,True)
    2463            
    2464 
    2465 #            for item in SGData: print(item,SGData[item])
    2466 
    24672465            Atoms = newPhase['Atoms']
    24682466            atMxyz = []
    2469             for atom in Atoms:
     2467            for ia,atom in enumerate(Atoms):
     2468                atom[0] += '_%d'%ia
    24702469                SytSym,Mul,Nop,dupDir = G2spc.SytSym(atom[3:6],SGData)
    24712470                CSI = G2spc.GetCSpqinel(SGData['SpnFlp'],dupDir)
     
    24972496        newPhase['Drawing'] = []
    24982497        G2cnstG.TransConstraints(G2frame,data,newPhase,magchoice['Trans'],vvec,atCodes)     #data is old phase
     2498        G2frame.newGPXfile = phaseName+'.gpx'
     2499        G2frame.OnFileSaveas(event)
    24992500        G2frame.GPXtree.SelectItem(sub)
    25002501       
  • trunk/GSASIIpwdGUI.py

    r3568 r3570  
    34603460        data = [controls,bravais,cells,dmin,ssopt,magcells]
    34613461        G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List'),data)
     3462        G2frame.OnFileSaveas(event)
    34623463        wx.CallAfter(UpdateUnitCellsGrid,G2frame,data)
    34633464       
Note: See TracChangeset for help on using the changeset viewer.