Skip to content

Commit

Permalink
Retrieve multi-processed icesat (#59)
Browse files Browse the repository at this point in the history
The `Altimetry` class now contains functions for more intelligent requesting, filtering, and plotting of ICESat-2 ATL06 points from SlideRule.

The points are gathered at different processing levels for ground vs. canopy, they are filtered by user-selected ESA WorldCover classes, and they are temporally filtered by predefined times related to the DEM image collection date.

The saving and plotting of the different processing levels and their spatio-temporal filtered results are also improved.

Additional work on pc_align reporting improvements based on these subsets of points, and better profile plotting for DEM accuracy assessments will be done on separate PRs.
  • Loading branch information
bpurinton authored Nov 25, 2024
1 parent 5ae4380 commit eedc645
Show file tree
Hide file tree
Showing 10 changed files with 893 additions and 2,959 deletions.
664 changes: 440 additions & 224 deletions asp_plot/altimetry.py

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions asp_plot/cli/asp_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"--plot_icesat",
prompt=False,
default=True,
help="If True, plot an ICESat-2 difference plot with the DEM result. This requires internet connection to pull ICESat data. Default: True.",
help="If True, plot an ICESat-2 difference plot with the DEM result. This requires internet connection to request ICESat data. Default: True.",
)
@click.option(
"--report_filename",
Expand Down Expand Up @@ -159,28 +159,27 @@ def main(

# ICESat-2 comparison
if plot_icesat:
icesat = Altimetry(dem_fn=asp_dem)
icesat = Altimetry(directory=directory, dem_fn=asp_dem)

icesat.pull_atl06sr(
esa_worldcover=True,
icesat.request_atl06sr_multi_processing(
processing_levels=["ground"],
save_to_parquet=False,
)

icesat.filter_atl06sr(
mask_worldcover_water=True,
save_to_parquet=False,
save_to_csv=False,
)
icesat.filter_esa_worldcover(filter_out="water")

icesat.predefined_temporal_filter_atl06sr()

icesat.mapview_plot_atl06sr_to_dem(
title=f"Filtered ICESat-2 minus DEM (n={icesat.atl06sr_filtered.shape[0]})",
key="ground_seasonal",
save_dir=plots_directory,
fig_fn=f"{next(figure_counter):02}.png",
**ctx_kwargs,
)

icesat.histogram(
title=f"Filtered ICESat-2 minus DEM (n={icesat.atl06sr_filtered.shape[0]})",
key="ground_seasonal",
plot_aligned=False,
save_dir=plots_directory,
fig_fn=f"{next(figure_counter):02}.png",
)
Expand Down
Loading

0 comments on commit eedc645

Please sign in to comment.