Changeset 3767


Ignore:
Timestamp:
Dec 18, 2018 3:07:28 PM (3 years ago)
Author:
vondreele
Message:

add sample changer position as an image parameter & have it show up in sequential calibration results

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r3759 r3767  
    141141        min=0.,max=1.,typeHint=float),0,WACV)
    142142    mainSizer.Add(distSizer,0)
     143    if 'samplechangerpos' not in data:
     144        data['samplechangerpos'] = 0.0
     145    mainSizer.Add(wx.StaticText(G2frame.dataWindow,label='Sample changer position %.2f mm'%data['samplechangerpos']),0,WACV)
    143146
    144147################################################################################
     
    222225                    varyList.append('setdist')
    223226                    sigList.append(None)
     227                    vals.append(Data.get('samplechangerpos',Data['samplechangerpos']))
     228                    varyList.append('chgrpos')
     229                    sigList.append(None)
     230                   
    224231                    SeqResult[name] = {'variables':vals,'varyList':varyList,'sig':sigList,'Rvals':[],
    225232                        'covMatrix':np.eye(len(varyList)),'title':name,'parmDict':parmDict}
     
    341348                    Data['size'] = oldData['size']
    342349                    Data['GonioAngles'] = oldData.get('GonioAngles', [0.,0.,0.])
     350                    Data['samplechangerpos'] = oldData.get('samplechangerpos',0.0)
    343351                    Data['ring'] = []
    344352                    Data['rings'] = []
  • trunk/imports/G2img_1TIF.py

    r3323 r3767  
    100100    distance = None
    101101    polarization = None
     102    samplechangerpos = None
    102103    try:
    103104        Meta = open(filename+'.metadata','Ur')
     
    116117                elif 'polarization' == keyword.lower():
    117118                    polarization = float(line.split('=')[1])
     119                elif 'samplechangercoordinate' == keyword.lower():
     120                    samplechangerpos = float(line.split('=')[1])
    118121            except:
    119122                print('error reading metadata: '+line)
     
    365368    distance = (not distance) and 100.0 or distance
    366369    polarization = (not polarization) and 0.99 or polarization
     370    samplechangerpos = (not samplechangerpos) and 0.0 or samplechangerpos
    367371    data = {'pixelSize':pixy,'wavelength':wavelength,'distance':distance,'center':center,'size':sizexy,
    368             'setdist':distance,'PolaVal':[polarization,False]}
     372            'setdist':distance,'PolaVal':[polarization,False],'samplechangerpos':samplechangerpos}
    369373    File.close()   
    370374    return head,data,Npix,image
Note: See TracChangeset for help on using the changeset viewer.