Changeset 4290


Ignore:
Timestamp:
Feb 6, 2020 4:55:50 AM (4 years ago)
Author:
vondreele
Message:

fix Bilbao-GSAS-II connection; use get instead of post in SUBGROUPS.py
fix bug in plotting: a tuple should be list
modify the Compare dialog - still not done yet.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4289 r4290  
    289289        wx.Dialog.__init__(self,parent,wx.ID_ANY,'Setup polyhedron comparison',
    290290            pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
     291        self.parent = parent
    291292        self.panel = wxscroll.ScrolledPanel(self)         #just a dummy - gets destroyed in Draw!
    292293        self.OPhase = copy.deepcopy(phase)   #will be a new phase!
     
    314315        def OnTatmOsel(event):
    315316            self.Tatoms[0] = tatmosel.GetStringSelection()
    316             print(G2mth.FindAllNeighbors(self.OPhase,self.Oatoms[0],self.Tatoms[0])[0])
     317            generalData = self.OPhase['General']
     318            DisAglCtls = generalData['DisAglCtls']
     319            dlg = G2G.DisAglDialog(self.parent,DisAglCtls,generalData)
     320            if dlg.ShowModal() == wx.ID_OK:
     321                generalData['DisAglCtls'] = dlg.GetData()
     322            dlg.Destroy()
     323            print(G2mth.FindNeighbors(self.OPhase,self.Oatoms[0],self.Tatoms[0])[0])
    317324
    318325        self.panel.Destroy()
  • trunk/GSASIIplot.py

    r4287 r4290  
    28642864                   
    28652865    for KeyItem in extraKeys:
    2866         Page.Choice = Page.Choice + (KeyItem[0] + ': '+KeyItem[2],)
     2866        Page.Choice = Page.Choice + [KeyItem[0] + ': '+KeyItem[2],]
    28672867    magLineList = [] # null value indicates no magnification
    28682868    Page.toolbar.updateActions = None # no update actions
  • trunk/SUBGROUPS.py

    r4289 r4290  
    2222import GSASIIpath
    2323GSASIIpath.SetBinaryPath()
    24 submagSite = 'http://www.cryst.ehu.es/cgi-bin/cryst/programs/subgrmag1_general_GSAS.pl'
     24submagSite = 'http://www.cryst.ehu.es/cgi-bin/cryst/programs/subgrmag1_general_GSAS.pl?'
    2525
    2626def GetNonStdSubgroups(SGData, kvec,star=False,landau=False,maximal=False):
     
    8484            postdict['knm%d%s'%(j,i)] = k
    8585    try:
    86         r = requests.post(submagSite,postdict)
     86        r = requests.get(submagSite,params=postdict)
    8787    except:     #ConnectionError?
    8888        page = ''
     
    212212            postdict['km%d%s'%(j,i)] = k
    213213    try:
    214         r = requests.post(submagSite,postdict)
     214        r = requests.get(submagSite,params=postdict)
    215215    except:     #ConnectionError?
    216216        page = ''
     
    284284        str(int(spgNum)),cellstr,str(int(tol)))
    285285    try:
    286         r = requests.post(psSite,data=datastr)
     286        r = requests.get(psSite,params=datastr)
    287287    except:     #ConnectionError?
    288288        page = ''
  • trunk/kSUBGROUPSMAG.py

    r4289 r4290  
    2424import GSASIIpath
    2525GSASIIpath.SetBinaryPath()
    26 submagSite = 'http://www.cryst.ehu.es/cgi-bin/cryst/programs/subgrmag1_general.pl'
     26submagSite = 'http://www.cryst.ehu.es/cgi-bin/cryst/programs/subgrmag1_k.pl'
    2727
    2828class TableParser(HTML.HTMLParser):
     
    141141            postdict['km%d%s'%(j,i)] = k
    142142    try:
    143         print(postdict)
    144         r = requests.post(submagSite,postdict)
    145         print(r)
     143        r = requests.get(submagSite,params=postdict)
    146144    except:     #ConnectionError?
    147145        page = ''
     
    216214            postdict['knm%d%s'%(j,i)] = k
    217215    try:
    218         print(postdict)
    219         r = requests.post(submagSite,postdict)
    220         print(r)
     216        r = requests.get(submagSite,params=postdict)
    221217    except:     #ConnectionError?
    222218        page = ''
     
    243239    results,baseList = GetNonStdSubgroupsmag(SGData,('1/3','1/3','1/2',' ',' ',' ',' ',' ',' ',' '))
    244240    if results:
    245         for [spgp,mv,bns,gid,altList,supList] in results:
     241        print(results)
     242        for [spgp,mv,bns,gid,altList,supList] in results.text:
    246243            if gid in baseList:
    247244                print('Space group:',spgp, 'BNS:',bns)
     
    250247    results,baseList = GetNonStdSubgroupsmag(SGData,('1/3','1/3','1/2',' ',' ',' ',' ',' ',' ',' '))
    251248    if results:
    252         for [spgp,mv,gid,altList,supList] in results:
     249        for [spgp,mv,gid,altList,supList] in results.text:
    253250            if gid in baseList:
    254251                print('Space group:',spgp)
Note: See TracChangeset for help on using the changeset viewer.