Skip to content

Commit

Permalink
Update Repository links
Browse files Browse the repository at this point in the history
  • Loading branch information
leonelluiscorado committed Nov 8, 2024
1 parent 859b186 commit ddf8137
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ You may create a Conda/Mamba environment specifically for this project, requirin

You can execute the pipeline script by running `python3 gedi_pipeline.py`. Additional commands must be provided for the pipeline to work, such as GEDI product, version, start date and end date query and the output directory. You can run `python3 gedi_pipeline.py --help` for more information.

## Modules as separate classes (WIP)

You can also import the classes used by the Pipeline, as well as the Pipeline itself. Check the `example_notebook.ipynb` for a quick tutorial.

## Available GEDI Products

- GEDI L1B Geolocated Waveform Data Global Footprint Level - [GEDI01_B](https://lpdaac.usgs.gov/products/gedi01_bv001/)
Expand Down
7 changes: 3 additions & 4 deletions pipeline/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# Set up dictionary where key is GEDI shortname + version
concept_ids = {
'GEDI01_B.002': 'C1908344278-LPDAAC_ECS',
'GEDI02_A.002': 'C1908348134-LPDAAC_ECS',
'GEDI02_B.002': 'C1908350066-LPDAAC_ECS',
'GEDI01_B.002': 'C2142749196-LPCLOUD',
'GEDI02_A.002': 'C2142771958-LPCLOUD',
'GEDI02_B.002': 'C2142776747-LPCLOUD',
'GEDI04_A.002': 'C2237824918-ORNL_CLOUD'
}

Expand Down Expand Up @@ -65,7 +65,6 @@ def __find_all_granules(self):
try:
# Send GET request to CMR granule search endpoint w/ product concept ID, bbox & page number, format return as json
cmr_response = r.get(f"{cmr}{concept_ids[product]}&bounding_box={bbox}&pageNum={page}").json()['feed']['entry']

# If 2000 features are returned, move to the next page and submit another request, and append to the response
while len(cmr_response) % 2000 == 0:
page += 1
Expand Down
10 changes: 5 additions & 5 deletions pipeline/subsetter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
from utils.utils import get_date_from_gedi_fn

# Default layers to be subset and exported, see README for information on how to add additional layers
l1b_subset = ['/geolocation/latitude_bin0', '/geolocation/longitude_bin0', '/channel', '/shot_number',
l1b_subset = ['/geolocation/latitude_bin0', '/geolocation/longitude_bin0', '/channel', '/shot_number', '/rx_sample_start_index',
'/rxwaveform','/rx_sample_count', '/stale_return_flag', '/tx_sample_count', '/txwaveform',
'/geolocation/degrade', '/geolocation/delta_time', '/geolocation/digital_elevation_model',
'/geolocation/solar_elevation', '/geolocation/local_beam_elevation', '/noise_mean_corrected',
'/geolocation/elevation_bin0', '/geolocation/elevation_lastbin', '/geolocation/surface_type', '/geolocation/digital_elevation_model_srtm']
'/geolocation/elevation_bin0', '/geolocation/elevation_lastbin', '/geolocation/surface_type', '/geolocation/digital_elevation_model_srtm' '/geolocation/degrade']

l2a_subset = ['/lat_lowestmode', '/lon_lowestmode', '/channel', '/shot_number', '/degrade_flag', '/delta_time',
'/digital_elevation_model', '/elev_lowestmode', '/quality_flag', '/rh', '/sensitivity', '/digital_elevation_model_srtm',
'/digital_elevation_model', '/elev_lowestmode', '/quality_flag', '/rh', '/sensitivity', '/rx_cumulative', '/digital_elevation_model_srtm',
'/elevation_bias_flag', '/surface_flag', '/num_detectedmodes', '/selected_algorithm', '/solar_elevation']


Expand Down Expand Up @@ -224,7 +224,7 @@ def _select_sds_variables(self, gedi_file, gedi_df, beams, gedi_sds):
surfaces = ['land', 'ocean', 'sea_ice', 'land_ice', 'inland_water']
all_data = gedi_file[s][()]

for i in range(gedi[s].shape[0]):
for i in range(gedi_file[s].shape[0]):
beam_df[f'{surfaces[i]}'] = all_data[i][mindex:maxdex]

del all_data
Expand Down Expand Up @@ -322,4 +322,4 @@ def subset(self, granule):
except ValueError:
print(f"[Subsetter] {granule_name} intersects the bounding box of the input ROI, but no shots intersect final clipped ROI.")

return out_df
return out_df

0 comments on commit ddf8137

Please sign in to comment.