You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
effmass/analysis.py imports integrate by name, however the mass_integration function uses the qualified scipy.integrate.quad. This leads to an error in line outputs.print_results(segments[-1], data, settings), which fails with the following traceback:
---------------------------------------------------------------------------NameErrorTraceback (mostrecentcalllast)
<ipython-input-26-204cc925e032>in<module>()
---->1outputs.print_results(segments[-1], data, settings)
~/Projects/joss-reviews/effmass/effmass/outputs.pyinprint_results(segment, data, settings, polyfit_order)
136polyfit_order=polyfit_order)]))
137print("optical mass at band edge (assuming the Kane dispersion) is {:.2f}".
-->138format(segment.optical_effmass_kane_dispersion()))
139140plt.figure(figsize=(8, 8))
~/Projects/joss-reviews/effmass/effmass/analysis.pyinoptical_effmass_kane_dispersion(self, fermi_level, temp, alpha, mass_bandedge, upper_limit)
488alpha=alpha,
489mass_bandedge=mass_bandedge,
-->490upper_limit=upper_limit)
491bottom=self.weight_integration(
492fermi_level=fermi_level,
~/Projects/joss-reviews/effmass/effmass/analysis.pyinmass_integration(self, fermi_level, temp, alpha, mass_bandedge, upper_limit)
334fermi_level=self.fermi_energyiffermi_levelisNoneelsefermi_level335-->336result=scipy.integrate.quad(
337self._mass_integrand,
3380,
NameError: name'scipy'isnotdefined
Fixing scipy.integrate.quad -> integrate.quad should fix this.
Also affects the lines where optical mass is calculated in the Jupyter Notebook examples, e.g. optical_mass_111 = [segments[-6].optical_effmass_kane_dispersion(fermi_level=data.CBM+burstein_moss_kane(x,average_mass,average_alpha),alpha=0.16/ev_to_hartree,mass_bandedge=0.155,upper_limit=0.1) for x in concentrations]
effmass/analysis.py
importsintegrate
by name, however themass_integration
function uses the qualifiedscipy.integrate.quad
. This leads to an error in lineoutputs.print_results(segments[-1], data, settings)
, which fails with the following traceback:Fixing
scipy.integrate.quad
->integrate.quad
should fix this.I also suggest writing a test for this code path.
(Part of openjournals/joss-reviews#797)
The text was updated successfully, but these errors were encountered: