Changeset 3506
- Timestamp:
- Jul 25, 2018 12:12:20 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r3447 r3506 566 566 return 567 567 568 objectScanIgnore = [int,bool,float,str,np.float64,np.int32,np.int64,np.ndarray,G2obj.G2VarObj,ma.MaskedArray] 568 objectScanIgnore = [int,bool,float,str,np.float64,np.int32,np.int64,np.ndarray,G2obj.G2VarObj] 569 try: 570 objectScanIgnore += [ma.MaskedArray] # fails in doc builds 571 except AttributeError: 572 pass 573 569 574 if '2' in platform.python_version_tuple()[0]: 570 575 objectScanIgnore += [unicode,long,] -
trunk/GSASIIctrlGUI.py
r3487 r3506 434 434 is either 'f' (default) or 'g'. Alternately, None can be specified which 435 435 causes numbers to be displayed with approximately 5 significant figures 436 for floats. If this is specified, then :obj:`typeHint` =float becomes the436 for floats. If this is specified, then :obj:`typeHint` = float becomes the 437 437 default. 438 438 (Default=None). … … 2838 2838 :param int height: an optional height (pixels) for the table (defaults to 400) 2839 2839 2840 Example use:: 2840 Example use:: 2841 2841 2842 lbls = ('col 1','col 2','col 3') 2842 2843 choices=(['test1','explanation of test 1'], -
trunk/GSASIIobj.py
r3469 r3506 1899 1899 def ExtensionValidator(self, filename): 1900 1900 '''This methods checks if the file has the correct extension 1901 Return False if this filename will not be supported by this reader (only 1902 when strictExtension is True) 1903 Return True if the extension matches the list supplied by the reader 1904 Return None if the reader allows un-registered extensions 1901 1902 :returns: 1903 1904 * False if this filename will not be supported by this reader (only 1905 when strictExtension is True) 1906 * True if the extension matches the list supplied by the reader 1907 * None if the reader allows un-registered extensions 1908 1905 1909 ''' 1906 1910 if filename: -
trunk/GSASIIplot.py
r3496 r3506 157 157 except ImportError: 158 158 from matplotlib.backends.backend_agg import FigureCanvas as hcCanvas # standard name 159 except RuntimeError: # happens during doc builds 160 pass 159 161 160 162 # useful degree trig functions … … 256 258 Add a set of subplots to this figure. 257 259 258 Parameters 259 ---------- 260 nrows, ncols : int, default: 1 260 :param nrows, ncols : int, default: 1 261 261 Number of rows/cols of the subplot grid. 262 sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False262 :param sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False 263 263 Controls sharing of properties among x (`sharex`) or y (`sharey`) 264 264 axes: 265 265 266 - True or 'all': x- or y-axis will be shared among all 266 267 subplots. … … 269 270 - 'row': each subplot row will share an x- or y-axis. 270 271 - 'col': each subplot column will share an x- or y-axis. 272 271 273 When subplots have a shared x-axis along a column, only the x tick 272 274 labels of the bottom subplot are visible. Similarly, when 273 275 subplots have a shared y-axis along a row, only the y tick labels 274 276 of the first column subplot are visible. 275 squeeze : bool, default: True277 :param squeeze : bool, default: True 276 278 - If True, extra dimensions are squeezed out from the returned 277 279 axis object: 280 278 281 - if only one subplot is constructed (nrows=ncols=1), the 279 282 resulting single Axes object is returned as a scalar. … … 283 286 - for NxM, subplots with N>1 and M>1 are returned as a 2D 284 287 arrays. 288 285 289 - If False, no squeezing at all is done: the returned Axes object 286 290 is always a 2D array containing Axes instances, even if it ends 287 291 up being 1x1. 288 subplot_kw : dict, default: {} 292 293 :param subplot_kw : dict, default: {} 289 294 Dict with keywords passed to the 290 295 :meth:`~matplotlib.figure.Figure.add_subplot` call used to create 291 296 each subplots. 292 gridspec_kw : dict, default: {}297 :param gridspec_kw : dict, default: {} 293 298 Dict with keywords passed to the 294 299 :class:`~matplotlib.gridspec.GridSpec` constructor used to create 295 300 the grid the subplots are placed on. 296 Returns 297 ------- 298 ax : single Axes object or array of Axes objects 301 302 :return: ax : single Axes object or array of Axes objects 299 303 The added axes. The dimensions of the resulting array can be 300 304 controlled with the squeeze keyword, see above. 301 See Also302 --------303 pyplot.subplots : pyplot API; docstring includes examples.305 306 See Also pyplot.subplots : pyplot API; docstring includes examples. 307 304 308 """ 305 309 -
trunk/GSASIIscriptable.py
r3504 r3506 1201 1201 Represents an entire GSAS-II project. 1202 1202 1203 There are two ways to initialize it: 1203 :param str gpxfile: Existing .gpx file to be loaded. If nonexistent, 1204 creates an empty project. 1205 :param str author: Author's name (not yet implemented) 1206 :param str newgpx: The filename the project should be saved to in 1207 the future. If both newgpx and gpxfile are present, the project is 1208 loaded from the gpxfile, then when saved will be written to newgpx. 1209 :param str filename: Name to be used to save the project. Has same function as 1210 parameter newgpx (do not use both gpxfile and filename). Use of newgpx 1211 is preferred over filename. 1212 1213 There are two ways to initialize this object: 1204 1214 1205 1215 >>> # Load an existing project file … … 1237 1247 """ 1238 1248 def __init__(self, gpxfile=None, author=None, filename=None, newgpx=None): 1239 """Loads a GSAS-II project from a specified filename.1240 1241 :param str gpxfile: Existing .gpx file to be loaded. If nonexistent,1242 creates an empty project.1243 :param str author: Author's name (not yet implemented)1244 :param str newgpx: The filename the project should be saved to in1245 the future. If both newgpx and gpxfile are present, the project is1246 loaded from the gpxfile, then when saved will be written to newgpx.1247 :param str filename: Name to be used to save the project. Has same function as1248 parameter newgpx (do not use both gpxfile and filename). Use of newgpx1249 is preferred over filename.1250 """1251 1249 if filename is not None and newgpx is not None: 1252 1250 raise G2ScriptException('Do not use filename and newgpx together') … … 1592 1590 """ 1593 1591 output = [] 1592 # loop through each tree entry. If it is more than one level (more than one item in the 1593 # list of names) then it must be a histogram, unless labeled Phases or Restraints 1594 1594 for obj in self.names: 1595 if len(obj) > 1 and obj[0] != u'Phases' :1595 if len(obj) > 1 and obj[0] != u'Phases' and obj[0] != u'Restraints': 1596 1596 output.append(self.histogram(obj[0])) 1597 1597 return output … … 2346 2346 def set_peakFlags(self,peaklist=None,area=None,pos=None,sig=None,gam=None): 2347 2347 '''Set refinement flags for peaks 2348 2348 2349 :param list peaklist: a list of peaks to change flags. If None (default), changes 2349 2350 are made to all peaks. … … 3311 3312 3312 3313 if __name__ == '__main__': 3314 #fname='/tmp/corundum-template.gpx' 3315 #prj = G2Project(fname) 3313 3316 main() -
trunk/help/Tutorials.html
r3417 r3506 15 15 [No exercise files]. 16 16 <blockquote><I>An introduction to GSAS-II with starting instructions and a brief description of the displays.</I></blockquote> 17 <LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/BkgFit/FitBkgTut.htm">Fitting the Starting Background using Fixed Points</A>18 [link: <A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/BkgFit/data">Exercise files</A>].19 <blockquote><I>This shows how to get an initial estimate of background parameters from a suite of fixed points20 before beginning Rietveld refinement.</I></blockquote>21 17 </UL><h4>Rietveld refinement</H4><UL> 22 18 <LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/CWNeutron/Neutron CW Powder Data.htm">CW Neutron Powder fit for Yttrium-Iron Garnet</A> … … 33 29 [link: <A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/TOF-CW Joint Refinement/data">Exercise files</A>]. 34 30 <blockquote><I>This shows Rietveld refinement with high resolution synchrotron powder data and neutron TOF data</I></blockquote> 31 <LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/SimpleMagnetic/Simple Magnetic.htm">Simple Magnetic Structure Analysis</A> 32 [link: <A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/SimpleMagnetic/data">Exercise files</A>]. 33 <blockquote><I>Analysis of a simple antiferromagnet and a simple ferromagnet from CW neutron powder data</I></blockquote> 35 34 <LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/Simulation/SimTutorial.htm">Simulating Powder Diffraction with GSAS-II</A> 36 35 [link: <A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/Simulation/data">Exercise files</A>]. 37 36 <blockquote><I>This show how to create a simulated powder pattern from a lab diffractometer.</I></blockquote> 37 <LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/BkgFit/FitBkgTut.htm">Fitting the Starting Background using Fixed Points</A> 38 [link: <A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/BkgFit/data">Exercise files</A>]. 39 <blockquote><I>This shows how to get an initial estimate of background parameters from a suite of fixed points 40 before beginning Rietveld refinement.</I></blockquote> 38 41 </UL><h4>Parametric sequential fitting</H4><UL> 39 42 <LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/SeqRefine/SequentialTutorial.htm">Sequential refinement of multiple datasets</A> … … 45 48 <blockquote><I>This explores the results of the sequential refinement obtained in the previous tutorial; includes 46 49 plotting of variables and fitting the changes with simple equations.</I></blockquote> 50 </UL> 51 <UL><LI><A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/TOF Sequential Single Peak Fit/TOF Sequential Single Peak Fit.htm">Sequential fitting of single peaks and strain analysis of reult</A> <A href="#prereq">*</A> 52 [link: <A href="https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/TOF Sequential Single Peak Fit/data">Exercise files</A>]. 53 <blockquote><I>This shows the fitting of single peaks in a sequence of TOF powder patterns from a sample under load; includes 54 fitting of the result to get Hookes Law coefficients for elastic deformations.</I></blockquote> 47 55 </UL> 48 56 </UL><h4>Structure solution</H4><UL>
Note: See TracChangeset
for help on using the changeset viewer.