master_from_emsoft#
- de_ebsd.index.io.master_from_emsoft(path, device=None)[source]#
Load an EMsoft EBSD master-pattern HDF5 file as a de_ebsd
MasterPattern.Reads the square-Lambert masters
EMData/EBSDmaster/mLPNH/mLPSH, summing their leading asymmetric-unit site axis (indexing only the first site is a known bug); an already-collapsed(n_energy, n, n)array is used as-is. AllEkeVsenergy bins are kept – pick one withSphericalIndexer(energy_kev=...).CrystalDatais rebuilt into ade_ebsd.crystal.Crystaland stashed inmetadata["crystal"]so the indexer can auto-derive the phase. Atomic numbers map to symbols viaELEMENT_SYMBOLS[Z - 1], and the space-group setting (1 or 2) becomesCrystal(origin=...), defaulting to 2:master = master_from_emsoft("Si_MC.h5") xmap = SphericalIndexer(master, detector).index_scan(patterns, shape=shape)
- Parameters:
- path
Path to the EMsoft master-pattern HDF5 file.
- device
Optional torch device the returned master is moved to.
- Returns:
de_ebsd.sim.MasterPatterndataof shape(n_energy, 2, n, n)(axis 1 = hemisphere, north first), withmetadatacarrying"crystal","dmin","bethe"and"source". A missing or malformedCrystalDatagroup leavesmetadata["crystal_error"]instead, rather than sinking the whole load.