Skip to content

Commit

Permalink
hotfix + minor code space savings
Browse files Browse the repository at this point in the history
  • Loading branch information
pc494 committed Sep 2, 2020
1 parent a9c6e38 commit 3cbb7d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions diffsims/generators/diffraction_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ def __init__(
"This class changed in v0.3 and no longer takes a maximum_excitation_error"
)
self.wavelength = get_electron_wavelength(accelerating_voltage)
self.scatterng_params = get_scattering_params_dict(scattering_params)
self.debye_waller_factors = debye_waller_factors
if scattering_params in ["lobato","xtables"]:
self.scattering_params = scattering_params
else:
raise NotImplementedError(
"The scattering parameters `{}` is not implemented. "
"See documentation for available "
"implementations.".format(scattering_params)
)

def calculate_ed_data(
self,
Expand Down Expand Up @@ -170,7 +177,6 @@ def calculate_ed_data(
prefactor=shape_factor,
scattering_params=self.scattering_params,
debye_waller_factors=self.debye_waller_factors,
**kwargs
)

# Threshold peaks included in simulation based on minimum intensity.
Expand Down

0 comments on commit 3cbb7d5

Please sign in to comment.