Ejemplo n.º 1
0
        fwhm = eval(opts.fwhmStr)
        a = 1e4  # num.iinfo('uint16').max = 65535
        if debug > 1:
            for g in gList:
                print g.grainSpots['predAngles']
        spotParamsList = getSpotsFromGrains(gList, fwhm, a)

        if os.path.exists(synthStackName):
            os.remove(synthStackName)

        # writer = detector.ReadGE(None, omeMin, deltaOme, doFlip=False).getWriter(synthStackName)
        writer = detectorGeom.reader.getWriter(synthStackName)
        stack = xrdutil.makeSynthFrames(spotParamsList,
                                        detectorGeom,
                                        omegas,
                                        cutoffMult=cutoffMult,
                                        output=writer,
                                        debug=debug)
        writer.close()
        '''
        # if a stack of sparse matrices is returned, can do things like:
        frame = stack[-1].todense()
        pw = detectorGeom.display(frame)
        detectorGeom.drawRings(pw, planeData)
        '''
        '''
        # readerTmp = reader.makeNew()
        readerTmp = detectorGeom.getNewReader(synthStackName, omeMin, deltaOme, doFlip=False, subtractDark=False)
        flatFrame = readerTmp.read(nframes=nOme, sumImg=num.maximum)
        pw = detectorGeom.display(flatFrame)
        '''
Ejemplo n.º 2
0
     '''
     
     fwhm = eval(opts.fwhmStr)
     a = 1e4 # num.iinfo('uint16').max = 65535
     if debug > 1:
         for g in gList:
             print g.grainSpots['predAngles']
     spotParamsList = getSpotsFromGrains(gList, fwhm, a)
 
     if os.path.exists(synthStackName):
         os.remove(synthStackName)
 
     # writer = detector.ReadGE(None, omeMin, deltaOme, doFlip=False).getWriter(synthStackName)
     writer = detectorGeom.reader.getWriter(synthStackName)
     stack = xrdutil.makeSynthFrames(spotParamsList, detectorGeom, omegas, 
                                     cutoffMult=3.0, # to keep things less computationally expensive
                                     output=writer, debug=debug)
     writer.close()
     '''
     # if a stack of sparse matrices is returned, can do things like:
     frame = stack[-1].todense()
     pw = detectorGeom.display(frame)
     detectorGeom.drawRings(pw, planeData)
     '''
     
     '''
     # readerTmp = reader.makeNew()
     readerTmp = detectorGeom.getNewReader(synthStackName, omeMin, deltaOme, doFlip=False, subtractDark=False)
     flatFrame = readerTmp.read(nframes=nOme, sumImg=num.maximum)
     pw = detectorGeom.display(flatFrame)
     '''
Ejemplo n.º 3
0
     '''
     
     fwhm = eval(opts.fwhmStr)
     a = 1e4 # num.iinfo('uint16').max = 65535
     if debug > 1:
         for g in gList:
             print g.grainSpots['predAngles']
     spotParamsList = getSpotsFromGrains(gList, fwhm, a)
 
     if os.path.exists(synthStackName):
         os.remove(synthStackName)
 
     # writer = detector.ReadGE(None, omeMin, deltaOme, doFlip=False).getWriter(synthStackName)
     writer = detectorGeom.reader.getWriter(synthStackName)
     stack = xrdutil.makeSynthFrames(spotParamsList, detectorGeom, omegas, 
                                     cutoffMult=cutoffMult,
                                     output=writer, debug=debug)
     writer.close()
     '''
     # if a stack of sparse matrices is returned, can do things like:
     frame = stack[-1].todense()
     pw = detectorGeom.display(frame)
     detectorGeom.drawRings(pw, planeData)
     '''
     
     '''
     # readerTmp = reader.makeNew()
     readerTmp = detectorGeom.getNewReader(synthStackName, omeMin, deltaOme, doFlip=False, subtractDark=False)
     flatFrame = readerTmp.read(nframes=nOme, sumImg=num.maximum)
     pw = detectorGeom.display(flatFrame)
     '''
Ejemplo n.º 4
0
        fwhm = eval(opts.fwhmStr)
        a = 1e4  # num.iinfo('uint16').max = 65535
        if debug > 1:
            for g in gList:
                print g.grainSpots['predAngles']
        spotParamsList = getSpotsFromGrains(gList, fwhm, a)

        if os.path.exists(synthStackName):
            os.remove(synthStackName)

        # writer = detector.ReadGE(None, omeMin, deltaOme, doFlip=False).getWriter(synthStackName)
        writer = detectorGeom.reader.getWriter(synthStackName)
        stack = xrdutil.makeSynthFrames(
            spotParamsList,
            detectorGeom,
            omegas,
            cutoffMult=3.0,  # to keep things less computationally expensive
            output=writer,
            debug=debug)
        writer.close()
        '''
        # if a stack of sparse matrices is returned, can do things like:
        frame = stack[-1].todense()
        pw = detectorGeom.display(frame)
        detectorGeom.drawRings(pw, planeData)
        '''
        '''
        # readerTmp = reader.makeNew()
        readerTmp = detectorGeom.getNewReader(synthStackName, omeMin, deltaOme, doFlip=False, subtractDark=False)
        flatFrame = readerTmp.read(nframes=nOme, sumImg=num.maximum)
        pw = detectorGeom.display(flatFrame)