Skip to content

Commit

Permalink
update test_intersect
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmaurer committed Jul 18, 2023
1 parent af4bbcd commit be23ace
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 82 deletions.
16 changes: 16 additions & 0 deletions test/scenario_5/temp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
aoi_group:
bounding_box:
- 28
- 39
- -123
- -112
date_group:
date_end: '20200130'
date_start: '20200124'
date_step: 3
runtime_group:
output_directory: /Users/jlmd9g/software/RAiDER/test/scenario_5
weather_model_directory: /Users/jlmd9g/software/RAiDER/test/scenario_5/weather_files
time_group:
time: 00:00:00
weather_model: GMAO
11 changes: 8 additions & 3 deletions test/scenario_6/lat.hdr
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ENVI
samples = 226
lines = 45
description = {
lat.rdr}
samples = 7
lines = 7
bands = 1
header offset = 0
file type = ENVI Standard
data type = 5
data type = 4
interleave = bsq
byte order = 0
band names = {
Band 1}
data ignore value = -9999
Binary file modified test/scenario_6/lat.rdr
Binary file not shown.
18 changes: 0 additions & 18 deletions test/scenario_6/lat.rdr.vrt

This file was deleted.

11 changes: 8 additions & 3 deletions test/scenario_6/lon.hdr
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ENVI
samples = 226
lines = 45
description = {
lon.rdr}
samples = 7
lines = 7
bands = 1
header offset = 0
file type = ENVI Standard
data type = 5
data type = 4
interleave = bsq
byte order = 0
band names = {
Band 1}
data ignore value = -9999
Binary file modified test/scenario_6/lon.rdr
Binary file not shown.
13 changes: 4 additions & 9 deletions test/scenario_6/lon.rdr.aux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
<Metadata domain="ENVI">
<MDI key="bands">1</MDI>
<MDI key="byte_order">0</MDI>
<MDI key="data_type">5</MDI>
<MDI key="data_type">4</MDI>
<MDI key="file_type">ENVI Standard</MDI>
<MDI key="header_offset">0</MDI>
<MDI key="interleave">bsq</MDI>
<MDI key="lines">45</MDI>
<MDI key="samples">226</MDI>
<MDI key="lines">7</MDI>
<MDI key="samples">7</MDI>
</Metadata>
<PAMRasterBand band="1">
<Metadata>
<MDI key="STATISTICS_MAXIMUM">0</MDI>
<MDI key="STATISTICS_MEAN">-96.050506796609</MDI>
<MDI key="STATISTICS_MINIMUM">-101.6383676311</MDI>
<MDI key="STATISTICS_STDDEV">19.143507420765</MDI>
</Metadata>
<NoDataValue>-9.99900000000000E+03</NoDataValue>
</PAMRasterBand>
</PAMDataset>
18 changes: 0 additions & 18 deletions test/scenario_6/lon.rdr.vrt

This file was deleted.

Binary file removed test/scenario_6/warpedDEM.dem
Binary file not shown.
18 changes: 0 additions & 18 deletions test/scenario_6/warpedDEM.dem.aux.xml

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_6/warpedDEM.hdr

This file was deleted.

2 changes: 0 additions & 2 deletions test/scenario_6/wmtype

This file was deleted.

4 changes: 2 additions & 2 deletions test/test_intersect.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_cube_intersect(wm):
path_delays = os.path.join(SCENARIO_DIR, f'{wm}_hydro_{date}T{time.replace(":", "")}_ztd.tiff')
da = xrr.open_rasterio(path_delays, band_as_variable=True)['band_1']
hyd = da.sel(x=-117.8, y=33.4, method='nearest').item()
np.testing.assert_almost_equal(gold[wm], hyd)
np.testing.assert_almost_equal(gold[wm], hyd, decimal=4)

# Clean up files
shutil.rmtree(SCENARIO_DIR)
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_gnss_intersect(wm):

id = 'TORP'
td = df.set_index('ID').loc[id, 'totalDelay']
np.testing.assert_almost_equal(gold[wm], td.item())
np.testing.assert_almost_equal(gold[wm], td.item(), decimal=4)

shutil.rmtree(SCENARIO_DIR)
[os.remove(f) for f in glob.glob(f'{wm}*')]
Expand Down

0 comments on commit be23ace

Please sign in to comment.