-
-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix low temperature problem of Van Regemorter approximation (#1992)
* Fix low temperature problem of Van Regemorter approximation * Add test for function in Van Regemorter approximation * Fix test * Fix test 2
- Loading branch information
Showing
2 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import pytest | ||
import numpy as np | ||
from numpy.testing import assert_allclose | ||
from tardis.plasma.properties import YgData | ||
|
||
|
||
def test_exp1_times_exp(): | ||
x = np.array([499.0, 501.0, 710.0]) | ||
desired = np.array([0.00200000797, 0.0019920397, 0.0014064725]) | ||
actual = YgData.exp1_times_exp(x) | ||
assert_allclose(actual, desired) |