These are chat archives for astropy/astropy

Apr 2017
Hans Moritz Günther
Apr 12 2017 01:44
I'm looking for a way to transform flux densities in quantity: ```
In [4]: e2 = u.equivalencies.spectral_density(1. u.keV)
...: (1.5
u.photon/u.cm2/u.s/u.keV).to(u.photon / u.cm2 / u.s / u.Angstrom, equivalencies=e2)
UnitConversionError: 'ph / (cm2 keV s)' and 'ph / (Angstrom cm2 s)' (photon flux density wav) are not convertible
units.equivalencies.spectral() can transform between keV and Angstrom, but apparently that does not work inside an u.equivalancies.spectral_density calculation. Any advice?