Skip to content

Commit ea0ef7c

Browse files
committed
update continuum test data
1 parent 0b5bffc commit ea0ef7c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed
Binary file not shown.

fiasco/tests/idl/test_idl_continuum.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ def test_idl_compare_free_bound(idl_env, all_ions, idl_input_args, dbase_version
9595
['free_bound'],
9696
'freebound_all_ions',
9797
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')})
9999
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
102100
# Compare IDL and Python calculation
103101
assert u.allclose(idl_result['free_bound'], free_bound_python, atol=None, rtol=0.005)
104102

@@ -128,16 +126,14 @@ def test_idl_compare_free_bound_ion(idl_env, all_ions, idl_input_args, dbase_ver
128126
free_bound_python = ion.free_bound(idl_input_args['wavelength'])
129127
except MissingDatasetException:
130128
continue
131-
# NOTE: our expression does not include the 1/4π per steradian
132-
free_bound_python /= 4*np.pi
133129
args = {**idl_input_args, 'atomic_number':ion.atomic_number, 'ionization_stage':ion.ionization_stage}
134130
idl_result = run_idl_script(idl_env,
135131
script,
136132
args,
137133
['free_bound'],
138134
f'freebound_{ion.atomic_number}_{ion.ionization_stage}',
139135
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')},
141137
write_file=False)
142138
# Compare IDL and Python calculation
143139
assert u.allclose(idl_result['free_bound'], free_bound_python, atol=None, rtol=0.006)

0 commit comments

Comments
 (0)