10
10
11
11
@pytest .mark .network
12
12
class TestParquet :
13
- def test_parquet (self , domain , asset , organization ):
13
+ def test_atl06 (self , domain , asset , organization ):
14
14
icesat2 .init (domain , organization = organization )
15
15
resource = "ATL03_20190314093716_11600203_005_01.h5"
16
16
region = icesat2 .toregion (os .path .join (TESTDIR , "data/dicksonfjord.geojson" ))
@@ -24,11 +24,32 @@ def test_parquet(self, domain, asset, organization):
24
24
"maxi" : 1 ,
25
25
"output" : { "path" : "testfile.parquet" , "format" : "parquet" , "open_on_complete" : True } }
26
26
gdf = icesat2 .atl06p (parms , asset = asset , resources = [resource ])
27
- assert len (gdf ) == 256
27
+ assert len (gdf ) == 964
28
28
assert len (gdf .keys ()) == 17
29
29
assert gdf ["rgt" ][0 ] == 1160
30
30
assert gdf ["cycle" ][0 ] == 2
31
- assert gdf [" segment_id" ][ 0 ] > = 405240
32
- assert gdf [" segment_id" ][ 255 ] <= 405609
31
+ assert gdf [' segment_id' ]. describe ()[ "min" ] = = 405240
32
+ assert gdf [' segment_id' ]. describe ()[ "max" ] == 405915
33
33
os .remove ("testfile.parquet" )
34
34
35
+ def test_atl03 (self , domain , asset , organization ):
36
+ icesat2 .init (domain , organization = organization )
37
+ resource = "ATL03_20190314093716_11600203_005_01.h5"
38
+ region = icesat2 .toregion (os .path .join (TESTDIR , "data/dicksonfjord.geojson" ))
39
+ parms = { "poly" : region ['poly' ],
40
+ "raster" : region ['raster' ],
41
+ "cnf" : "atl03_high" ,
42
+ "ats" : 20.0 ,
43
+ "cnt" : 10 ,
44
+ "len" : 40.0 ,
45
+ "res" : 20.0 ,
46
+ "maxi" : 1 ,
47
+ "output" : { "path" : "testfile.parquet" , "format" : "parquet" , "open_on_complete" : True } }
48
+ gdf = icesat2 .atl03sp (parms , asset = asset , resources = [resource ])
49
+ assert len (gdf ) == 194696
50
+ assert len (gdf .keys ()) == 15
51
+ assert gdf ["rgt" ][0 ] == 1160
52
+ assert gdf ["cycle" ][0 ] == 2
53
+ assert gdf ['segment_id' ].describe ()["min" ] == 405240
54
+ assert gdf ['segment_id' ].describe ()["max" ] == 405915
55
+ os .remove ("testfile.parquet" )
0 commit comments