Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate tests
- Loading branch information
Showing
5 changed files
with
31 additions
and
18 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
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
from .web import download # noqa: F401 | ||
from .io import load, loadcal # noqa: F401 | ||
from .projection import project_altitude # noqa: F401 |
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,24 @@ | ||
#!/usr/bin/env python | ||
from pathlib import Path | ||
import dascutils as du | ||
import pytest | ||
from pytest import approx | ||
|
||
R = Path(__file__).parent | ||
azelstem = R.parent/'cal/PKR_DASC_20110112' | ||
|
||
|
||
def test_projection(): | ||
dp = pytest.importorskip('dascutils.projection') | ||
|
||
data = du.load(R, azelstem) | ||
|
||
data = dp.project_altitude(data, 100.) | ||
|
||
assert data.mapping_alt_km == approx(100.) | ||
assert data.mapping_lat[266, 247] == approx(65.12351) | ||
assert data.mapping_lon[266, 247] == approx(-147.48196) | ||
|
||
|
||
if __name__ == '__main__': | ||
pytest.main(['-x', __file__]) |