-
Notifications
You must be signed in to change notification settings - Fork 8
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
enh: added option to smooth LDOS grid with Gaussian smoothing from sisl #123
Conversation
Just an idea, you could let |
Yes I like it! You can see my implementation in commit cf3d5ec. |
I see! Yes that is much better :-) |
hubbard/plot/spectrum.py
Outdated
grid_i.grid = grid | ||
|
||
# In Ref. [ACS Nano, Vol. 12, No. 7, p. 7048-7056] they use r=0.6 Angstroms to simulate the Gaussian-shaped tip | ||
grid_i = grid_i.smooth(**kwargs["smooth"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this what you want, but this will always smooth it?
But if the user doesn't pass any arguments for |
Otherwise it can just first check if the |
No, it will use the default values, https://zerothi.github.io/sisl/api/generated/sisl.Grid.html?highlight=smooth#sisl.Grid.smooth Remember that kwargs for a zero length dict is effectively passing no arguments. I think it is safest to check whether the argument exist (checking the length would not allow users to use default values). |
I see. Forgot to check which were the default values of the method. Thanks!
I just saw again what you wrote in #123 (comment), didn't see the first line before hehe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
mnt: let smooth be a dictionary and updated test mnt: pass smooth dict directly to the sisl function mnt: check wether smooth argument exists before smoothing the grid
Added possibility to smooth the real space grid with Gaussian smoothing for LDOS plots.