1010
1111@pytest .mark .network
1212class TestParquet :
13- def test_parquet (self , domain , asset , organization ):
13+ def test_atl06 (self , domain , asset , organization ):
1414 icesat2 .init (domain , organization = organization )
1515 resource = "ATL03_20190314093716_11600203_005_01.h5"
1616 region = icesat2 .toregion (os .path .join (TESTDIR , "data/dicksonfjord.geojson" ))
@@ -24,11 +24,32 @@ def test_parquet(self, domain, asset, organization):
2424 "maxi" : 1 ,
2525 "output" : { "path" : "testfile.parquet" , "format" : "parquet" , "open_on_complete" : True } }
2626 gdf = icesat2 .atl06p (parms , asset = asset , resources = [resource ])
27- assert len (gdf ) == 256
27+ assert len (gdf ) == 964
2828 assert len (gdf .keys ()) == 17
2929 assert gdf ["rgt" ][0 ] == 1160
3030 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
3333 os .remove ("testfile.parquet" )
3434
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