julia> using Unitful
julia> wn(f) = uconvert(u"cm^-1", float(f/Unitful.c))
wn (generic function with 1 method)
julia> 1u"THz" |> wn
33.3564095198152 cm⁻¹
I think you had the arguments in the wrong order.
julia> using Unitful
julia> wn(f) = uconvert(u"cm^-1", float(f/Unitful.c))
wn (generic function with 1 method)
julia> 1u"THz" |> wn
33.3564095198152 cm⁻¹
I think you had the arguments in the wrong order.