Skip to content

convenience function to compute frequency from wavelength #1746

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

Open
tylerflex opened this issue Jun 7, 2024 · 0 comments
Open

convenience function to compute frequency from wavelength #1746

tylerflex opened this issue Jun 7, 2024 · 0 comments

Comments

@tylerflex
Copy link
Collaborator

would be nice to provide a shortcut to compute frequency from wavelength as we use frequency generally internally and lots of users work with wavelengths. In our examples and internally, we often have freq = td.C_0 / wavelength, but it would be nice for users to do this conversion without needing to know the formula.

Add a new utility function td.frequency(wavelength) that computes the frequency from a wavelength in um.

Perhaps we can define it in tidy3d/constants.py.

Then we should probably replace all instances of td.C_0 / wavelength with this function in both the source code and also the docs.

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

No branches or pull requests

1 participant