Module: xrd.indexer¶
1 Class¶
9 Functions¶
- hexrd.xrd.indexer.convertUToRotMat(Urows, U0, symTag='Oh', display=False)[source]¶
Takes GrainSpotter gff ouput in rows
U11 U12 U13 U21 U22 U23 U13 U23 U33
and takes it into the hexrd/APS frame of reference
Urows comes from grainspotter’s gff output U0 comes from xrd.crystallography.latticeVectors.U0
- convertRotMatToFableU(rMats, U0=array([[ 1., 0., 0.],
- [ 0., 1., 0.],
- [ 0., 0., 1.]]), symTag='Oh', display=False)
Makes GrainSpotter gff ouput
U11 U12 U13 U21 U22 U23 U13 U23 U33
and takes it into the hexrd/APS frame of reference
Urows comes from grainspotter’s gff output U0 comes from xrd.crystallography.latticeVectors.U0
- hexrd.xrd.indexer.testThisQ(thisQ)[source]¶
NOTES: (*) doFit is not done here – in multiprocessing, that would end
up happening on a remote process and then different processes would have different data, unless spotsArray were made to be fancier(*) kludge stuff so that this function is outside of fiberSearch
- hexrd.xrd.indexer.fiberSearch(spotsArray, hklList, iPhase=0, nsteps=120, minCompleteness=0.6, minPctClaimed=0.95, preserveClaims=False, friedelOnly=True, dspTol=None, etaTol=0.025, omeTol=0.025, etaTolF=0.00225, omeTolF=0.00875, nStdDev=2, quitAfter=None, doRefinement=True, debug=True, doMultiProc=True, nCPUs=None, outputGrainList=False)[source]¶
This indexer finds grains by performing 1-d searches along the fibers under the valid spots associated with each reflection order specified in hklList. The set of spots used to generate the candidate orientations may be restricted to Friedel pairs only.
hklList must have length > 0; Dach hkl entry in hklList must be a tuple, not a list
the output is a concatenated list of orientation matrices ((n, 3, 3) numpy.ndarray).
- hexrd.xrd.indexer.paintGrid(quats, etaOmeMaps, threshold=None, bMat=None, omegaRange=None, etaRange=None, omeTol=0.017453292519943295, etaTol=0.017453292519943295, omePeriod=(-3.141592653589793, 3.141592653589793), doMultiProc=False, nCPUs=None, debug=False)[source]¶
do a direct search of omega-eta maps to paint each orientation in quats with a completeness
bMat is in CRYSTAL frame
etaOmeMaps is instance of xrd.xrdutil.CollapseOmeEta
omegaRange=([-num.pi/3., num.pi/3.],) for example
*) lifted mainly from grain.py
- *) self.etaGrid, self.omeGrid = num.meshgrid(self.etaEdges, self.omeEdges)
- this means that ETA VARIES FASTEST!
...make a new function that gets called by grain to do the g-vec angle computation?
- hexrd.xrd.indexer.writeGVE(spotsArray, fileroot, **kwargs)[source]¶
write Fable gve file from Spots object
fileroot is the root string used to write the gve and ini files
Outputs:
No return value, but writes the following files:
<fileroot>.gve <fileroot>_grainSpotter.ini (points to –> <fileroot>_grainSpotter.log)
Keyword arguments:
Mainly for GrainSpotter .ini file, but some are needed for gve files
‘sgNum’: <225> ‘phaseID’: <None> ‘cellString’: <F> ‘omeRange’: <-60, 60, 120, 240> the oscillation range(s)
**currently pulls from spots- ‘deltaOme’: <0.25, 0.25> the oscillation delta(s)
- **currently pulls from spots
‘minMeas’: <24> ‘minCompl’: <0.7> ‘minUniqn’: <0.5> ‘uncertainty’: <[0.10, 0.25, .50]> the min [tTh, eta, ome] uncertainties
in degrees‘eulStep’: <2> ‘nSigmas’: <2> ‘minFracG’: <0.90> ‘nTrials’: <100000> ‘positionfit’: <True>
Notes:
- *) The omeRange is currently pulled from the spotsArray input; the kwarg
- has no effect as of now. Will change this to ‘override’ the spots info if the user, say, wants to pare down the range.
- *) There is no etaRange argument yet, but presumably GrainSpotter knows
- how to deal with this. Pending feature...