Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes + new plotting functions #308

Merged
merged 8 commits into from
Feb 4, 2025
Merged

Conversation

jbouquiaux
Copy link
Contributor

Summary

embedding/embedding_ifc

  • Fix ASR
  • add possibility to put NAC params for interstitial

lumi

  • Combine plotting functions form multi-D and 1-D case.

dfpt/converters

  • Fix compatibility issue with new refactoring of force constants functions in phonopy.

abipy/embedding/embedding_ifc.py Outdated Show resolved Hide resolved
@@ -16,13 +16,13 @@


try:
import phonopy
import phonopy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phonopy now is listed in requirements.txt so we don't need to catch ImportError

ax.set_xlabel('Phonon energy (eV)')
ax.set_ylabel(r'$S(\hbar\omega)$ (1/eV)')

return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I would this function to return a Figure instance

ax.set_ylabel(r'Intensity (a.u.)')
x_eV,y_eV=self.L_hw(T=T,lamb=lamb,w=w)
plot_emission_spectrum_help(x_eV,y_eV,unit,max_to_one,ax,**kwargs)
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return plot_emission_spectrum_help ?

ax.set_xlabel(r'Photon wavelength (nm))')
ax.set_ylabel(r'Intensity (a.u.)')

return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decorator add_fig_kwargs expected the decorated function to return a matplotlib figure


G_t = np.exp(S-S_0+C_plus+C_minus-2*C_0)

return (t, G_t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return t, G_t is more pythonic

@gmatteo gmatteo self-requested a review February 4, 2025 13:55
@gmatteo gmatteo merged commit a4a6c59 into abinit:develop Feb 4, 2025
1 of 3 checks passed
@gmatteo
Copy link
Member

gmatteo commented Feb 4, 2025

Thanks for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants