Changeset 1503


Ignore:
Timestamp:
Sep 20, 2014 10:55:54 AM (9 years ago)
Author:
vondreele
Message:

begin incommensurate structure stuff -new importers for SHELX HKLF5 and JANA m90 files with superlattice reflection indices. New phase importer for JANA m40 & m50 files. Single crystal reflection lists now have extra columns for superlattitice indices.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1500 r1503  
    16241624        'self.Parameters is a list with two dicts for data parameter settings'
    16251625        self.InitParameters()
    1626         self.RefDict = {'RefList':[],'FF':[]}
     1626        self.RefDict = {'RefList':[],'FF':[],'Super':0}
    16271627        self.Banks = []             #for multi bank data (usually TOF)
    16281628        '''self.RefDict is a dict containing the reflection information, as read from the file.
     
    16381638        self.InitParameters()
    16391639        self.Banks = []             #for multi bank data (usually TOF)
    1640         self.RefDict = {'RefList':[],'FF':[]}
     1640        self.RefDict = {'RefList':[],'FF':[],'Super':0}
    16411641       
    16421642    def InitParameters(self):
     
    16541654            self.Parameters[0]['Type'] = [Type,Type]
    16551655        if Wave is not None:
    1656             self.Parameters[0]['Lam'] = [Wave,Wave]
     1656            self.Parameters[0]['Lam'] = [Wave,Wave]           
    16571657                       
    16581658######################################################################
  • trunk/GSASIIgrid.py

    r1502 r1503  
    50625062    elif kind == 'HKLF':
    50635063        refList = data[1]['RefList']
    5064         FoMax = np.max(refList.T[5])
     5064        FoMax = np.max(refList.T[5+data[1].get('Super',0)])
    50655065        controls = {'Type' : 'Fosq','ifFc' : True,     
    50665066            'HKLmax' : [int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))],
  • trunk/GSASIIphsGUI.py

    r1493 r1503  
    128128            if generalData['Type'] =='macromolecular':
    129129                generalData['AtomPtrs'] = [6,4,10,12]
     130        if generalData['Type'] in ['modulated','magnetic',] and 'modDim' not in generalData:
     131            generalData['modDim'] = '4'
     132            generalData['modVects'] = [{'mod':[0.01,False],'vect':[0,0,1],'maxInd':4},
     133                {'mod':[0.01,False],'vect':[0,0,1],'maxInd':4},{'mod':[0.01,False],'vect':[0,0,1],'maxInd':4}]
    130134# end of patches
    131135        cx,ct,cs,cia = generalData['AtomPtrs']
     
    504508            pawleySizer.Add(pawlNegWt,0,WACV)
    505509            return pawleySizer
     510           
     511        def ModulatedSizer(name):
     512           
     513            def OnDim(event):
     514                generalData['modDim'] = dim.GetValue()
     515                wx.CallAfter(UpdateGeneral)
     516               
     517            def OnVec(event):
     518                Obj = event.GetEventObject()
     519                ind = Indx[Obj.GetId()]
     520                axis = Obj.GetValue().split()
     521                try:
     522                    hkl = [float(axis[i]) for i in range(3)]
     523                except (ValueError,IndexError):
     524                    hkl = generalData['modVects'][ind]['vect']
     525                if not np.any(np.array(hkl)):
     526                    hkl = generalData['modVects'][ind]['vect']
     527                generalData['modVects'][ind]['vect'] = hkl
     528                h,k,l = hkl
     529                Obj.SetValue('%.3f %.3f %.3f'%(h,k,l))
     530               
     531            def OnVal(event):
     532                Obj = event.GetEventObject()
     533                ind = Indx[Obj.GetId()]
     534                try:
     535                    val = float(Obj.GetValue())
     536                    generalData['modVects'][ind]['mod'][0] = val
     537                except ValueError:
     538                    pass
     539                Obj.SetValue('%.4f'%(generalData['modVects'][ind]['mod'][0]))
     540
     541            def OnValRef(event):
     542                Obj = event.GetEventObject()
     543                ind = Indx[Obj.GetId()]
     544                generalData['modVects'][ind]['mod'][1] = Obj.GetValue()
     545               
     546            def OnMax(event):
     547                Obj = event.GetEventObject()
     548                ind = Indx[Obj.GetId()]
     549                generalData['modVects'][ind]['maxInd'] = int(Obj.GetValue())
     550           
     551            Indx = {}
     552            modSizer = wx.BoxSizer(wx.VERTICAL)
     553            dimSizer = wx.BoxSizer(wx.HORIZONTAL)
     554            dimSizer.Add(wx.StaticText(General,label=' '+name.capitalize()+' structure controls: '),0,WACV)
     555            dimSizer.Add(wx.StaticText(General,label=' Modulated structure dimension: '),0,WACV)
     556            dimChoice = ['4','5','6']
     557            dim = wx.ComboBox(General,-1,value=generalData['modDim'],choices=dimChoice,
     558                style=wx.CB_READONLY|wx.CB_DROPDOWN)
     559            dim.Bind(wx.EVT_COMBOBOX,OnDim)
     560            dimSizer.Add(dim,0,WACV)
     561            modSizer.Add(dimSizer)
     562            vecSizer = wx.FlexGridSizer(1,7,5,5)
     563            indChoice = ['0','1','2','3','4','5','6','7']
     564            for i in range(int(generalData['modDim'])-3):
     565                vecSizer.Add(wx.StaticText(General,label=' Modulation vector #%d: '%(i+1)),0,WACV)
     566                vec = generalData['modVects'][i]
     567                Vec = wx.TextCtrl(General,
     568                    value=' %.3f %.3f %.3f '%(vec['vect'][0],vec['vect'][1],vec['vect'][2]),
     569                    style=wx.TE_PROCESS_ENTER)
     570                Vec.Bind(wx.EVT_TEXT_ENTER,OnVec)       
     571                Vec.Bind(wx.EVT_KILL_FOCUS,OnVec)
     572                vecSizer.Add(Vec,0,WACV)
     573                Indx[Vec.GetId()] = i
     574                vecSizer.Add(wx.StaticText(General,label=' value: '),0,WACV)
     575                Val = wx.TextCtrl(General,value='%.4f'%(vec['mod'][0]),style=wx.TE_PROCESS_ENTER)
     576                Val.Bind(wx.EVT_TEXT_ENTER,OnVal)       
     577                Val.Bind(wx.EVT_KILL_FOCUS,OnVal)
     578                vecSizer.Add(Val,0,WACV)
     579                Indx[Val.GetId()] = i
     580                Ref = wx.CheckBox(General,label='Refine?')
     581                Ref.SetValue(vec['mod'][1])
     582                Indx[Ref.GetId()] = i
     583                Ref.Bind(wx.EVT_CHECKBOX, OnValRef)
     584                vecSizer.Add(Ref,0,WACV)
     585                vecSizer.Add(wx.StaticText(General,label=' max index: '),0,WACV)
     586                Max = wx.ComboBox(General,-1,value='%d'%(vec['maxInd']),choices=indChoice,
     587                    style=wx.CB_READONLY|wx.CB_DROPDOWN)
     588                Max.Bind(wx.EVT_TEXT_ENTER,OnMax)       
     589                Max.Bind(wx.EVT_KILL_FOCUS,OnMax)
     590                vecSizer.Add(Max,0,WACV)
     591                Indx[Max.GetId()] = i
     592            modSizer.Add(vecSizer)
     593            return modSizer
    506594           
    507595        def MapSizer():
     
    826914            mainSizer.Add(ElemSizer())
    827915        G2gd.HorizontalLine(mainSizer,General)
     916       
     917        if generalData['Type'] in ['modulated','magnetic',]:
     918            mainSizer.Add(wx.StaticText(General,label='NB: This does nothing yet'),0,WACV)
     919            mainSizer.Add(ModulatedSizer(generalData['Type']))
     920            G2gd.HorizontalLine(mainSizer,General)
    828921
    829922        mainSizer.Add(PawleySizer())
     
    832925        mainSizer.Add(MapSizer())
    833926        G2gd.HorizontalLine(mainSizer,General)
    834 
     927       
    835928        mainSizer.Add(FlipSizer())
    836         G2gd.HorizontalLine(mainSizer,General)
    837 
    838         mainSizer.Add(MCSASizer())
     929        if generalData['Type'] in ['nuclear','macromolecular']:
     930            G2gd.HorizontalLine(mainSizer,General)
     931            mainSizer.Add(MCSASizer())
    839932        SetPhaseWindow(G2frame.dataFrame,General,mainSizer)
    840933        G2frame.dataFrame.SetStatusText('')
  • trunk/GSASIIpwdGUI.py

    r1498 r1503  
    26332633        G2gd.SetDataMenuBar(G2frame)
    26342634        refs = data[1]['RefList']
    2635     else:       
     2635        Super = data[1].get('Super',0)
     2636    else:
     2637        Super = 0   #for now       
    26362638        G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.ReflMenu)
    26372639        if not G2frame.dataFrame.GetStatusBar():
     
    26582660           
    26592661    for i in range(len(refs)): rowLabels.append(str(i))
    2660     Types = 4*[wg.GRID_VALUE_LONG,]+4*[wg.GRID_VALUE_FLOAT+':10,4',]+ \
     2662    Types = (4+Super)*[wg.GRID_VALUE_LONG,]+4*[wg.GRID_VALUE_FLOAT+':10,4',]+ \
    26612663        2*[wg.GRID_VALUE_FLOAT+':10,2',]+[wg.GRID_VALUE_FLOAT+':10,3',]+ \
    26622664        [wg.GRID_VALUE_FLOAT+':10,3',]
     2665    superLabels = ['M1','M2','M3']
    26632666    if HKLF:
    26642667        colLabels = ['H','K','L','mul','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC',]
    26652668        if 'T' in Inst['Type'][0]:
    26662669            colLabels = ['H','K','L','mul','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC','wave','tbar']
    2667             Types += 2*[wg.GRID_VALUE_FLOAT+':10,3',]           
     2670            Types += 2*[wg.GRID_VALUE_FLOAT+':10,3',]
     2671        if Super:
     2672            for i in range(Super):
     2673                colLabels.insert(3+i,superLabels[i])
    26682674    else:
    26692675        if 'C' in Inst['Type'][0]:
  • trunk/imports/G2phase.py

    r1168 r1503  
    99#
    1010'''
    11 *Module G2phase: PDB and .EXP*
     11*Module G2phase: PDB, .EXP & JANA m40,m50*
    1212------------------------------------
    1313
    1414A set of short routines to read in phases using routines that were
    15 previously implemented in GSAS-II: PDB and GSAS .EXP file formats
     15previously implemented in GSAS-II: PDB, GSAS .EXP and JANA m40-m50 file formats
    1616
    1717'''
    1818
    1919import sys
     20import os.path
    2021import math
    2122import random as ran
     
    337338        Phase['Atoms'] = Atoms
    338339        return Phase
     340
     341class JANA_ReaderClass(G2IO.ImportPhase):
     342    'Routine to import Phase information from a JANA2006 file'
     343    def __init__(self):
     344        super(self.__class__,self).__init__( # fancy way to say ImportPhase.__init__
     345            extensionlist=('.m50','.M50'),
     346            strictExtension=True,
     347            formatName = 'JANA m50',
     348            longFormatName = 'JANA2006 phase import'
     349            )
     350    def ContentsValidator(self, filepointer):
     351        '''Taking a stab a validating a .m50 file
     352        (look for cell & at least one atom)
     353        '''
     354        for i,l in enumerate(filepointer):
     355            if l.startswith('cell'):
     356                break
     357        else:
     358            self.errors = 'no cell record found'
     359            return False
     360        for i,l in enumerate(filepointer):
     361            if l.startswith('spgroup'):
     362                return True
     363        self.errors = 'no spgroup record found after cell record'
     364        return False
     365    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
     366        'Read a m50 file using :meth:`ReadJANAPhase`'
     367        try:
     368            self.Phase = self.ReadJANAPhase(filename, ParentFrame)
     369            return True
     370        except Exception as detail:
     371            self.errors += '\n  '+str(detail)
     372            print 'JANA read error:',detail # for testing
     373            traceback.print_exc(file=sys.stdout)
     374            return False
     375       
     376    def ReadJANAPhase(self,filename,parent=None):
     377        '''Read a phase from a JANA2006 m50 & m40 files.
     378        '''
     379        self.errors = 'Error opening file'
     380        file = open(filename, 'Ur') #contains only cell & spcgroup
     381        Phase = {}
     382        Title = os.path.basename(filename)
     383        Compnd = ''
     384        Atoms = []
     385        Atypes = []
     386        S = file.readline()
     387        line = 1
     388        SGData = None
     389        cell = None
     390        while S:
     391            self.errors = 'Error reading at line '+str(line)
     392            if 'title' in S and S != 'title\n':
     393                Title = S.split()[1]
     394            elif 'cell' in S[:4]:
     395                cell = S[5:].split()
     396                cell=[float(cell[0]),float(cell[1]),float(cell[2]),
     397                    float(cell[3]),float(cell[4]),float(cell[5])]
     398                Volume = G2lat.calc_V(G2lat.cell2A(cell))
     399            elif 'spgroup' in S:
     400                SpGrp = S.split()[1]
     401                SpGrpNorm = G2spc.StandardizeSpcName(SpGrp)
     402                E,SGData = G2spc.SpcGroup(SpGrp)
     403                # space group processing failed, try to look up name in table
     404                if E:
     405                    SpGrpNorm = G2spc.StandardizeSpcName(SpGrp)
     406                    if SpGrpNorm:
     407                        E,SGData = G2spc.SpcGroup(SpGrpNorm)
     408                while E:
     409                    print G2spc.SGErrors(E)
     410                    dlg = wx.TextEntryDialog(parent,
     411                        SpGrp[:-1]+' is invalid \nN.B.: make sure spaces separate axial fields in symbol',
     412                        'ERROR in space group symbol','',style=wx.OK)
     413                    if dlg.ShowModal() == wx.ID_OK:
     414                        SpGrp = dlg.GetValue()
     415                        E,SGData = G2spc.SpcGroup(SpGrp)
     416                    else:
     417                        SGData = G2IO.SGData # P 1
     418                        self.warnings += '\nThe space group was not interpreted and has been set to "P 1".'
     419                        self.warnings += "Change this in phase's General tab."           
     420                    dlg.Destroy()
     421                SGlines = G2spc.SGPrint(SGData)
     422                for l in SGlines: print l
     423            elif 'atom' in S[:4]:
     424                Atypes.append(S.split()[1])
     425            S = file.readline()
     426            line += 1
     427        file.close()
     428        #read atoms from m40 file
     429        if not SGData:
     430            self.warnings += '\nThe space group was not read before atoms and has been set to "P 1". '
     431            self.warnings += "Change this in phase's General tab."
     432            SGData = G2IO.SGData # P 1
     433        filename2 = os.path.splitext(filename)[0]+'.m40'
     434        file2 = open(filename2,'Ur')
     435        S = file2.readline()
     436        line = 1
     437        self.errors = 'Error reading at line '+str(line)
     438        nAtoms = int(S.split()[0])
     439        for i in range(4):
     440            S = file2.readline()           
     441        line = 5
     442        for i in range(nAtoms):
     443            S1 = file2.readline()
     444            S2 = file2.readline()
     445            XYZ = [float(S1[27:36]),float(S1[36:45]),float(S1[45:54])]
     446            SytSym,Mult = G2spc.SytSym(XYZ,SGData)
     447            Type = Atypes[int(S1[9:11])-1]
     448            Name = S1[:8].strip()
     449            if S1[11:15].strip() == '1':
     450                Uiso = float(S2[:9])
     451                Uij = [0,0,0,0,0,0]
     452                IA = 'I'
     453            elif S1[11:15].strip() == '2':
     454                IA = 'A'
     455                Uiso = 0.
     456                Uij = [float(S2[:9]),float(S2[9:18]),float(S2[18:27]),
     457                    float(S2[27:36]),float(S2[36:45]),float(S2[45:54])]
     458            Atom = [Name,Type,'',XYZ[0],XYZ[1],XYZ[2],1.0,SytSym,Mult,IA,Uiso,
     459                Uij[0],Uij[1],Uij[2],Uij[3],Uij[4],Uij[5]]
     460            Atom.append(ran.randint(0,sys.maxint))
     461            Atoms.append(Atom)
     462            line += 2
     463        file2.close()
     464        self.errors = 'Error after read complete'
     465        if not SGData:
     466            raise self.ImportException("No space group (spcgroup entry) found")
     467        if not cell:
     468            raise self.ImportException("No cell found")
     469        Phase = G2IO.SetNewPhase(Name=Title,SGData=SGData,cell=cell+[Volume,])
     470        Phase['General']['Type'] = 'nuclear'
     471        Phase['General']['AtomPtrs'] = [3,1,7,9]
     472        Phase['Atoms'] = Atoms
     473        return Phase
  • trunk/imports/G2sfact.py

    r1453 r1503  
    7676            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
    7777            self.RefDict['Type'] = 'SXC'
     78            self.RefDict['Super'] = 0
    7879            self.UpdateParameters(Type='SXC',Wave=None) # histogram type
    7980            return True
     
    117118            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
    118119            self.RefDict['Type'] = 'SXC'
     120            self.RefDict['Super'] = 0
     121            self.UpdateParameters(Type='SXC',Wave=None) # histogram type
     122            return True
     123        except Exception as detail:
     124            self.errors += '\n  '+str(detail)
     125            print '\n\n'+self.formatName+' read error: '+str(detail) # for testing
     126            import traceback
     127            traceback.print_exc(file=sys.stdout)
     128            return False
     129           
     130class M90_ReaderClass(G2IO.ImportStructFactor):
     131    'Routines to import F**2, sig(F**2) reflections from a JANA M90 file'
     132    def __init__(self):
     133        super(self.__class__,self).__init__( # fancy way to self-reference
     134            extensionlist=('.m90','.M90'),
     135            strictExtension=False,
     136            formatName = u'JANA M90',
     137            longFormatName = u'Simple [hkl, Fo\u00b2, sig(Fo\u00b2)] Structure factor text file'
     138            )
     139        self.Super = 0
     140
     141    def ContentsValidator(self, filepointer):
     142        'Discover how many columns are in the m90 file - could be 9-12 depending on satellites'
     143        numCols = 0
     144        for i,line in enumerate(filepointer):
     145            if 'Data' in line:
     146                startData = i
     147                break
     148        for i,line in enumerate(filepointer):
     149            if i > startData:
     150                numCols = max(numCols,len(line.split()))
     151            if i > startData+20:
     152                break
     153        self.Super = numCols-9     #= 0,1,2,or 3
     154        return True #ColumnValidator(self, filepointer)
     155
     156    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
     157        'Read the file'
     158        try:
     159            for line,S in enumerate(filepointer):
     160                self.errors = '  Error reading line '+str(line+1)
     161                if S[0] == '#': continue       #ignore comments, if any
     162                try:
     163                    if self.Super == 0:
     164                        h,k,l,Fo,sigFo = S.split()[:5]
     165                        h,k,l = [int(h),int(k),int(l)]
     166                    elif self.Super == 1:
     167                        h,k,l,m1,Fo,sigFo = S.split()[:6]
     168                        h,k,l,m1 = [int(h),int(k),int(l),int(m1)]
     169                    elif self.Super == 2:
     170                        h,k,l,m1,m2,Fo,sigFo = S.split()[:7]
     171                        h,k,l,m1,m2 = [int(h),int(k),int(l),int(m1),int(m2)]
     172                    elif self.Super == 3:
     173                        h,k,l,m1,m2,m3,Fo,sigFo = S.split()[:8]
     174                        h,k,l,m1,m2,m3 = [int(h),int(k),int(l),int(m1),int(m2),int(m3)]                       
     175                except ValueError:  #skipping text at front
     176                    text = S.split()
     177                    if text[0] == 'lambda':
     178                        wave = float(text[1])
     179                    continue
     180                Fo = float(Fo)
     181                sigFo = float(sigFo)
     182                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
     183                if self.Super == 0:
     184                    self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     185                elif self.Super == 1:
     186                    self.RefDict['RefList'].append([h,k,l,m1,0,0,Fo,sigFo,0,Fo,0,0,0])
     187                elif self.Super == 2:
     188                    self.RefDict['RefList'].append([h,k,l,m1,m2,0,0,Fo,sigFo,0,Fo,0,0,0])
     189                elif self.Super == 3:
     190                    self.RefDict['RefList'].append([h,k,l,m1,m2,m3,0,0,Fo,sigFo,0,Fo,0,0,0])
     191            self.errors = 'Error after reading reflections (unexpected!)'
     192            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
     193            print self.RefDict['RefList'].shape
     194            self.RefDict['Type'] = 'SXC'
     195            self.RefDict['Super'] = self.Super
     196            self.UpdateParameters(Type='SXC',Wave=wave) # histogram type
     197            return True
     198        except Exception as detail:
     199            self.errors += '\n  '+str(detail)
     200            print '\n\n'+self.formatName+' read error: '+str(detail) # for testing
     201            import traceback
     202            traceback.print_exc(file=sys.stdout)
     203            return False
     204           
     205class SHELX5_ReaderClass(G2IO.ImportStructFactor):
     206    'Routines to import F**2, sig(F**2) reflections from a fixed format SHELX HKLF5 file'
     207    def __init__(self):
     208        super(self.__class__,self).__init__( # fancy way to self-reference
     209            extensionlist=('.hkl','.HKL'),
     210            strictExtension=False,
     211            formatName = u'SHELX HKL F\u00b2',
     212            longFormatName = u'SHELX HKLF5 [hkl, Fo\u00b2, sig(Fo\u00b2)] Structure factor text file'
     213            )
     214        self.Super = 0
     215
     216    def ContentsValidator(self, filepointer):
     217        'Discover how many characters are in the SHELX file - could be 32-44 depending on satellites'
     218        numCols = 0
     219        for i,line in enumerate(filepointer):
     220            numCols = max(numCols,len(line))
     221            if i > 20:
     222                break
     223        self.Super = (numCols-33)/4     #= 0,1,2,or 3
     224        print numCols,self.Super
     225        return True #ColumnValidator(self, filepointer)
     226
     227    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
     228        'Read the file'
     229        try:
     230            for line,S in enumerate(filepointer):
     231                self.errors = '  Error reading line '+str(line+1)
     232                if self.Super == 0:
     233                    h,k,l,Fo,sigFo = S[:4],S[4:8],S[8:12],S[12:20],S[20:28]
     234                    h,k,l = [int(h),int(k),int(l)]
     235                elif self.Super == 1:
     236                    h,k,l,m1,Fo,sigFo = S[:4],S[4:8],S[8:12],S[12:16],S[16:24],S[24:32]
     237                    h,k,l,m1 = [int(h),int(k),int(l),int(m1)]
     238                elif self.Super == 2:
     239                    h,k,l,m1,m2,Fo,sigFo = S[:4],S[4:8],S[8:12],S[12:16],S[16:20],S[20:28],S[28:36]
     240                    h,k,l,m1,m2 = [int(h),int(k),int(l),int(m1),int(m2)]
     241                elif self.Super == 3:
     242                    h,k,l,m1,m2,m3,Fo,sigFo = S[:4],S[4:8],S[8:12],S[12:16],S[16:20],S[20:24],S[24:32],S[32:40]
     243                    h,k,l,m1,m2,m3 = [int(h),int(k),int(l),int(m1),int(m2),int(m3)]
     244                if not any([h,k,l]):
     245                    break
     246                Fo = float(Fo)
     247                sigFo = float(sigFo)
     248                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
     249                if self.Super == 0:
     250                    self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     251                elif self.Super == 1:
     252                    self.RefDict['RefList'].append([h,k,l,m1,0,0,Fo,sigFo,0,Fo,0,0,0])
     253                elif self.Super == 2:
     254                    self.RefDict['RefList'].append([h,k,l,m1,m2,0,0,Fo,sigFo,0,Fo,0,0,0])
     255                elif self.Super == 3:
     256                    self.RefDict['RefList'].append([h,k,l,m1,m2,m3,0,0,Fo,sigFo,0,Fo,0,0,0])
     257                #self.RefDict['FF'].append({}) # now done in OnImportSfact
     258            self.errors = 'Error after reading reflections (unexpected!)'
     259            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
     260            self.RefDict['Type'] = 'SXC'
     261            self.RefDict['Super'] = self.Super
    119262            self.UpdateParameters(Type='SXC',Wave=None) # histogram type
    120263            return True
     
    178321                    Bank['RefDict']['RefList'] = np.array(Bank['RefDict']['RefList'])
    179322                    Bank['RefDict']['Type'] = 'SNT'                   
     323                    Bank['RefDict']['Super'] = 0
    180324            else:
    181325                self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
    182326                self.RefDict['Type'] = 'SNT'
     327                self.RefDict['Super'] = 0
    183328                self.errors = 'Error after reading reflections (unexpected!)'
    184329                self.UpdateParameters(Type='SNT',Wave=None) # histogram type
     
    241386                    Bank['RefDict']['RefList'] = np.array(Bank['RefDict']['RefList'])
    242387                    Bank['RefDict']['Type'] = 'SNT'                   
     388                    Bank['RefDict']['Super'] = 0        #for now                   
    243389            else:
    244390                self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
    245391                self.RefDict['Type'] = 'SNT'
     392                self.RefDict['Super'] = 0   #for now
    246393                self.errors = 'Error after reading reflections (unexpected!)'
    247394                self.UpdateParameters(Type='SNT',Wave=None) # histogram type
Note: See TracChangeset for help on using the changeset viewer.