Skip to content

Commit

Permalink
Merge branch 'HEXRD:master' into gvec_xy_test
Browse files Browse the repository at this point in the history
  • Loading branch information
donald-e-boyce authored Sep 4, 2024
2 parents f57824d + 8900b67 commit 6c49fbb
Show file tree
Hide file tree
Showing 18 changed files with 1,516 additions and 1,320 deletions.
58 changes: 38 additions & 20 deletions hexrd/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
zeros_3x1 = np.zeros((3, 1))
zeros_6x1 = np.zeros((6, 1))

# reference beam direction and eta=0 ref in LAB FRAME for standard geometry
'''reference beam direction and
eta=0 ref in LAB FRAME for standard geometry'''
beam_vec = -lab_z
eta_vec = lab_x

Expand Down Expand Up @@ -162,7 +163,9 @@
3628800.]).astype(np.complex128)

"""
>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, [email protected]
>> @AUTHOR: Saransh Singh,
Lawrence Livermore National Lab,
[email protected]
>> @DATE: 11/28/2022 SS 1.0 original
>> @DETAILS: constants for rodrigues FZ
"""
Expand All @@ -177,7 +180,9 @@
)

'''
>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, [email protected]
>> @AUTHOR: Saransh Singh,
Lawrence Livermore National Lab,
[email protected]
>> @DATE: 10/28/2020 SS 1.0 original
>> @DETAILS: constants for sphere sectors used for IPF coloring
'''
Expand Down Expand Up @@ -263,7 +268,8 @@ def set_numba_cache():
4. The NUMBA_CACHE_DIR environment variable is not defined
If all of these are true, then numba will try to write to a
directory where it doesn't have permission, and cause the application to
directory where it doesn't have permission,
and cause the application to
freeze. Avoid that by setting the cache dir ourselves.
"""

Expand Down Expand Up @@ -316,8 +322,10 @@ def is_writable_file(path):
cRestmass = 9.1093837090E-31

'''
adding another parametrization of the scattering factors. these are more recent
and more accurate. also used in Vesta (copied from there). see:
adding another parametrization of the
scattering factors. these are more recent
and more accurate. also used in Vesta
(copied from there). see:
New Analytical coherent Scattering-Factor Functions for Free Atoms and Ions
BY D. WAASMAIER AND A. KIRFEL
Expand Down Expand Up @@ -638,7 +646,9 @@ def is_writable_file(path):
'Cf': ['0']
}
'''
this dictionary tabulates the small nuclear Thomson term fNT for all elements up to Z=92
this dictionary tabulates the small
nuclear Thomson term fNT for all
elements up to Z=92
'''
fNT = {
'H':-0.00054423,'He':-0.00054817,'Li':-0.00071131,'Be':-0.00097394,'B':-0.0012687,'C':-0.0016442,'N':-0.0019191,'O':-0.0021944,
Expand Down Expand Up @@ -737,8 +747,10 @@ def is_writable_file(path):
229
])

''' this variable encodes all the generators (including translations) for all 230 space groups
will be used to compute the full space group symmetry operators
''' this variable encodes all the generators
(including translations) for all 230 space groups
will be used to compute the full space group symmetry
operators
'''
SYM_GL = [
"000 ", "100 ", "01cOOO0 ",
Expand Down Expand Up @@ -996,8 +1008,10 @@ def is_writable_file(path):
}

'''
this dictionary contains the generators encoded in each letter of the generator string
the full symmetry is generated by the repeated action of the generator matrix
this dictionary contains the generators encoded
in each letter of the generator string
the full symmetry is generated by the repeated
action of the generator matrix
'''

''' rotational, inversions, mirrors etc. components
Expand Down Expand Up @@ -1100,17 +1114,21 @@ def is_writable_file(path):
SYM_GENERATORS['Y'] = -1./4.
SYM_GENERATORS['Z'] = -1./8.


'''
@AUTHOR Saransh Singh, Lawrence Livermore National Lab, [email protected]
@AUTHOR Saransh Singh,
Lawrence Livermore National Lab,
[email protected]
@DATE 11/23/2020 SS 1.0 original
@DETAIL. this list of symbols will help us to genrate the point group symmetries
in the cartesian space for any point group. this is needed for the
supergroup symmetry usd in the coloring scheme used in the package. this
needs to be a separate set of routines because the supergroup can be a
point group which is not the laue group of the crystal (e.g. m-3 --> m-3m)
the notation used will be the same as the one used for the space group
without any translations.
@DETAIL. this list of symbols will help us to genrate
the point group symmetries in the cartesian
space for any point group. this is needed for
the supergroup symmetry usd in the coloring
scheme used in the package. this needs to be a
separate set of routines because the supergroup
can be a point group which is not the laue group
of the crystal (e.g. m-3 --> m-3m) the notation
used will be the same as the one used for the
space group without any translations.
'''
SYM_GL_PG = {
'c1': '1a', # only identity rotation
Expand Down
6 changes: 3 additions & 3 deletions hexrd/findorientations.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def generate_orientation_fibers(cfg, eta_ome):
pd = eta_ome.planeData
tTh = pd.getTTh()
bMat = pd.latVecOps['B']
csym = pd.getLaueGroup()
csym = pd.laueGroup

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

qbar, _ = run_cluster(
completeness, qfib, plane_data.getQSym(), cfg,
qbar, cl = run_cluster(
completeness, qfib, plane_data.q_sym, cfg,
min_samples=min_samples,
compl_thresh=compl_thresh,
radius=cl_radius)
Expand Down
9 changes: 1 addition & 8 deletions hexrd/instrument/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,14 +1131,7 @@ def make_powder_rings(

# in case you want to give it tth angles directly
if isinstance(pd, PlaneData):
# Okay, we have a PlaneData object
try:
pd = pd.makeNew() # make a copy to munge
except TypeError:
# !!! have some other object here,
# likely a dummy plane data object of sorts
raise

pd = PlaneData(None, pd)
if delta_tth is not None:
pd.tThWidth = np.radians(delta_tth)
else:
Expand Down
Loading

0 comments on commit 6c49fbb

Please sign in to comment.