ICESat-2-Hackweek-2023 icon indicating copy to clipboard operation
ICESat-2-Hackweek-2023 copied to clipboard

Issue on page /tutorials/bathymetry/bathymetry_tutorial.html

Open hanamthang opened this issue 1 year ago • 6 comments

Thank you very much for the great work, which help me a lot in extracting the water depths from IceSat 2 data.

During the implementation of the codes, I got the error: TypeError: atl03sp() got an unexpected keyword argument 'asset'

when using df_0 = icesat2.atl03sp(parms,asset=asset, version='006', resources=granules_list)

Remove asset=asset, version='006' can make the codes work. However, I can not get the similar list as your features: Available photon-rate features: ['sc_orient' 'solar_elevation' 'rgt' 'track' 'background_rate' 'segment_id' 'segment_dist' 'cycle' 'distance' 'snowcover' 'atl08_class' 'quality_ph' 'atl03_cnf' 'landcover' 'relief' 'yapc_score' 'height' 'ref_azimuth' 'ref_elev' 'geoid' 'pair' 'geometry' 'spot']

especially for the feature "distance", which is used in this line: # add a column for along-track distance df['along_track_meters'] = df['segment_dist']+df['distance']-np.min(df['segment_dist'])

I checked the API of atl03sp but it was not mention anything about asset or version.

Do I miss something here?

Here are my granule 'ATL03_20230725085527_05372007_006_02.h5' and available features: Available photon-rate features: ['region' 'rgt' 'pair' 'track' 'solar_elevation' 'segment_id' 'background_rate' 'segment_dist' 'sc_orient' 'cycle' 'yapc_score' 'x_atc' 'y_atc' 'landcover' 'quality_ph' 'height' 'relief' 'atl08_class' 'atl03_cnf' 'snowcover' 'ref_azimuth' 'ref_elev' 'geoid' 'geometry' 'spot']

Regards, Thang

hanamthang avatar May 08 '24 10:05 hanamthang

Thanks for the report @hanamthang. This looks like an issue with changes to the SlideRule API since the tutorial notebook was created. Pinging @tsutterley and @jpswinski who can offer further input.

dshean avatar May 08 '24 16:05 dshean

@hanamthang - sorry for the confusion and thanks for reaching out; it is as @dshean indicated, there have been some breaking updates to the server-side code and client package. We hated making those breaking changes, but we really needed to clean up some things that were causing confusion.

Here are the applicable changes:

  • The distance feature has been renamed to x_atc
  • As you mentioned, asset should be removed from your Python API call
  • Here is a link to the release notes for the major version update to v4 that had these breaking changes: https://slideruleearth.io/web/rtd/release_notes/release-v4-0-0.html

jpswinski avatar May 08 '24 16:05 jpswinski

@jonm3D, not sure how much effort would be required on your end, but maybe worth pushing an update to the bathy tutorial with these changes? It is clearly a valuable resource for the larger community outside of the hackweek event :) Or maybe just update for 2024 event.

dshean avatar May 08 '24 17:05 dshean

@dshean and @jpswinski My appreciation for your quick support. Your codes are really well done and I believe that the codes here significantly benefit a wider community to use the derived bathymetry data in the waiting time for ALT24 release. I will follow your updates to test the code again.

Could you please help me a bit about the parameters inside the codes? Here is my case: image The green line indicated the strong beam, track number 2 I tested. However, there are only 9 depth points derived from the codes when using default parameters. Here is the result: image So:

  1. The yapc, trim_photons_above parameters: Will they impact on the number of derived depth points?
  2. The parameters min_height and min_prominence, does they significant impact on the refraction corrected bathyemtry?
  3. Are there other parameters that control the filtering of qualified photons/ good photons to derive the water depth?

Thank you for your time and have a good day.

Thang

hanamthang avatar May 09 '24 06:05 hanamthang

I also selected another scene and can get more retrieval points with different thresholds. However, the derived depth seems not fit our field data. image

This photo presents the derived points over the map. Along the track and inside the yellow rectangular, depths should range between 30 and 40 m. However, the derived depth from the codes indicating only from 2 to 4 m in this area. Do we need to fix something to gain the accurate depth in this case?

If you need, I can share the colab with you for any convenience tracking.

Thang

hanamthang avatar May 12 '24 09:05 hanamthang

Hi Thang. I'm afraid that JP and I can't really offer any support here. This tutorial was prepared by @jonm3D for the 2023 Hackweek event. He and others continue to refine the ICESat-2 shallow bathymetry methods, but they probably won't modify this tutorials, and may not be monitoring issues here.

dshean avatar May 12 '24 18:05 dshean