Skip to content

Commit

Permalink
DAS-1885: Mid-flight update to regression tests. (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear committed Aug 7, 2023
1 parent d210ce5 commit 55b29b9
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 51 deletions.
38 changes: 20 additions & 18 deletions test/hybig/HyBIG_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@
" 'width': 3601,\n",
" 'height': 3601,\n",
" 'crs': CRS.from_epsg(4326),\n",
" 'transform': Affine(0.000277777777777778, 0.0, 21.9998611111111,\n",
" 0.0, -0.000277777777777778, 1.00013888888889)\n",
" 'transform': Affine(0.09997222993612885, 0.0, -180.0,\n",
" 0.0, -0.049986114968064425, 90.0)\n",
"}\n",
"aster_basename = 'ASTGTMV003_N00E022_dem'"
]
Expand Down Expand Up @@ -176,7 +176,7 @@
" harmony_client.wait_for_processing(aster_job_id, show_progress=True)\n",
"\n",
" reference_files = build_file_list(aster_basename, reference_dir, 'PNG')\n",
"\n",
" \n",
" with TemporaryDirectory() as temp_dir:\n",
" downloaded_grid_outputs = [\n",
" file_future.result()\n",
Expand All @@ -190,7 +190,7 @@
" print_success('all test files generated')\n",
"\n",
" expected_output_metadata = {\n",
" 'driver': 'PNG', **common_aster_metadata, 'count': 4\n",
" 'driver': 'PNG', **common_aster_metadata, 'count': 1\n",
" }\n",
" \n",
" assert_dataset_produced_correct_results(\n",
Expand Down Expand Up @@ -272,19 +272,11 @@
"source": [
"common_measures_metadata = {\n",
" 'dtype': 'uint8',\n",
" 'nodata': None,\n",
" 'nodata': 255.0,\n",
" 'width': 7200,\n",
" 'height': 3600,\n",
" 'count': 3,\n",
" 'crs': CRS.from_wkt('GEOGCS[\"Unknown datum based upon the Clarke 1866 ellipsoid\",'\n",
" 'DATUM[\"Not_specified_based_on_Clarke_1866_spheroid\",'\n",
" 'SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898,'\n",
" 'AUTHORITY[\"EPSG\",\"7008\"]]],'\n",
" 'PRIMEM[\"Greenwich\",0],'\n",
" 'UNIT[\"degree\",0.0174532925199433,'\n",
" 'AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]]'),\n",
" 'transform': Affine(0.05000000000000001, 0.0, -180.0,\n",
" 0.0, -0.05000000000000001, 90.0)\n",
" 'crs': CRS.from_epsg(4326),\n",
" 'transform': Affine(0.05, 0.0, -180.0, 0.0, -0.05, 90.0)\n",
"}\n",
"measures_base = 'VCF5KYR_1991001_001_2018224205008'"
]
Expand All @@ -303,7 +295,9 @@
"cell_type": "code",
"execution_count": null,
"id": "94f40d81",
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"if environment_information is not None:\n",
Expand All @@ -330,7 +324,7 @@
" print_success('all test files generated')\n",
"\n",
" expected_output_metadata = {\n",
" 'driver': 'PNG', **common_measures_metadata\n",
" 'driver': 'PNG', 'count':1, **common_measures_metadata\n",
" }\n",
"\n",
" assert_dataset_produced_correct_results(\n",
Expand Down Expand Up @@ -382,7 +376,7 @@
" print_success('all test files generated')\n",
"\n",
" expected_output_metadata = {\n",
" 'driver': 'JPEG', **common_measures_metadata\n",
" **common_measures_metadata, 'driver': 'JPEG','count': 3, 'nodata':None, \n",
" }\n",
"\n",
" assert_dataset_produced_correct_results(\n",
Expand All @@ -393,6 +387,14 @@
"else:\n",
" print('Skipping test: HyBIG regression tests not configured for this environment.')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ada810a9",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
8 changes: 4 additions & 4 deletions test/hybig/reference_data/ASTGTMV003_N00E022_dem.jgw
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
0.000277777777777778
0.09997222993612885
0.0
0.0
-0.000277777777777778
21.99999999999999
1.000000000000001
-0.049986114968064425
-179.95001388503192
89.97500694251596
Binary file modified test/hybig/reference_data/ASTGTMV003_N00E022_dem.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<PAMDataset>
<SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]</SRS>
<GeoTransform> 2.1999861111111102e+01, 2.7777777777777799e-04, 0.0000000000000000e+00, 1.0001388888888900e+00, 0.0000000000000000e+00, -2.7777777777777799e-04</GeoTransform>
<GeoTransform> -1.8000000000000000e+02, 9.9972229936128851e-02, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.9986114968064425e-02</GeoTransform>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="COMPRESSION">JPEG</MDI>
<MDI key="INTERLEAVE">PIXEL</MDI>
Expand Down
8 changes: 4 additions & 4 deletions test/hybig/reference_data/ASTGTMV003_N00E022_dem.pgw
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
0.000277777777777778
0.09997222993612885
0.0
0.0
-0.000277777777777778
21.99999999999999
1.000000000000001
-0.049986114968064425
-179.95001388503192
89.97500694251596
Binary file modified test/hybig/reference_data/ASTGTMV003_N00E022_dem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions test/hybig/reference_data/ASTGTMV003_N00E022_dem.png.aux.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<PAMDataset>
<SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]</SRS>
<GeoTransform> 2.1999861111111102e+01, 2.7777777777777799e-04, 0.0000000000000000e+00, 1.0001388888888900e+00, 0.0000000000000000e+00, -2.7777777777777799e-04</GeoTransform>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">PIXEL</MDI>
</Metadata>
<GeoTransform> -1.8000000000000000e+02, 9.9972229936128851e-02, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.9986114968064425e-02</GeoTransform>
</PAMDataset>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
0.05
0.0
0.0
-0.05
-179.975
89.975

This file was deleted.

Binary file modified test/hybig/reference_data/VCF5KYR_1991001_001_2018224205008.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<PAMDataset>
<SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["Unknown datum based upon the Clarke 1866 ellipsoid",DATUM["Not_specified_based_on_Clarke_1866_spheroid",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 5.0000000000000010e-02, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -5.0000000000000010e-02</GeoTransform>
<SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 5.0000000000000003e-02, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -5.0000000000000003e-02</GeoTransform>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="COMPRESSION">JPEG</MDI>
<MDI key="INTERLEAVE">PIXEL</MDI>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
0.05
0.0
0.0
-0.05
-179.975
89.975

This file was deleted.

Binary file modified test/hybig/reference_data/VCF5KYR_1991001_001_2018224205008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<PAMDataset>
<SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["Unknown datum based upon the Clarke 1866 ellipsoid",DATUM["Not_specified_based_on_Clarke_1866_spheroid",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 5.0000000000000010e-02, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -5.0000000000000010e-02</GeoTransform>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">PIXEL</MDI>
</Metadata>
<SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 5.0000000000000003e-02, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -5.0000000000000003e-02</GeoTransform>
</PAMDataset>
2 changes: 1 addition & 1 deletion test/hybig/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2

0 comments on commit 55b29b9

Please sign in to comment.