Use astropy.units.equivalencies.spectral
to compute wavelengths to energies.
#327
Labels
astropy.units.equivalencies.spectral
to compute wavelengths to energies.
#327
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
orconst.c
and find places where this product is divided by a length.The text was updated successfully, but these errors were encountered: