@@ -120,9 +120,6 @@ def plotresults(act, exp, ph, region):
120
120
box_lon = [coord ["lon" ] for coord in region ]
121
121
box_lat = [coord ["lat" ] for coord in region ]
122
122
123
- # Sort Results by Time
124
- act = act .sort_values (by = ['delta_time' ])
125
-
126
123
# Create Plot
127
124
fig = plt .figure (num = None , figsize = (16 , 10 ))
128
125
@@ -141,18 +138,18 @@ def plotresults(act, exp, ph, region):
141
138
ax2 = plt .subplot (132 )
142
139
ax2 .set_title ("Along Track Elevations" )
143
140
act_gt1r = act [act ["gt" ] == icesat2 .GT1R ]
144
- ax2 .scatter (act_gt1r [ "time" ] .values , act_gt1r ["h_mean" ].values , s = 0.5 , color = 'b' , zorder = 3 )
141
+ ax2 .scatter (act_gt1r . index .values , act_gt1r ["h_mean" ].values , s = 0.5 , color = 'b' , zorder = 3 )
145
142
ax2 .scatter (exp ["time" ].values , exp ["h_mean" ].values , s = 1.5 , color = 'g' , zorder = 2 )
146
143
147
144
# Plot Photon Cloud
148
145
ax3 = plt .subplot (133 )
149
146
ax3 .set_title ("Photon Cloud" )
150
147
ph_gt1r = ph [ph ["pair" ] == icesat2 .RIGHT_PAIR ]
151
148
colormap = np .array (['c' ,'b' ,'g' ,'g' ,'y' ]) # noise, ground, canopy, top of canopy, unclassified
152
- ax3 .scatter (ph_gt1r [ "time" ] , ph_gt1r ["height" ].values , c = colormap [ph_gt1r ["info" ]], s = 1.5 )
149
+ ax3 .scatter (ph_gt1r . index . values , ph_gt1r ["height" ].values , c = colormap [ph_gt1r ["info" ]], s = 1.5 )
153
150
act_gt1r = act_gt1r [(act_gt1r .geometry .y > min (box_lat )) & (act_gt1r .geometry .y < max (box_lat ))]
154
151
act_gt1r = act_gt1r [(act_gt1r .geometry .x > min (box_lon )) & (act_gt1r .geometry .x < max (box_lon ))]
155
- ax3 .scatter (act_gt1r [ "time" ] , act_gt1r ["h_mean" ].values , color = 'r' , s = 0.5 )
152
+ ax3 .scatter (act_gt1r . index . values , act_gt1r ["h_mean" ].values , color = 'r' , s = 0.5 )
156
153
157
154
# Show Plot
158
155
fig .tight_layout ()
0 commit comments