radis
radis copied to clipboard
Use astropy units in rescale_path_length()
🎯 Todo
Would allow this syntax, to change the column length of an already computed spectrum :
# preparing a test spectrum :
import radis
s = radis.test_spectrum()
# rescaling :
import astropy.units as u
s.rescale_path_length(1 * u.km).plot() # currently not valid
💡 Possible implementations
Related to #57
Tip : you can vote for New Features on https://feathub.com/radis/radis
@erwanp sounds interesting! I would like to tackle this problem.
#55 introduced a convert_and_strip_units() function, it may be used directly. The core of the PR work will be to add the corresponding small unit tests
Closing, as already been resolved in PR: https://github.com/radis/radis/pull/445