Changeset 4671 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Dec 12, 2020 1:30:31 PM (11 months ago)
Author:
vondreele
Message:

add refinable multiplier for a fixed background; multiplier is now normally > 0
usable for peak fitting and Rietved refinement
add the fixed background entry to all background defaults
fix bug in GetDetectorXY fo when cursor outside image - returns [0,0] not None; changes elsewhere to use this
GetTthAzmDsp? now returns explicit list not assumed tuple
put the abs in the nl.qr test for singularities in HessianLSQ
Add 'BF mult' to name list in G2obj
put a try - except TypeError? around setting plot style stuff in PlotPatterns?
Remove the setting of Pattern[0]BackFile? - this was redundant for PWDR
remove picker/pickradius from linescan plot - failed
remove the alternate fixed background definition ('_fixedVary', etc.)
clear the PhaseReaderClass?Drawing? dictionary upon import of phase from a gpx file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r4593 r4671  
    503503    xyz = LinePlaneCollision(dxyz0,dxyz1,vect,2.*dist*vect)
    504504    if xyz is None:
    505         return None
     505        return np.zeros(2)
     506#        return None
    506507    xyz = np.inner(xyz,makeMat(-data['det2theta'],1).T)
    507508    xyz -= np.array([0.,0.,dist])                 #translate back
     
    638639    distsq = data['distance']**2
    639640    G = ((dx-x0x)**2+(dy-x0y)**2+distsq)/distsq       #for geometric correction = 1/cos(2theta)^2 if tilt=0.
    640     return tth,azm,G,dsp
     641    return [tth,azm,G,dsp]
    641642   
    642643def GetTth(x,y,data):
     
    763764    Ty = np.zeros_like(Tx)
    764765    dsp = wave/(2.0*npsind(Tx/2.0))
    765     xy = np.array([GetDetectorXY(d,azm,data) for d in dsp]).T
     766    xy = [GetDetectorXY(d,azm,data) for d in dsp]
     767    xy = np.array(xy).T
    766768    xy[1] *= scalex
    767769    xy[0] *= scaley
     
    14591461            XY = np.array(ringxy).T
    14601462            Th,Azm = GetTthAzm(XY[0],XY[1],Controls)
    1461             pola = G2pwd.Polarization(Controls['PolaVal'][0],Th,Azm-90.)[0]
     1463            pola = G2pwd.Polarization(Controls['PolaVal'][0],Th,Azm-90.)[0]     #get pola not dpola
    14621464            ring['ImxyCalc'] = np.array(ringxy).T[:2]
    14631465            ringint = np.array([float(Image[int(x*scalex),int(y*scaley)]) for y,x in np.array(ringxy)[:,:2]])
    14641466            ringint /= np.mean(ringint)
    1465             ringint /= pola
     1467            ringint /= pola[0]      #just 1st column
    14661468            G2fil.G2Print (' %s %.3f %s %.3f %s %d'%('d-spacing',ring['Dcalc'],'sig(MRD):',np.sqrt(np.var(ringint)),'# points:',len(ringint)))
    14671469            RingsAI.append(np.array(list(zip(ringazm,ringint))).T)
Note: See TracChangeset for help on using the changeset viewer.