extinction icon indicating copy to clipboard operation
extinction copied to clipboard

Different wavelength units?

Open jvines opened this issue 5 years ago • 1 comments

Hi @kbarbary,

Would it be possible to implement different units for the wavelength to calculate the extinction?

jvines avatar Jun 28 '19 15:06 jvines

It's possible. It would just involve expanding this section: https://github.com/kbarbary/extinction/blob/master/extinction.pyx#L163-L166 in each of the functions, and adding a new convert wavelength function.

However, it may be easier to convert your inputs to inverse microns or angstroms. extinction provides two common options, but it's not meant to replace a real unit library like astropy.units, pint, or unyt.

kbarbary avatar Jun 28 '19 20:06 kbarbary