Changeset 1006 for trunk/GSASIIIO.py
- Timestamp:
- Jul 22, 2013 8:57:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r981 r1006 1682 1682 '''Defines a base class for the reading of files with tables 1683 1683 of structure factors 1684 1685 Note that the default controls are stored in self.Controls and the 1686 default instrument parameters are stored in self.Parameters. 1687 These can be changed, but any changes will be the defaults for all 1688 subsequent uses of the :class:`ImportStructFactor` derived classes 1689 until :meth:`InitControls` and :meth:`InitParameters` are 1690 called. Probably better to use :meth:`UpdateControls` and 1691 :meth:`UpdateControls` (adding new args if needed) to change 1692 values. 1684 1693 ''' 1685 1694 def __init__(self,formatName,longFormatName=None,extensionlist=[], … … 1689 1698 1690 1699 # define contents of Structure Factor entry 1700 self.InitParameters() 1701 self.InitControls() 1702 self.RefList = [] 1703 1704 def InitControls(self): 1705 'initialize the controls structure' 1691 1706 self.Controls = { # dictionary with plotting controls 1692 1707 'Type' : 'Fosq', … … 1700 1715 'log-lin' : 'lin', 1701 1716 } 1702 self.Parameters = [ # list with data collection parameters 1703 ('SXC',0.70926), 1704 ['SXC',0.70926], 1705 ['Type','Lam'] 1706 ] 1707 self.RefList = [] 1717 1718 def InitParameters(self): 1719 'initialize the instrument parameters structure' 1720 Lambda = 0.70926 1721 HistType = 'SXC' 1722 self.Parameters = [{'Type':[HistType,HistType], # create the structure 1723 'Lam':[Lambda,Lambda] 1724 }, {}] 1708 1725 1709 1726 def UpdateParameters(self,Type=None,Wave=None): 1710 HistType = self.Parameters[0][0] 1711 HistWave = self.Parameters[0][1] 1727 'Revise the ' 1712 1728 if Type is not None: 1713 HistType = Type1729 self.Parameters[0]['Type'] = [Type,Type] 1714 1730 if Wave is not None: 1715 HistWave = Wave 1716 self.Parameters = [{'Type':[HistType,HistType],'Lam':[HistWave,HistWave]},{}] # overwrite entire list 1731 self.Parameters[0]['Lam'] = [HistWave,HistWave] 1717 1732 1718 1733 def UpdateControls(self,Type='Fosq',FcalcPresent=False):
Note: See TracChangeset
for help on using the changeset viewer.