Skip to content

Commit 750f828

Browse files
committed
Merge remote-tracking branch 'origin/main' into resolutionLookup
to bring upto v5815
2 parents c35b7f8 + d457fcf commit 750f828

File tree

7 files changed

+72
-55
lines changed

7 files changed

+72
-55
lines changed

GSASII/GSASIIpath.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,10 +2031,11 @@ def openInNewTerm(project=None,g2script=None,pythonapp=sys.executable):
20312031

20322032
if __name__ == '__main__':
20332033
'''What follows is called to update (or downdate) GSAS-II in a
2034-
separate process.
2034+
separate process. This is also called for background tasks such as
2035+
performing a "git fetch" task or getting current tag information from
2036+
github.
20352037
'''
20362038
# check what type of update is being called for
2037-
import git
20382039
gitUpdate = False
20392040
preupdateType = None
20402041
updateType = None
@@ -2096,6 +2097,11 @@ def openInNewTerm(project=None,g2script=None,pythonapp=sys.executable):
20962097
print('invalid form for --git-regress')
20972098
help = True
20982099
break
2100+
try:
2101+
import git
2102+
except:
2103+
print('Import of git failed for --git-regress')
2104+
sys.exit()
20992105
gitversion = argsplit[1]
21002106
# make sure the version or tag supplied is valid and convert to
21012107
# a full sha hash
@@ -2242,23 +2248,23 @@ def openInNewTerm(project=None,g2script=None,pythonapp=sys.executable):
22422248
fp.close()
22432249
sys.exit()
22442250

2251+
try:
2252+
import git
2253+
except:
2254+
print(f'Import of git failed. {updateType} update mode {preupdateType}')
2255+
sys.exit()
2256+
22452257
if gitUpdate:
22462258
import time
22472259
time.sleep(1) # delay to give the main process a chance to exit
22482260
# so we don't change code for a running process
22492261
# windows does not like that
2250-
try:
2251-
import git
2252-
except:
2253-
print('git import failed')
2254-
sys.exit()
2255-
try:
2256-
g2repo = openGitRepo(path2GSAS2)
2257-
except Exception as msg:
2258-
print(f'Update failed with message {msg}\n')
2259-
sys.exit()
2260-
print('git repo opened')
2261-
2262+
try:
2263+
g2repo = openGitRepo(path2GSAS2)
2264+
except Exception as msg:
2265+
print(f'Update failed with message {msg}\n')
2266+
sys.exit()
2267+
print('git repo opened')
22622268
if preupdateType == 'reset':
22632269
# --git-reset (preupdateType = 'reset')
22642270
print('Restoring locally-updated GSAS-II files to original status')

GSASII/GSASIIphsGUI.py

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6031,7 +6031,7 @@ def UpdateRMC(event=None):
60316031
global runFile
60326032
def OnRMCselect(event):
60336033
G2frame.RMCchoice = RMCsel.GetStringSelection()
6034-
wx.CallLater(100,UpdateRMC)
6034+
wx.CallLater(200,UpdateRMC)
60356035

60366036
def GetAtmChoice(pnl,RMCPdict):
60376037

@@ -10388,40 +10388,42 @@ def SetChoice(name,c,n=0):
1038810388
elif r < 0: #dclick on col label
1038910389
sel = -1
1039010390
if drawAtoms.GetColLabelValue(c) == 'Style':
10391-
dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom drawing style',styleChoice)
10392-
if dlg.ShowModal() == wx.ID_OK:
10393-
sel = dlg.GetSelection()
10394-
parms = styleChoice[sel]
10395-
for r in range(len(atomData)):
10396-
atomData[r][c] = parms
10397-
drawAtoms.SetCellValue(r,c,parms)
10398-
FindBondsDraw(data)
10399-
# G2plt.PlotStructure(G2frame,data)
10400-
dlg.Destroy()
10391+
DrawAtomStyle(event)
10392+
# dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom drawing style',styleChoice)
10393+
# if dlg.ShowModal() == wx.ID_OK:
10394+
# sel = dlg.GetSelection()
10395+
# parms = styleChoice[sel]
10396+
# for r in range(len(atomData)):
10397+
# atomData[r][c] = parms
10398+
# drawAtoms.SetCellValue(r,c,parms)
10399+
# FindBondsDraw(data)
10400+
# # G2plt.PlotStructure(G2frame,data)
10401+
# dlg.Destroy()
1040110402
elif drawAtoms.GetColLabelValue(c) == 'Label':
10402-
dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom labelling style',labelChoice)
10403-
if dlg.ShowModal() == wx.ID_OK:
10404-
sel = dlg.GetSelection()
10405-
parms = labelChoice[sel]
10406-
for r in range(len(atomData)):
10407-
atomData[r][c] = parms
10408-
drawAtoms.SetCellValue(r,c,parms)
10409-
dlg.Destroy()
10403+
DrawAtomLabel(event)
10404+
# dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom labelling style',labelChoice)
10405+
# if dlg.ShowModal() == wx.ID_OK:
10406+
# sel = dlg.GetSelection()
10407+
# parms = labelChoice[sel]
10408+
# for r in range(len(atomData)):
10409+
# atomData[r][c] = parms
10410+
# drawAtoms.SetCellValue(r,c,parms)
10411+
# dlg.Destroy()
1041010412
elif drawAtoms.GetColLabelValue(c) == 'Color':
10411-
colors = wx.ColourData()
10412-
colors.SetChooseFull(True)
10413-
dlg = wx.ColourDialog(G2frame.GetParent(),colors)
10414-
if dlg.ShowModal() == wx.ID_OK:
10415-
color = dlg.GetColourData().GetColour()[:3]
10416-
attr = wg.GridCellAttr() #needs to be here - gets lost if outside loop!
10417-
attr.SetReadOnly(True)
10418-
attr.SetBackgroundColour(color)
10419-
for r in range(len(atomData)):
10420-
atomData[r][c] = color
10421-
drawingData['Atoms'][r][c] = color
10422-
drawAtoms.SetAttr(r,c,attr)
10423-
UpdateDrawAtoms()
10424-
dlg.Destroy()
10413+
DrawAtomColor(event)
10414+
# colors = wx.ColourData()
10415+
# colors.SetChooseFull(True)
10416+
# dlg = wx.ColourDialog(G2frame.GetParent(),colors)
10417+
# if dlg.ShowModal() == wx.ID_OK:
10418+
# color = dlg.GetColourData().GetColour()[:3]
10419+
# dlg.Destroy()
10420+
# attr = wg.GridCellAttr() #needs to be here - gets lost if outside loop!
10421+
# attr.SetReadOnly(True)
10422+
# attr.SetBackgroundColour(color)
10423+
# for r in range(len(atomData)):
10424+
# atomData[r][c] = color
10425+
# drawingData['Atoms'][r][c] = color
10426+
# drawAtoms.SetAttr(r,c,attr)
1042510427
elif drawAtoms.GetColLabelValue(c) == 'Residue':
1042610428
SetChoice('Residue',c,3)
1042710429
elif drawAtoms.GetColLabelValue(c) == '1-letter':

