Open hanamthang opened 1 year ago
So for coastal lagoons, the code should work well. I wonder here if the orthometric correction is working correctly. sometimes the pyproj installation doesn't work well and it can vary by pyproj version. I have provided a Jupyter notebook example. Can you run this with your code and check that the orthometric correction is working, by comparing the raw photons heights and orthometric heights?
Thanks for your quick reply. I used pyproj version 3.4 since version 3.6 came with error when running the code:
# Orthometrically correct the data using the epsg code lat_utm, lon_utm, photon_h2 = cshelph.orthometric_correction(latitude, longitude, photon_h, epsg_code)
and seems the orthometric correction did not work properly. Please see attached images for uncorrected data (blue) and corrected data (red). Is that a reason for incorrect retrieval of water depth points? Will pyproj 3.6 work correctly? If not, could you pls suggest something?
Does this threshold have an impact on the accuracy of retrieved water depth points?
dataset_sea1 = dataset_sea1[(dataset_sea1['photon_height'] > -40) & (dataset_sea1['photon_height'] < 5)]
ok, first thing to check is that you have proj-data installed?
Sorry for late reply. I am running the codes in my local laptop to see if the latest pyproj working. I will keep updating the results. Many thansk, Thang
So I am able to run the codes with libs installed on my laptop, not from the Google Colab. The results are reliable for some points, despite wrong values were observed for other points on the same data line. I think to change the values as your previous suggestion, but not sure about the most important values:
laser_num = 3
threshold = 20 #(0-100)
# Threshold here is [-40,5]. Consider to change this range. print('filter quality flags') dataset_sea1 = dataset_sea[(dataset_sea.confidence != 0) & (dataset_sea.confidence != 1)] print('filter for elevation') dataset_sea1 = dataset_sea1[(dataset_sea1['photon_height'] > -30) & (dataset_sea1['photon_height'] < 3)]
Are they the most important values that should be considered? Do you have suggestions for any ranges in the coastal lagoon?
Many thanks, Thang
so the threshold value controls how sensitive the software is to noise. You should change the threshold value until you are happy it is selecting lagoon photons and not noise photons. The threshold parameter can also take a list so you can run many examples at once and then check the results.
The other thresholds you have listed here control where the software looks for bathymetric surfaces. I would suggest you keep these the same for now, unless your surface exists outside of this range
Many thanks to you suggestion, then will give it a try. I also noted that the parameter of confidence, ranging from 1 - 4. As I understood, confidence 4 means the retrieved water depth point has the highest certainty/ accuracy, right? So, should I filter the points with confidence = 4 and only use these points?
Thank you very much for the great python package you made which significantly save my time and efforts in extracting bathymetry points from IceSat-2.
Similar to the question of using C-SHELPh to inland water, I guess we can use this package to extract the water depth points in a coastal lagoon.
Attached is my study site in Tam Giang - Cau Hai lagoon - inside the red polygon (TamGiang_CauHai_lagoon.png). Could you please have suggestions on parameters need to be considered and tuned for an optimal results? I tried a h5 file and successfully extract the data points, unfortunately the water depths are not correct for many point inside the lagoon (LapAn.png), where water depth ranges between 0 - 3.5 m but the selected points in attached image are almost 10 m.
Warm regards, Thang