Changeset 3395


Ignore:
Timestamp:
May 19, 2018 7:17:58 AM (3 years ago)
Author:
vondreele
Message:

implement import of lattice parameters & space group info into Unit Cells list from file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r3394 r3395  
    30243024
    30253025    def LoadUnitCell(event):
    3026         print('Load unit cell from phase - TBD')    #TODO:
    30273026        controls,bravais,cells,dminx,ssopt = G2frame.GPXtree.GetItemPyData(UnitCellsId)
    30283027        pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root, 'Phases')
     
    30473046       
    30483047    def ImportUnitCell(event):
    3049         print('Import unit cell from file - TBD')   #TODO:
    30503048        controls,bravais,cells,dminx,ssopt = G2frame.GPXtree.GetItemPyData(UnitCellsId)
     3049        reqrdr = G2frame.dataWindow.ReImportMenuId.get(event.GetId())
     3050        rdlist = G2frame.OnImportGeneric(reqrdr,
     3051            G2frame.ImportPhaseReaderlist,'phase')
     3052        if len(rdlist) == 0: return
     3053        rd = rdlist[0]
     3054        Cell = rd.Phase['General']['Cell']
     3055        SGData = rd.Phase['General']['SGData']
     3056        controls[4] = 1
     3057        controls[5] = SGData['SGLatt']+SGData['SGLaue']
     3058        controls[6:12] = Cell[1:8]
     3059        controls[13] = spaceGroups[bravaisSymb.index(controls[5])]
    30513060        G2frame.GPXtree.SetItemPyData(UnitCellsId,[controls,bravais,cells,dmin,ssopt])
    30523061        G2frame.dataWindow.RefineCell.Enable(True)
Note: See TracChangeset for help on using the changeset viewer.