Changeset 227


Ignore:
Timestamp:
Jan 6, 2011 6:09:45 PM (12 years ago)
Author:
vondreele
Message:

get center for Gold detector & other tif images to be in middle
allow manual shift of center on image plot

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r226 r227  
    668668        image[row] = np.asarray(line)
    669669        row += 1
    670     data = {'pixelSize':pixy,'wavelength':0.10,'distance':100.0,'center':[204.8,204.8]}
     670    center = [pixy[0]*finalSize/2000,pixy[1]*finalSize/2000]
     671    data = {'pixelSize':pixy,'wavelength':0.10,'distance':100.0,'center':center}
    671672    File.close()   
    672673    if imageOnly:
  • trunk/GSASIIplot.py

    r225 r227  
    842842
    843843    def OnImPlotKeyPress(event):
     844        Data = self.PatternTree.GetItemPyData(
     845            G2gd.GetPatternTreeItemId(self,self.Image, 'Image Controls'))
     846        Masks = self.PatternTree.GetItemPyData(
     847            G2gd.GetPatternTreeItemId(self,self.Image, 'Masks'))
    844848        if self.PatternTree.GetItemText(self.PickId) == 'Masks':
    845             Data = self.PatternTree.GetItemPyData(
    846                 G2gd.GetPatternTreeItemId(self,self.Image, 'Image Controls'))
    847             Masks = self.PatternTree.GetItemPyData(
    848                 G2gd.GetPatternTreeItemId(self,self.Image, 'Masks'))
    849849            Xpos = event.xdata
    850850            if not Xpos:            #got point out of frame
     
    868868                self.G2plotNB.status.SetFields(['','Polygon mask active - LB pick next point, RB close polygon'])
    869869            G2imG.UpdateMasks(self,Masks)
     870        else:
     871            Xpos = event.xdata
     872            if not Xpos:            #got point out of frame
     873                return
     874            Ypos = event.ydata
     875            if event.key == 'c':
     876                print 'move center to: ',Xpos,Ypos
     877                Data['center'] = [Xpos,Ypos]
     878                G2imG.UpdateImageControls(self,Data,Masks)
    870879        PlotImage(self)
    871880           
Note: See TracChangeset for help on using the changeset viewer.