-
Notifications
You must be signed in to change notification settings - Fork 35
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 #799 from karllark/add_acs_uv
adding in ACS SBC, WFC3 and ACS narrow, and JWST filters and enhancing the filter plotting routine
- Loading branch information
Showing
12 changed files
with
702 additions
and
223 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
33 changes: 33 additions & 0 deletions
33
beast/observationmodel/tests/test_filters_and_vega_consistent.py
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,33 @@ | ||
from astropy.table import QTable | ||
|
||
from beast.config import __ROOT__ | ||
from beast.tools import get_libfiles | ||
|
||
|
||
def test_filters_and_vega_consistent(): | ||
""" | ||
Test to ensure that the filters.hd5 and vega.hd5 are consistent. | ||
In other words, both have the same filters. | ||
""" | ||
|
||
# download the BEAST library files | ||
get_libfiles.get_libfiles(vega_filters_only=True) | ||
|
||
ftab = QTable.read(__ROOT__ + "filters.hd5", path="content") | ||
vtab = QTable.read(__ROOT__ + "vega.hd5", path="sed") | ||
|
||
otxt = "" | ||
for cfilt in ftab["TABLENAME"].data: | ||
if cfilt not in vtab["FNAME"].data: | ||
otxt = f"{otxt} {cfilt}" | ||
assert otxt == "", "filters in filters.hd5 missing from vega.hd5:" + otxt | ||
|
||
otxt = "" | ||
for cfilt in vtab["FNAME"].data: | ||
if cfilt not in ftab["TABLENAME"].data: | ||
otxt = f"{otxt} {cfilt}" | ||
assert otxt == "", "filters in vega.hd5 missing from filters.hd5:" + otxt | ||
|
||
|
||
if __name__ == "__main__": # pragma: no cover | ||
test_filters_and_vega_consistent() |
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.