-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
47 additions
and
5 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,26 @@ | ||
import pytest | ||
from asp_plot.bundle_adjust import ReadResiduals, PlotResiduals | ||
import matplotlib | ||
import geopandas as gpd | ||
|
||
matplotlib.use("Agg") | ||
|
||
|
||
class TestBundleAdjust: | ||
@pytest.fixture | ||
def residual_files(self): | ||
directory = "tests/test_data/" | ||
ba_prefix = "ba/ba" | ||
return ReadResiduals(directory, ba_prefix) | ||
|
||
def test_get_residual_gdfs(self, residual_files): | ||
resid_init, resid_final = residual_files.get_residual_gdfs() | ||
assert isinstance(resid_init, gpd.GeoDataFrame) | ||
assert isinstance(resid_final, gpd.GeoDataFrame) | ||
|
||
def test_plot_n_residuals(self, residual_files): | ||
resid_init, resid_final = residual_files.get_residual_gdfs() | ||
try: | ||
PlotResiduals([resid_init, resid_final]).plot_n_residuals(column_name="mean_residual") | ||
except Exception as e: | ||
pytest.fail(f"figure method raised an exception: {str(e)}") |
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,7 @@ | ||
# lon, lat, height_above_datum, mean_residual, num_observations | ||
# Geodetic Datum --> Name: WGS_1984 Spheroid: WGS 84 Semi-major axis: 6378137 Semi-minor axis: 6356752.3142451793 Meridian: Greenwich at 0 Proj4 Str: +proj=longlat +datum=WGS84 +no_defs | ||
-156.8787621266714, 71.271874841087325, -0.36491041881727709, 0.27929182170458566, 2 | ||
-156.8780547480608, 71.275398550769182, 0.26183095769151948, 0.091659615252865478, 2 | ||
-156.87727580996784, 71.286145888801144, -0.91625511622648326, 0.052193733525443042, 2 | ||
-156.87470631386205, 71.290327538976598, -1.5761793022808819, 0.23095878065626796, 2 | ||
-156.87364518396637, 71.27818895086348, -0.7222090013486745, 0.12443687149487473, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# lon, lat, height_above_datum, mean_residual, num_observations | ||
# Geodetic Datum --> Name: WGS_1984 Spheroid: WGS 84 Semi-major axis: 6378137 Semi-minor axis: 6356752.3142451793 Meridian: Greenwich at 0 Proj4 Str: +proj=longlat +datum=WGS84 +no_defs | ||
-156.87876206140302, 71.271875132031866, -0.42092562742504364, 0.19631815744360209, 2 | ||
-156.87805391399652, 71.275398639905859, 0.22662260452218885, 0.38524321762160979, 2 | ||
-156.87727461766127, 71.286145872610589, -0.93934368885776565, 0.52892293474772789, 2 | ||
-156.87470605883939, 71.290327757295771, -1.6203314659331238, 0.24375310456064955, 2 | ||
-156.87527466499779, 71.276976449943888, -63.30750525606679, 19.410683117621161, 2 | ||
-156.87364231464838, 71.27818852567637, -0.71749579571765587, 0.25425952709437116, 2 | ||
-156.87361011617145, 71.273405048961152, 0.040032582617270253, 0.53133591364021404, 2 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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