Use `astropy.units.equivalencies.spectral` to compute wavelengths to energies.
Many places throughout the package, I convert wavelengths to energies through the formula $hc/\lambda$. Instead, we should be using the spectral equivalency provided by astropy units: https://docs.astropy.org/en/stable/units/equivalencies.html#equivalencies.
The easiest way to do this is probably to search on const.h or const.c and find places where this product is divided by a length.
Might need to be careful if this is used for any spectral emissions. The intensity of some emission process $I(\lambda) \neq I(E)$. Instead, $I(\lambda) d\lambda = - I(E) dE$, so there's an extra factor $\frac{dE}{d\lambda} = - \frac{hc}{\lambda^2}$.
This gets me every single time I convert spectra between wavelength and energy space (X-rays). Can / Does astropy deal with this automatically?