Skip to content

Commit 057e656

Browse files
committed
added color map for photon classifications
1 parent 53d083f commit 057e656

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/algorithm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def phread(resource, asset, region):
8787
# Build ATL06 Request
8888
parms = { "poly": region,
8989
"cnf": icesat2.CNF_SURFACE_HIGH,
90-
"atl08_class": ["atl08_noise", "atl08_ground", "atl08_canopy", "atl08_top_of_canopy"],
90+
"pass_invalid": True,
91+
"atl08_class": ["atl08_noise", "atl08_ground", "atl08_canopy", "atl08_top_of_canopy", "atl08_unclassified"],
9192
"ats": 20.0,
9293
"cnt": 10,
9394
"len": 40.0,
@@ -147,7 +148,8 @@ def plotresults(act, exp, ph, region):
147148
ax3 = plt.subplot(133)
148149
ax3.set_title("Photon Cloud")
149150
ph_gt1r = ph[ph["pair"] == icesat2.RIGHT_PAIR]
150-
ax3.scatter(ph_gt1r["time"], ph_gt1r["height"].values, c=ph_gt1r["info"], cmap='winter_r', s=0.1)
151+
colormap = np.array(['c','b','g','g','y'])
152+
ax3.scatter(ph_gt1r["time"], ph_gt1r["height"].values, c=colormap[ph_gt1r["info"]], s=0.2)
151153
act_gt1r = act_gt1r[(act_gt1r.geometry.y > min(box_lat)) & (act_gt1r.geometry.y < max(box_lat))]
152154
act_gt1r = act_gt1r[(act_gt1r.geometry.x > min(box_lon)) & (act_gt1r.geometry.x < max(box_lon))]
153155
ax3.scatter(act_gt1r["time"], act_gt1r["h_mean"].values, color='r', s=0.5)

0 commit comments

Comments
 (0)