Changeset 1006 for trunk/GSASIIIO.py


Ignore:
Timestamp:
Jul 22, 2013 8:57:37 PM (10 years ago)
Author:
toby
Message:

fix Bob's bug when multiple HKL files are read; pickup shelx spacegroup in CIF; improve file read error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r981 r1006  
    16821682    '''Defines a base class for the reading of files with tables
    16831683    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.
    16841693    '''
    16851694    def __init__(self,formatName,longFormatName=None,extensionlist=[],
     
    16891698
    16901699        # 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'
    16911706        self.Controls = { # dictionary with plotting controls
    16921707            'Type' : 'Fosq',
     
    17001715            'log-lin' : 'lin',
    17011716            }
    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                            }, {}]
    17081725
    17091726    def UpdateParameters(self,Type=None,Wave=None):
    1710         HistType = self.Parameters[0][0]
    1711         HistWave = self.Parameters[0][1]
     1727        'Revise the '
    17121728        if Type is not None:
    1713             HistType = Type
     1729            self.Parameters[0]['Type'] = [Type,Type]
    17141730        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]
    17171732           
    17181733    def UpdateControls(self,Type='Fosq',FcalcPresent=False):
Note: See TracChangeset for help on using the changeset viewer.