-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added unit tests for asinh mag and changed part to add columns
- Loading branch information
1 parent
fc0c31b
commit 6c07ac4
Showing
2 changed files
with
55 additions
and
21 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,17 @@ | ||
from ..mdet import _compute_asinh_dered_mag, _compute_asinh_flux, _compute_asinh_mags | ||
|
||
|
||
def test_compute_asinh_flux(): | ||
# this test ensures the function computes magnitudes and fluxes correctly. | ||
flux_input = 10000 | ||
mag_g = _compute_asinh_mags(flux_input, 0) | ||
flux_g = _compute_asinh_flux(mag_g, 0) | ||
|
||
assert flux_input == flux_g | ||
|
||
def test_compute_asinh_dered_mag(): | ||
flux_input = 10000 | ||
mag_g = _compute_asinh_mags(flux_input, 0) | ||
dered_mag_g = _compute_asinh_dered_mag(flux_input, 0, 1/3.186) | ||
|
||
assert mag_g == dered_mag_g |