tests: frequency to wavelength

I decided to keep it around because I know that some people would like
to see those nanometers. Let's make sure it works.

Change-Id: Ib279cc8380a77f478da7a2bbc1e045a718446404
This commit is contained in:
Jan Kundrát
2020-04-24 17:41:29 +02:00
parent 0aec47ddeb
commit 7ab93e7cd9

View File

@@ -131,6 +131,11 @@ freq2wavelength = constants.nu2lambda
def freq2wavelength(value):
""" Converts frequency units to wavelength units.
>>> round(freq2wavelength(191.35e12) * 1e9, 3)
1566.723
>>> round(freq2wavelength(196.1e12) * 1e9, 3)
1528.773
"""
return constants.c / value