forked from DarkEnergySurvey/ugali
-
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.
Merge pull request DarkEnergySurvey#90 from kadrlica/y3-mw-dev
Updates from MW Satellite Census 2020
- Loading branch information
Showing
28 changed files
with
1,914 additions
and
967 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Generic python script. | ||
""" | ||
__author__ = "Alex Drlica-Wagner" | ||
|
||
import numpy as np | ||
import ugali.analysis.results | ||
|
||
def test_surface_brightness(): | ||
|
||
# Draco values from McConnachie et al. 2012 | ||
abs_mag = -8.8 | ||
app_mag = 10.6 | ||
distance = 76 #kpc | ||
distance_modulus = 19.40 | ||
a_half_arcmin = 10.0 # arcmin | ||
a_physical_kpc = 0.221 # kpc | ||
ellip = 0.31 | ||
mu0 = 26.1 # mag/arcsec^2 | ||
|
||
# Convert to azimuthally average | ||
r_half_arcmin = a_half_arcmin * np.sqrt(1-ellip) | ||
r_physical_kpc = a_physical_kpc * np.sqrt(1-ellip) | ||
|
||
mu1 = ugali.analysis.results.surfaceBrightness(abs_mag, r_physical_kpc, distance) | ||
mu2 = ugali.analysis.results.surfaceBrightness2(app_mag, r_half_arcmin) | ||
|
||
np.testing.assert_allclose(mu1,mu0,atol=2e-2) | ||
np.testing.assert_allclose(mu2,mu0,atol=2e-2) |
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
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
Oops, something went wrong.