GSASII/git_verinfo.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
22
# git_verinfo.py - GSAS-II version info from git
3-
# Do not edit, generated by 'GSASII/install/incr-version.py' script
4-
# Created 2025-06-22 13:56:06.036268-05:00
3+
# Do not edit, generated by 'install/incr-version.py' script
4+
# Created 2025-06-25 08:39:57.064953-05:00
55

6-
git_version = '17c29ab4017926c607850a1989e82337049e1534'
7-
git_tags = ['5814']
8-
git_prevtaggedversion = 'c37c8ba4cdc73a97e0a8ccf9d9f3c95758502e5b'
9-
git_prevtags = ['5813']
10-
git_versiontag = 'v5.4.7'
6+
git_version = 'b91e5e3deb601e475ec53be39b25a82ad3491386'
7+
git_tags = ['5815']
8+
git_prevtaggedversion = '17c29ab4017926c607850a1989e82337049e1534'
9+
git_prevtags = ['5814']
10+
git_versiontag = 'v5.4.8'

sources/powsubs/psvfcjexpo.for

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
!INCLUDE STATEMENTS:
2727
REAL*4 SIND,COSD,TAND,ACOSD
28+
! External function declarations
29+
EXTERNAL SIND,COSD,TAND,ACOSD
2830

2931
!LOCAL VARIABLES:
3032

@@ -310,4 +312,4 @@ C
310312
HLPART = DYDB
311313
RETURN
312314
END
313-
315+

sources/powsubs/psvfcjo.for

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
!INCLUDE STATEMENTS:
2727
REAL*4 SIND,COSD,TAND,ACOSD
28+
! External function declarations
29+
EXTERNAL SIND,COSD,TAND,ACOSD
2830

2931
!LOCAL VARIABLES:
3032

@@ -41,6 +43,7 @@
4143
REAL*4 DYDB
4244
REAL*4 SIN2THETA2 ! sin(2theta)**2
4345
REAL*4 COS2THETA ! cos(2theta)
46+
REAL*4 COS2THETA2 ! cos(2theta)**2
4447
REAL*4 SIN2THETA ! sin(2THETA)
4548
REAL*4 SINDELTA ! sin(Delta)
4649
REAL*4 COSDELTA ! cos(Delta)

sources/pypowder.for

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Cf2py depend(NPTS) PRFUNC
141141
INTEGER*4 NPTS
142142
REAL*4 TTHETA,SIG,GAM,SPH
143143
REAL*4 DTT(0:NPTS-1),PRFUNC(0:NPTS-1)
144+
REAL*4 DPRDT,SIGPART,GAMPART,SLPART,HLPART
144145
DO I=0,NPTS-1
145146
CALL PSVFCJO(DTT(I)*100.,TTHETA*100.,SIG,GAM,SPH/2.0,SPH/2.0,
146147
1 PRFUNC(I),DPRDT,SIGPART,GAMPART,SLPART,HLPART)

sources/texturesubs/plmpsi.for

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
REAL*4 P !Value returned
1212

1313
!INCLUDE STATEMENTS:
14+
REAL*4 SIND,COSD
15+
! External function declarations
16+
EXTERNAL SIND,COSD
1417

1518
!LOCAL VARIABLES:
1619

0 commit comments

Comments
 (0)