Skip to content

Commit 32009f3

Browse files
kevindlewis23Zack Singer
andauthored
Crystallography Refactored (#701)
* Reformat utils * Remove unused _convert_angles function * Remove check for numba install * Clean up unused variables, add typing * Remove unused _coo_build_window function * Add type hints to function defs * Remove unnecessary variables / passes * Provide deprecation warnings to the user. * Tuple -> tuple * List -> list, Dict -> dict * Change deprecated to accept str instead of func * Remove unnecessary "save" func from etaOmeMaps * Add deprecation date * Format with Black * Clean up name mangling, bad returns * Move to f-strings * Clean up properties * Delete some unused functions * Remove makeNew function, which is not a useful method * Some docstrings, committing to swtich branches * Some docstrings written, properties now using annotations * Typing and cleanup * Remove unused functions/args * Added docstrings * Update crystallography.py * Push before pull * Crystallography done * PEP8 * Union instead of | * Copy plane data --------- Co-authored-by: Zack Singer <[email protected]>
1 parent 3bd04e8 commit 32009f3

File tree

6 files changed

+846
-888
lines changed

6 files changed

+846
-888
lines changed

hexrd/findorientations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def generate_orientation_fibers(cfg, eta_ome):
8888
pd = eta_ome.planeData
8989
tTh = pd.getTTh()
9090
bMat = pd.latVecOps['B']
91-
csym = pd.getLaueGroup()
91+
csym = pd.laueGroup
9292

9393
# !!! changed recently where iHKLList are now master hklIDs
9494
pd_hkl_ids = eta_ome.iHKLList[seed_hkl_ids]
@@ -885,8 +885,8 @@ def find_orientations(cfg,
885885
logger.info("\tmean reflections per grain: %d", mean_rpg)
886886
logger.info("\tneighborhood size: %d", min_samples)
887887

888-
qbar, _ = run_cluster(
889-
completeness, qfib, plane_data.getQSym(), cfg,
888+
qbar, cl = run_cluster(
889+
completeness, qfib, plane_data.q_sym, cfg,
890890
min_samples=min_samples,
891891
compl_thresh=compl_thresh,
892892
radius=cl_radius)

hexrd/instrument/detector.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,14 +1131,7 @@ def make_powder_rings(
11311131

11321132
# in case you want to give it tth angles directly
11331133
if isinstance(pd, PlaneData):
1134-
# Okay, we have a PlaneData object
1135-
try:
1136-
pd = pd.makeNew() # make a copy to munge
1137-
except TypeError:
1138-
# !!! have some other object here,
1139-
# likely a dummy plane data object of sorts
1140-
raise
1141-
1134+
pd = PlaneData(None, pd)
11421135
if delta_tth is not None:
11431136
pd.tThWidth = np.radians(delta_tth)
11441137
else:

0 commit comments

Comments
 (0)