66from astropy .utils .data import download_file
77from astropy .tests .helper import remote_data
88from astropy import units
9+ from astropy import constants as const
910
1011from ...stars import stellib
1112from ...stars .isochrone import ezIsoch
@@ -52,9 +53,11 @@ def test_make_kurucz_tlusty_spectral_grid():
5253 oiso = ezIsoch (iso_fname )
5354
5455 # define the distance
55- distanceModulus = 24.47 * units .mag
56- dmod = distanceModulus .value
57- distance = 10 ** ((dmod / 5. ) + 1 ) * units .pc
56+ distances = [24.47 ]
57+ distance_unit = units .mag
58+
59+ velocity = - 300 * units .km / units .s
60+ redshift = (velocity / const .c ).decompose ().value
5861
5962 # define the spectral libraries to use
6063 osl = stellib .Tlusty (filename = tlusty_fname ) \
@@ -65,8 +68,12 @@ def test_make_kurucz_tlusty_spectral_grid():
6568 add_spectral_properties_kwargs = dict (filternames = filters )
6669
6770 spec_fname = '/tmp/beast_example_phat_spec_grid.hd5'
68- spec_fname , g = make_spectral_grid ('test' , oiso , osl = osl ,
69- distance = distance ,
71+ spec_fname , g = make_spectral_grid ('test' ,
72+ oiso ,
73+ osl = osl ,
74+ redshift = redshift ,
75+ distance = distances ,
76+ distance_unit = distance_unit ,
7077 spec_fname = spec_fname ,
7178 filterLib = filter_fname ,
7279 add_spectral_properties_kwargs = add_spectral_properties_kwargs )
0 commit comments