Skip to content

Commit 9f59078

Browse files
authored
Update summary_statistics.yml
1 parent 0894436 commit 9f59078

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

.github/workflows/summary_statistics.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -80,45 +80,45 @@ jobs:
8080
8181
return ds
8282
83-
# read in tifs
84-
veloc_ds = combine_ds(data_dir='glacier_image_correlation', file_type='horizontal_velocity')
85-
# calculate and save median velocity
86-
veloc_da_median = veloc_ds.horizontal_velocity.median(dim='dates')
87-
# veloc_da_median.rio.to_raster('glacier_image_correlation/median_horizontal_velocity.tif')
88-
# save standard deviation of velocity
89-
veloc_da_stdev = veloc_ds.horizontal_velocity.std(dim='dates')
90-
# veloc_da_stdev.rio.to_raster('glacier_image_correlation/stdev_horizontal_velocity.tif')
91-
# save valid velocity pixel count
92-
veloc_da_count = veloc_ds.horizontal_velocity.count(dim='dates')
93-
# veloc_da_count.rio.to_raster('glacier_image_correlation/count_horizontal_velocity.tif')
83+
# read in tifs
84+
veloc_ds = combine_ds(data_dir='glacier_image_correlation', file_type='horizontal_velocity')
85+
# calculate and save median velocity
86+
veloc_da_median = veloc_ds.horizontal_velocity.median(dim='dates')
87+
# veloc_da_median.rio.to_raster('glacier_image_correlation/median_horizontal_velocity.tif')
88+
# save standard deviation of velocity
89+
veloc_da_stdev = veloc_ds.horizontal_velocity.std(dim='dates')
90+
# veloc_da_stdev.rio.to_raster('glacier_image_correlation/stdev_horizontal_velocity.tif')
91+
# save valid velocity pixel count
92+
veloc_da_count = veloc_ds.horizontal_velocity.count(dim='dates')
93+
# veloc_da_count.rio.to_raster('glacier_image_correlation/count_horizontal_velocity.tif')
9494
95-
# plot summary statistics
96-
sns.set_theme()
97-
f, ax = plt.subplots(1, 3, figsize=(15, 5), sharex=True, sharey=True)
98-
veloc_da_median.plot(ax=ax[0], vmin=0, vmax=600, cmap='inferno', cbar_kwargs= {'shrink':0.7, 'label':'velocity (m/yr)'})
99-
veloc_da_stdev.plot(ax=ax[1], vmin=0, vmax=300, cmap='cividis', cbar_kwargs= {'shrink':0.7, 'label':'standard deviation (m/yr)'})
100-
veloc_da_count.plot(ax=ax[2], vmin=0, cmap='Blues', cbar_kwargs= {'shrink':0.7, 'label':'pixel count'})
101-
ax[0].set_aspect('equal')
102-
ax[1].set_aspect('equal')
103-
ax[2].set_aspect('equal')
104-
ax[0].set_title(f'median velocity')
105-
ax[1].set_title(f'velocity standard deviation')
106-
ax[2].set_title(f'valid pixel count')
107-
ax[0].set_xticks([])
108-
ax[0].set_yticks([])
109-
ax[1].set_xticks([])
110-
ax[1].set_yticks([])
111-
ax[2].set_xticks([])
112-
ax[2].set_yticks([])
113-
ax[0].set_xlabel('')
114-
ax[0].set_ylabel('')
115-
ax[1].set_xlabel('')
116-
ax[1].set_ylabel('')
117-
ax[2].set_xlabel('')
118-
ax[2].set_ylabel('')
119-
f.tight_layout()
120-
121-
f.savefig('glacier_image_correlation/velocity_summary_statistics.png', dpi=300)
95+
# plot summary statistics
96+
sns.set_theme()
97+
f, ax = plt.subplots(1, 3, figsize=(15, 5), sharex=True, sharey=True)
98+
veloc_da_median.plot(ax=ax[0], vmin=0, vmax=600, cmap='inferno', cbar_kwargs= {'shrink':0.7, 'label':'velocity (m/yr)'})
99+
veloc_da_stdev.plot(ax=ax[1], vmin=0, vmax=300, cmap='cividis', cbar_kwargs= {'shrink':0.7, 'label':'standard deviation (m/yr)'})
100+
veloc_da_count.plot(ax=ax[2], vmin=0, cmap='Blues', cbar_kwargs= {'shrink':0.7, 'label':'pixel count'})
101+
ax[0].set_aspect('equal')
102+
ax[1].set_aspect('equal')
103+
ax[2].set_aspect('equal')
104+
ax[0].set_title(f'median velocity')
105+
ax[1].set_title(f'velocity standard deviation')
106+
ax[2].set_title(f'valid pixel count')
107+
ax[0].set_xticks([])
108+
ax[0].set_yticks([])
109+
ax[1].set_xticks([])
110+
ax[1].set_yticks([])
111+
ax[2].set_xticks([])
112+
ax[2].set_yticks([])
113+
ax[0].set_xlabel('')
114+
ax[0].set_ylabel('')
115+
ax[1].set_xlabel('')
116+
ax[1].set_ylabel('')
117+
ax[2].set_xlabel('')
118+
ax[2].set_ylabel('')
119+
f.tight_layout()
120+
121+
f.savefig('glacier_image_correlation/velocity_summary_statistics.png', dpi=300)
122122
123123
- name: Upload summary statistics
124124
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)