Here is one way to define get_wv
:
import scipy.constants as pc
def get_wv(D0):
E = D0 * pc.kilo / pc.N_A # energy per molecule, J
lam = pc.h * pc.c / E # wavelength, m
return lam / pc.nano # return wavelength, nm