-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add Spatial frequency, with spectral equivalence support #38
Conversation
Hey I'm glad this was easy :) This looks correct to me but I'd like @jzuhone to take a look as well. I guess |
Yes indeed Wavenumbers are very popular with those who do infrared spectroscopy. The other avenue I considered before diving into the code itself was allowing equivalence translations to take the inverse of any requested unit (as the information to get to |
Currently at O’Hare with my family catching a plane back to Boston, but i’ll look at this tonight. |
@jzuhone no rush! |
Looks good—definitely supportive of adding angular frequencies here. |
Regarding wave numbers, John and I were talking privately over slack about this PR and I realized that there might be a natural way to accomodate them in the library. The reason I was hesitant to call What do you think about saying, in
That should make it possible to do e.g.:
And it would return a wavenumber unit appropriate for whatever unit system you've chosen to adopt. That doesn't have to be part of this pull request, but if you'd be interested in doing a followup that implements this I'd definitely be ok with merging. In fact I think I'm going to merge this pull request right now along with a quick fix for one of the docstring changes (just expanding the latex formula to include nu_bar). |
I spoke to @ngoldbaum briefly at Scipy2018 about the spectral equivalence and the units my particular sector of spectroscopy uses. In particular we use wavenumbers (1/cm) extensively.
This PR adds a spatial frequency dimension
1 / (length)
, and then makes thespectral
equivalence able to convert to and from spatial_freqency units.I considered adding
wn
as a unit (equivalent to1/cm
), but concluded that would likely be better suited to my more specific packages. If the maintainers would like to add it, let me know, perfectly willing to submit such a PR.