- Timestamp:
- Jan 13, 2021 9:42:03 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4680 r4764 549 549 xmin=min 550 550 if GSASIIpath.GetConfigValue('debug'): 551 print('C hange min to xminhere:')551 print('Call to ValidatedTxtCtrl using min (change to xmin) here:') 552 552 G2obj.HowDidIgetHere(True) 553 553 if max is not None: 554 554 xmax=max 555 555 if GSASIIpath.GetConfigValue('debug'): 556 print('C hange max to xmaxhere:')556 print('Call to ValidatedTxtCtrl using max (change to xmax) here:') 557 557 G2obj.HowDidIgetHere(True) 558 558 # initialization … … 1472 1472 kargs = {} 1473 1473 if i < len(minvals): 1474 if minvals[i] is not None: kargs[' min']=minvals[i]1474 if minvals[i] is not None: kargs['xmin']=minvals[i] 1475 1475 if i < len(maxvals): 1476 if maxvals[i] is not None: kargs[' max']=maxvals[i]1476 if maxvals[i] is not None: kargs['xmax']=maxvals[i] 1477 1477 if i < len(sizevals): 1478 1478 if sizevals[i]: kargs['size']=sizevals[i] … … 1518 1518 btnsizer = wx.BoxSizer(wx.HORIZONTAL) 1519 1519 btnsizer.Add(self.OKbtn) 1520 self.OKbtn.Bind(wx.EVT_BUTTON,lambda event: self.EndModal(wx.ID_OK)) 1520 1521 btn = wx.Button(self, wx.ID_CLOSE,"Cancel") 1521 1522 btn.Bind(wx.EVT_BUTTON,self._onClose) -
trunk/GSASIIdataGUI.py
r4763 r4764 3273 3273 print('Ignoring Config Starting_directory value: '+ 3274 3274 GSASIIpath.GetConfigValue('Starting_directory')) 3275 3276 3275 3277 3276 def GetTreeItemsList(self,item): … … 4344 4343 self.dirname = os.path.split(filename)[0] 4345 4344 4345 # if self.G2plotNB.plotList: 4346 # self.G2plotNB.clear() 4346 4347 self.init_vars() 4347 4348 try: -
trunk/GSASIIddataGUI.py
r4672 r4764 370 370 muMean = G2spc.MuShklMean(SGData,Amat,UseList[G2frame.hist]['Mustrain'][4][:numb]) 371 371 parms = zip(Snames,UseList[G2frame.hist]['Mustrain'][5],range(numb)) 372 mainSizer = wx.BoxSizer(wx.VERTICAL) 372 373 dataSizer = wx.FlexGridSizer(0,6,5,5) 373 374 for Pa,ref,Id in parms: … … 381 382 Id,nDig=(10,2),OnLeave=OnNewValueReDraw) 382 383 dataSizer.Add(strainVal,0,WACV) 383 dataSizer.Add(wx.StaticText(DData,label=' Mean mustrain %.1f'%muMean),0,WACV) 384 return dataSizer 384 mainSizer.Add(dataSizer) 385 mainSizer.Add(wx.StaticText(DData,label=' Mean mustrain %.1f'%muMean) 386 ,0,wx.ALIGN_CENTER_HORIZONTAL) 387 return mainSizer 385 388 386 389 def HstrainSizer(): … … 954 957 genSizer.Add(ResetSizer('generalized',OnResetStrain),0,WACV) 955 958 bottomSizer.Add(genSizer) 956 bottomSizer.Add(GenStrainDataSizer(),0, WACV|wx.BOTTOM,5)959 bottomSizer.Add(GenStrainDataSizer(),0,wx.BOTTOM,5) 957 960 958 961 bottomSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Hydrostatic/elastic strain:')) -
trunk/GSASIImath.py
r4763 r4764 187 187 ifConverged = False 188 188 deltaChi2 = -10. 189 x0 = np.array(x0, ndmin=1 ) #might be redundant?189 x0 = np.array(x0, ndmin=1, dtype=np.float64) #might be redundant? 190 190 n = len(x0) 191 191 if type(args) != type(()): -
trunk/GSASIIscriptable.py
r4671 r4764 1105 1105 1106 1106 ======================================= 1107 Installation of GSASIIscriptable 1108 ======================================= 1109 1110 It is assumed that most people using GSASIIscriptable will also want to use the GUI, noting that not all GSAS-II capabilities are not available by scripting (yet) and some would not make sense to implement without a graphical view of the data, for this the standard 1111 `installation instructions <https://subversion.xray.aps.anl.gov/trac/pyGSAS#Installationinstructions>`_ should be followed. The GUI includes all files needed to run scriptable. 1112 1113 There may be times where it does make sense to install GSAS-II without all of the GUI components, for example on a compute server. As `described here 1114 <https://gsas-ii.readthedocs.io/en/latest/packages.html#scripting-requirements>'_ the minimal python requirements are only numpy and scipy. It is assumed that 1115 anyone able to use scripting is well posed to install from the command line. 1116 Below are example commands to install GSAS-II for use for scripting only. 1117 1118 .. code-block:: bash 1119 1120 bash ~/Downloads/Miniconda3-latest-MacOSX-x86_64.sh -b -p /loc/pyg2script 1121 source /loc/pyg2script/bin/activate 1122 conda install numpy scipy matplotlib pillow h5py hdf5 svn 1123 svn co https://subversion.xray.aps.anl.gov/pyGSAS/trunk /loc/GSASII 1124 python /loc/GSASII/GSASIIscriptable.py 1125 1126 Some discussion on these commands follows. Note I have chosen to use the free 1127 miniconda installer from Anaconda, Inc., but there are also plenty of 1128 other ways to install Python, Numpy and Scipy on Linux, Windows and MacOS. 1129 For Linux a reasonable alternative is to install these packages 1130 (and perhaps others) as supplied by the Linux dist (``apt-get`` etc.). 1131 1132 * the 1st command (bash) assumes that the appropriate version of Miniconda has been downloaded from https://docs.conda.io/en/latest/miniconda.html and ``/loc/pyg2script`` is where I have selected for python to be installed. You might want to use ``~/pyg2script``. 1133 * the 2nd command (source) is needed to access Python with miniconda. 1134 * the 3rd command (conda) installs all possible packages that might be used by scripting, but matplotlib, pillow, and hdf5 are not commonly needed and could be omitted. The svn package is not needed (for example on Linux) where this has been installed in another way. 1135 * the 4th command (svn) is used to download the GSAS-II software. ``/loc/GSASII`` is the location where I decided to install the software. 1136 * the 5th command (python) is used to invoke GSAS-II scriptable for the first time, which is needed to load the binary files from the server. 1137 1138 ======================================= 1107 1139 GSASIIscriptable Command-line Interface 1108 1140 ======================================= … … 1111 1143 alternate way to access some of the same functionality is to 1112 1144 invoke the ``GSASIIscriptable.py`` script from 1113 the command line usually from within a shell script or batch file. This 1114 will usually be done with a command such as:: 1145 the command line usually from within a shell script or batch file. 1146 This mode of accessing GSAS-II scripting does not appear to get much use and 1147 is no longer being developed. Please do communicate to the developers if 1148 keeping this mode of access would be of value in your work. 1149 1150 To use the command-line mode is done with a command like this:: 1115 1151 1116 1152 python <path/>GSASIIscriptable.py <subcommand> <file.gpx> <options> … … 4148 4184 peaks['peaks'].append(G2mth.setPeakparms(Parms,Parms2,pos,area)) 4149 4185 4150 def set_peakFlags(self,peaklist=None,area=None,pos=None,sig=None,gam=None): 4186 def set_peakFlags(self,peaklist=None,area=None,pos=None,sig=None,gam=None, 4187 alp=None,bet=None): 4151 4188 '''Set refinement flags for peaks 4152 4189 … … 4157 4194 :param bool pos: Sets or clears the refinement flag for the peak position value. 4158 4195 If None (the default), no change is made. 4159 :param bool sig: Sets or clears the refinement flag for the peak sig (Gaussian width) value.4196 :param bool sig: Sets or clears the refinement flag for the peak sigma (Gaussian width) value. 4160 4197 If None (the default), no change is made. 4161 :param bool gam: Sets or clears the refinement flag for the peak sig (Lorentzian width) value. 4198 :param bool gam: Sets or clears the refinement flag for the peak gamma (Lorentzian width) value. 4199 If None (the default), no change is made. 4200 :param bool alp: Sets or clears the refinement flag for the peak alpha (TOF width) value. 4201 If None (the default), no change is made. 4202 :param bool bet: Sets or clears the refinement flag for the peak beta (TOF width) value. 4162 4203 If None (the default), no change is made. 4163 4204 … … 4176 4217 peaklist = range(len(peaks['peaks'])) 4177 4218 for i in peaklist: 4178 for var,j in [(area,3),(pos,1),(sig,5),(gam,7)]: 4179 if var is not None: 4180 peaks['peaks'][i][j] = var 4181 4219 if 'C' in self.data['Instrument Parameters'][0]['Type'][0]: 4220 for var,j in [(area,3),(pos,1),(sig,5),(gam,7)]: 4221 if var is not None: 4222 peaks['peaks'][i][j] = var 4223 else: 4224 for var,j in [(area,3),(pos,1),(alp,5),(bet,7),(sig,9),(gam,11)]: 4225 if var is not None: 4226 peaks['peaks'][i][j] = var 4227 4182 4228 def refine_peaks(self): 4183 4229 '''Causes a refinement of peak position, background and instrument parameters … … 6683 6729 # Parse and trigger subcommand 6684 6730 result = parser.parse_args() 6685 result.func(result) 6731 try: 6732 result.func(result) 6733 except: 6734 print('Use {} -h or --help'.format(sys.argv[0])) 6686 6735 6687 6736 def dictDive(d,search="",keylist=[],firstcall=True,l=None):
Note: See TracChangeset
for help on using the changeset viewer.