Changeset 2723


Ignore:
Timestamp:
Feb 24, 2017 9:27:17 AM (5 years ago)
Author:
vondreele
Message:

add patch for missing PolaVal? in old image gpx files
Stress/strain image plots now have calculated rings drawn from pixel centers where the intensity distribution is determined

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2721 r2723  
    10071007            ellipse = FitEllipse(R['ImxyObs'].T)
    10081008            ringxy,ringazm = makeRing(ring['Dcalc'],ellipse,0,0.,scalex,scaley,Image)
     1009            ring['ImxyCalc'] = np.array(ringxy).T[:2]
    10091010            ringint = np.array([float(Image[int(y*scaley),int(x*scalex)]) for x,y in np.array(ringxy)[:,:2]])
    10101011            ringint /= np.mean(ringint)
     
    10261027            ellipse = FitEllipse(R['ImxyObs'].T)
    10271028            ringxy,ringazm = makeRing(ring['Dcalc'],ellipse,0,0.,scalex,scaley,Image)
     1029            ring['ImxyCalc'] = np.array(ringxy).T[:2]
    10281030            ringint = np.array([float(Image[int(y*scaley),int(x*scalex)]) for x,y in np.array(ringxy)[:,:2]])
    10291031            ringint /= np.mean(ringint)
  • trunk/GSASIIimgGUI.py

    r2719 r2723  
    139139            typeHint=float),0,WACV)
    140140    distSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Polarization: '),0,WACV)
     141    if 'PolaVal' not in data:       #patch
     142        data['PolaVal'] = [0.99,False]
    141143    distSizer.Add(G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data['PolaVal'],0,nDig=(10,4),
    142144        min=0.,max=1.,typeHint=float),0,WACV)
  • trunk/GSASIIplot.py

    r2715 r2723  
    49214921            dsp = G2img.GetDsp(Xpos,Ypos,Data)
    49224922            StrSta['d-zero'].append({'Dset':dsp,'Dcalc':0.0,'pixLimit':10,'cutoff':0.5,
    4923                 'ImxyObs':[[],[]],'ImtaObs':[[],[]],'ImtaCalc':[[],[]],'Emat':[1.0,1.0,1.0]})
     4923                'ImxyObs':[[],[]],'ImxyCalc':[[],[]],'ImtaObs':[[],[]],'ImtaCalc':[[],[]],'Emat':[1.0,1.0,1.0]})
    49244924            R,r = G2img.MakeStrStaRing(StrSta['d-zero'][-1],G2frame.ImageZ,Data)
    49254925            if not len(R):
     
    51385138        if G2frame.PickId and G2frame.PatternTree.GetItemText(G2frame.PickId) in ['Stress/Strain',]:
    51395139            for N,ring in enumerate(StrSta['d-zero']):
     5140                if 'ImxyCalc' in ring:
     5141                    xringc,yringc = ring['ImxyCalc']
     5142                    Plot.plot(xringc,yringc,colors[N%6])
    51405143                xring,yring = ring['ImxyObs']
    51415144                Plot.plot(xring,yring,colors[N%6]+'.')
Note: See TracChangeset for help on using the changeset viewer.