@@ -95,10 +95,8 @@ def test_idl_compare_free_bound(idl_env, all_ions, idl_input_args, dbase_version
95
95
['free_bound' ],
96
96
'freebound_all_ions' ,
97
97
dbase_version ,
98
- format_func = {'free_bound' : lambda x : x / 1e40 * u .Unit ('erg cm3 s-1 Angstrom-1' )})
98
+ format_func = {'free_bound' : lambda x : x * 4 * np . pi / 1e40 * u .Unit ('erg cm3 s-1 Angstrom-1' )})
99
99
free_bound_python = all_ions .free_bound (idl_result ['wavelength' ])
100
- # NOTE: our expression does not include the 1/4π per steradian
101
- free_bound_python /= 4 * np .pi
102
100
# Compare IDL and Python calculation
103
101
assert u .allclose (idl_result ['free_bound' ], free_bound_python , atol = None , rtol = 0.005 )
104
102
@@ -128,16 +126,14 @@ def test_idl_compare_free_bound_ion(idl_env, all_ions, idl_input_args, dbase_ver
128
126
free_bound_python = ion .free_bound (idl_input_args ['wavelength' ])
129
127
except MissingDatasetException :
130
128
continue
131
- # NOTE: our expression does not include the 1/4π per steradian
132
- free_bound_python /= 4 * np .pi
133
129
args = {** idl_input_args , 'atomic_number' :ion .atomic_number , 'ionization_stage' :ion .ionization_stage }
134
130
idl_result = run_idl_script (idl_env ,
135
131
script ,
136
132
args ,
137
133
['free_bound' ],
138
134
f'freebound_{ ion .atomic_number } _{ ion .ionization_stage } ' ,
139
135
dbase_version ,
140
- format_func = {'free_bound' : lambda x : x / 1e40 * u .Unit ('erg cm3 s-1 Angstrom-1' )},
136
+ format_func = {'free_bound' : lambda x : x * 4 * np . pi / 1e40 * u .Unit ('erg cm3 s-1 Angstrom-1' )},
141
137
write_file = False )
142
138
# Compare IDL and Python calculation
143
139
assert u .allclose (idl_result ['free_bound' ], free_bound_python , atol = None , rtol = 0.006 )
0 commit comments