radis icon indicating copy to clipboard operation
radis copied to clipboard

Use astropy units in rescale_path_length()

Open erwanp opened this issue 3 years ago • 2 comments

🎯 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 avatar Apr 05 '22 16:04 erwanp

@erwanp sounds interesting! I would like to tackle this problem.

TranHuuNhatHuy avatar Apr 06 '22 00:04 TranHuuNhatHuy

#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

erwanp avatar Apr 06 '22 06:04 erwanp

Closing, as already been resolved in PR: https://github.com/radis/radis/pull/445

anandxkumar avatar Oct 28 '22 22:10 anandxkumar