Skip to content

phonon_bands enable custom acoustic/optical bands #249

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

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

janosh
Copy link
Owner

@janosh janosh commented Nov 19, 2024

phonon_bands line_kwargs allow separate dicts for acoustic/optical modes or function taking (band_data, band_idx)
Callable[[np.ndarray, int], dict[str, Any]]

Example

red dashed for acoustic, blue dotted for optical

phonon-bands

…des or callable

new admissible types:
line_kwargs: dict[Literal["acoustic", "optical"], dict[str, Any]]
# function taking (band_data, band_idx)
| Callable[[np.ndarray, int], dict[str, Any]]
@janosh janosh added enhancement Improvement to existing features/functionality phonons Phonon bands and DOS plots labels Nov 19, 2024
@janosh janosh enabled auto-merge (squash) November 19, 2024 21:30
@janosh janosh merged commit 0d24ace into main Nov 19, 2024
48 of 49 checks passed
@janosh janosh deleted the phonon-custom-optical-acoustic-bands branch November 19, 2024 21:33
janosh added a commit that referenced this pull request Mar 28, 2025
* fix NaN handling in ptable_heatmap_splits_plotly

* phonon_bands line_kwargs allow separate dicts for acoustic/optical modes or callable

new admissible types:
line_kwargs: dict[Literal["acoustic", "optical"], dict[str, Any]]
# function taking (band_data, band_idx)
| Callable[[np.ndarray, int], dict[str, Any]]

* test_phonon_bands with acoustic/optical subdict and callable line_kwargs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing features/functionality phonons Phonon bands and DOS plots
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant