nmt28 / C-SHELPh

Apache License 2.0
13 stars 6 forks source link

Spatial subset of IceSat-2 image prior to processing #14

Closed hanamthang closed 1 year ago

hanamthang commented 1 year ago

Can we use the built-in code of the C-SHELPh to subset the image to my study site? Since the original image covers a very large area, it will take much time and power to process all the data that are not used after the task complete. In case of not supporting, can I manually subset the image to my boundary, then read and process the data? Thang

hanamthang commented 1 year ago

I can subset the h5 image by the internal tool in https://search.earthdata.nasa.gov/, which produces a new image to my boundary. However, the following error was appeared when extracting information from the image:

# Read the data latitude, longitude, photon_h, conf, ref_elev, ref_azimuth, ph_index_beg, segment_id, alt_sc, seg_ph_count = cshelph.read_atl03(is2_h5_file, str(laser_num))

Error:

File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()

File h5py/h5o.pyx:190, in h5py.h5o.open()

KeyError: 'Unable to synchronously open object (component not found)'

image

image

I am not sure about the problems here since only spatial subset was done with all the bands (950 bands) kept.

nmt28 commented 1 year ago

hmmm, that is strange if it cannot find the file contents. Something must have changed to prevent it from working.

It is probably easier if we use command options built within C-SHELPh to handle this. You can use -slat and -elat to subset the file within the code. The full range of command options are available in run_bathy_extraction.py

hanamthang commented 1 year ago

I am able to subset the scene and process it now. Many thanks.

nmt28 commented 1 year ago

Great, hope the results are looking good!