Ignore:
Timestamp:
Jul 25, 2018 12:12:20 AM (5 years ago)
Author:
svnjenkins
Message:

fix scriptable problem due to change in Restraints; update Tutorials; misc. fixes for Sphinx docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIscriptable.py

    r3504 r3506  
    12011201    Represents an entire GSAS-II project.
    12021202
    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:
    12041214
    12051215    >>> # Load an existing project file
     
    12371247    """
    12381248    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 in
    1245             the future. If both newgpx and gpxfile are present, the project is
    1246             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 as
    1248             parameter newgpx (do not use both gpxfile and filename). Use of newgpx
    1249             is preferred over filename.
    1250         """
    12511249        if filename is not None and newgpx is not None:
    12521250            raise G2ScriptException('Do not use filename and newgpx together')
     
    15921590            """
    15931591        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
    15941594        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':
    15961596                output.append(self.histogram(obj[0]))
    15971597        return output
     
    23462346    def set_peakFlags(self,peaklist=None,area=None,pos=None,sig=None,gam=None):
    23472347        '''Set refinement flags for peaks
     2348       
    23482349        :param list peaklist: a list of peaks to change flags. If None (default), changes
    23492350          are made to all peaks.
     
    33113312
    33123313if __name__ == '__main__':
     3314    #fname='/tmp/corundum-template.gpx'
     3315    #prj = G2Project(fname)
    33133316    main()
Note: See TracChangeset for help on using the changeset viewer.