Changeset 3506 for trunk/GSASIIscriptable.py
- Timestamp:
- Jul 25, 2018 12:12:20 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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()
Note: See TracChangeset
for help on using the changeset viewer.