Changeset 1374


Ignore:
Timestamp:
Jun 5, 2014 3:07:57 PM (7 years ago)
Author:
vondreele
Message:

recalibrate enable issues
save/load image controls

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r1371 r1374  
    534534    if data['DetDepthRef']:
    535535        varyList.append('dep')
    536     FitDetector(rings,varyList,parmDict)
     536    chisq = FitDetector(rings,varyList,parmDict)
    537537    data['distance'] = parmDict['dist']
    538538    data['center'] = [parmDict['det-X'],parmDict['det-Y']]
     
    540540    data['tilt'] = parmDict['tilt']
    541541    data['DetDepth'] = parmDict['dep']
     542    data['chisq'] = chisq
    542543    N = len(data['ellipses'])
    543544    data['ellipses'] = []           #clear away individual ellipse fits
     
    716717                data['tilt'] = parmDict['tilt']
    717718                data['DetDepth'] = parmDict['dep']
     719                data['chisq'] = chisq
    718720                elcent,phi,radii = ellipse = GetEllipse(dsp,data)
    719721                print fmt2%('fitted ellipse:   ',elcent[0],elcent[1],phi,radii[0],radii[1],chisq,len(rings))
  • trunk/GSASIIimgGUI.py

    r1331 r1374  
    247247                keys = ['type','wavelength','calibrant','distance','center',
    248248                    'tilt','rotation','azmthOff','fullIntegrate','LRazimuth',
    249                     'IOtth','outAzimuths','invert_x','invert_y','DetDepth']
     249                    'IOtth','outAzimuths','invert_x','invert_y','DetDepth',
     250                    'calibskip','pixLimit','cutoff','calibdmin','chisq',
     251                    'binType','SampleShape','PolaVal','SampleAbs','dark image','background image']
    250252                for key in keys:
    251                     if key in ['rotation']:
    252                         File.write(key+':'+str(data[key])+'\n')                       
    253                     else:
    254                         File.write(key+':'+str(data[key])+'\n')
     253                    if key not in data:     #uncalibrated!
     254                        continue
     255                    File.write(key+':'+str(data[key])+'\n')
    255256                File.close()
    256257        finally:
     
    259260    def OnLoadControls(event):
    260261        cntlList = ['wavelength','distance','tilt','invert_x','invert_y','type',
    261             'fullIntegrate','outAzimuths','LRazimuth','IOtth','azmthOff','DetDepth']
     262            'fullIntegrate','outAzimuths','LRazimuth','IOtth','azmthOff','DetDepth',
     263            'calibskip','pixLimit','cutoff','calibdmin','chisq',
     264            'PolaVal','SampleAbs','dark image','background image']
    262265        dlg = wx.FileDialog(G2frame, 'Choose image controls file', '.', '',
    263266            'image control files (*.imctrl)|*.imctrl',wx.OPEN|wx.CHANGE_DIR)
     
    273276                        continue
    274277                    [key,val] = S[:-1].split(':')
    275                     if key in ['type','calibrant',]:
     278                    if key in ['type','calibrant','binType','SampleShape',]:    #strings
    276279                        save[key] = val
    277280                    elif key in ['rotation']:
     
    931934    G2frame.dataFrame.Bind(wx.EVT_MENU, OnRecalibrate, id=G2gd.wxID_IMRECALIBRATE)
    932935    G2frame.dataFrame.Bind(wx.EVT_MENU, OnClearCalib, id=G2gd.wxID_IMCLEARCALIB)
    933     if not data['rings']:
     936    if 'chisq' not in data:
    934937        G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=False)   
    935938    G2frame.dataFrame.Bind(wx.EVT_MENU, OnIntegrate, id=G2gd.wxID_IMINTEGRATE)
  • trunk/GSASIIsasd.py

    r1373 r1374  
    476476    '''Computes structure factor for not dilute monodisperse hard sphere with a
    477477    square well potential interaction.
    478     Refs.: SHARMA,SHARMA, PHYSICA 89A,(1977),212
     478    Refs.: SHARMA,SHARMA, PHYSICA 89A,(1977),213-
    479479   
    480480    :param float Q: Q value array (A-1)
     
    13721372            Dist.append([])
    13731373    Ic[Ibeg:Ifin] += Back[0]
    1374     slitLen = Sample['SlitLen']
     1374    slitLen = Sample.get('SlitLen',0.)
    13751375    if slitLen:
    13761376        Ic[Ibeg:Ifin] = SmearData(Ic,Q,slitLen,Back[0])[Ibeg:Ifin]
Note: See TracChangeset for help on using the changeset viewer.