Changeset 3332


Ignore:
Timestamp:
Apr 1, 2018 12:20:54 PM (4 years ago)
Author:
vondreele
Message:

preset image parameters for Bruker; allows easy recalibrate & integration

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r3330 r3332  
    314314        Data['ring'] = []
    315315        Data['rings'] = []
    316         Data['cutoff'] = 10
     316        Data['cutoff'] = 10.
    317317        Data['pixLimit'] = 20
    318318        Data['edgemin'] = 100000000
     
    326326        Data['type'] = 'PWDR'
    327327        Data['color'] = GSASIIpath.GetConfigValue('Contour_color','Paired')
    328         Data['tilt'] = 0.0
    329         Data['rotation'] = 0.0
     328        if 'tilt' not in Data:          #preset in e.g. Bruker importer?
     329            Data['tilt'] = 0.0
     330            Data['rotation'] = 0.0
     331            Data['pixLimit'] = 20
     332            Data['calibdmin'] = 0.5
     333            Data['cutoff'] = 10.
    330334        Data['showLines'] = False
     335        Data['calibskip'] = 0
    331336        Data['ring'] = []
    332337        Data['rings'] = []
    333         Data['cutoff'] = 10
    334         Data['pixLimit'] = 20
    335         Data['calibdmin'] = 0.5
    336         Data['calibskip'] = 0
    337338        Data['edgemin'] = 100000000
    338339        Data['ellipses'] = []
     
    341342        Data['DetDepthRef'] = False
    342343        Data['calibrant'] = ''
    343         Data['IOtth'] = [2.0,5.0]
     344        Data['IOtth'] = [5.0,50.0]
    344345        Data['LRazimuth'] = [0.,180.]
    345346        Data['azmthOff'] = 0.0
    346         Data['outChannels'] = 2500
     347        Data['outChannels'] = 2250
    347348        Data['outAzimuths'] = 1
    348349        Data['centerAzm'] = False
    349         Data['fullIntegrate'] = False
     350        Data['fullIntegrate'] = True
    350351        Data['setRings'] = False
    351352        Data['background image'] = ['',-1.0]                           
    352353        Data['dark image'] = ['',-1.0]
    353354        Data['Flat Bkg'] = 0.0
     355        Data['Oblique'] = [0.5,False]
    354356    Data['setDefault'] = False
    355357    Data['range'] = [(0,Imax),[0,Imax]]
  • trunk/imports/G2img_SFRM.py

    r3330 r3332  
    7373            target = fields[0].capitalize()
    7474        elif 'DISTANC' in line:
    75             dist = float(fields[0])*10.
     75            dist = float(fields[1])*10.
     76        elif 'ANGLES' in line:
     77            twoth = float(fields[0])
    7678        elif 'CENTER' in line:
    7779            cent = [float(fields[0]),float(fields[1])]
     
    9799    nxy = sizexy[0]*sizexy[1]
    98100    cent = [cent[0]*pixSize[0]/1000.,cent[1]*pixSize[1]/1000.]
     101    cent[0] += dist*np.tan(np.pi*twoth/180.)
    99102    File.seek(imageBeg)
    100103    img = File.read(nxy)
     
    113116    image = np.reshape(img,(sizexy[1],sizexy[0]))
    114117    print ('import time: %.3f'%(time.time()-time0))
    115     data = {'pixelSize':pixSize,'wavelength':wave,'distance':dist,'center':cent,'size':sizexy,'target':target}
     118    data = {'pixelSize':pixSize,'wavelength':wave,'distance':dist,'center':cent,
     119            'size':sizexy,'target':target,'tilt':-twoth,'rotation':90.}
     120    data['pixLimit'] = 5
     121    data['calibdmin'] = 1.0
     122    data['cutoff'] = .5
    116123    Npix = sizexy[0]*sizexy[1]
    117124   
Note: See TracChangeset for help on using the changeset viewer.