## Calculating PAI from GEDI waveform

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
ctampion
Posts: 14
Joined: Sat Nov 14, 2020 4:21 am America/New_York

### Calculating PAI from GEDI waveform

Hi there,
I'm trying to calculate pai_z using the waveform from the L1B GEDI product but I'm having trouble replicating the pai_z values in the L2B product (my ultimate goal is to calculate PAI at heights other than the 5m increments in the L2B product, but using the L2B 5m increment pai_z values to validate my calcs).
(I think rxwaveform is the better field to use rather than, for instance, rx_cumulative which is based on the smoothed waveform, but maybe I'm wrong...)
Using a particular shot as my test case, none of the total energy values (e.g. rx_energy, energy_sm, or the sum of rxwaveform above noise between botloc and toploc) seem to equal the sum of the L2B rv and rg energy values (e.g. rv+rg =/= rx_energy), so what is the rest of the energy if it's not ground or vegetation and it has ostensibly been denoised? The closests seems to be rx_energy_a1 in L2B (which is possibly close enough).
I'm reasonably confident that my formula is correct (I can replicate pai_0 using rv and rg as per equation 10 etc in the L2B Algorithm Theoretical Basis Document), and I've replicated rx_modeenergytobotloc quite accurately, but the problem seems to be that the energy values from rxwaveform at 5m, 10m, 15m, etc don't equate to what L2B's pai_5, pai_10, etc values imply. I get quite close if I scale rv and rg to total the sum of the denoised rxwaveform between botloc and toploc (i.e. so rv_scaled+rg_scaled = denoised rxwaveform between botloc and toploc) and use these in the equation, but it's not *exactly* right and this feels like too much kludging. Am I missing something?
On a separate but related matter, I'm also not sure about allocating waveform energy between ground and vegetation around the lowest mode, so advice on that would be extremely welcome too. At the moment I've done it pretty crudely (i.e. allocating energy below lowest mode to ground and mirroring those values above mode to ground with excess energy in waveform allocated to veg) which probably makes the values below 5m rather unreliable.
Thanks for any help!

Tags:

LP DAAC - jwilson
User Services
Posts: 262
Joined: Mon Sep 30, 2019 12:39 pm America/New_York
Has thanked: 9 times

### Re: Calculating PAI from GEDI waveform

Thank you for reaching out to us. We have requested additional guidance from our data specialist.
Kind regards,
Janice

LP DAAC - lien
User Services
Posts: 148
Joined: Thu Jun 25, 2020 9:51 am America/New_York
Been thanked: 4 times

### Re: Calculating PAI from GEDI waveform

Hi,
We have sent this also to the GEDI Science team for their take. As soon as we hear anything we will let you know.
Thanks

ctampion
Posts: 14
Joined: Sat Nov 14, 2020 4:21 am America/New_York

### Re: Calculating PAI from GEDI waveform

Thanks Janice and Lien (?). I've been meaning to post some data by way of example, and hopefully I'll get a chance to do that later today.

ctampion
Posts: 14
Joined: Sat Nov 14, 2020 4:21 am America/New_York

### Re: Calculating PAI from GEDI waveform

Hello again,
I was hoping to give a worked example of my problem, however I've struck a different problem with some data I was going to use for that purpose.
e.g. the waveform in the L1B product looks a bit odd, particularly relative to the data in the L2A product. e.g. there's not much energy left between toploc and botloc after subtracting noise from the waveform intensities. Is this the data you also see at your end, and do you see a problem with it (or am I stupid)?
Thanks again.

Granule: GEDI01_B_2019205184217_O03477_T00518_02_003_01.h5
shot_number: 34771102100436085
peak: 258.215515136719
peak_sm: 250.871948242188
noise_mean_corrected: 222.5625
mean_sm: 226.199996948242
botloc: 531
toploc: 299.5
maxpeakloc: 334
botloc_amp: 240.880996704102
rx_sample_count: 955
rx_energy: 5013.40625
rx_assess/rx_energy: 5011.138671875
energy_sm: 3082.89233398438
energy_total: 5011.138671875

rxwaveform:
[1] 240.0434 241.7190 243.4209 245.3401 247.3135 248.6013 248.3604 246.4609 243.5897 240.6716 238.2228 236.3203 235.0337
[14] 234.6229 235.2390 236.7126 238.6420 240.7031 242.7747 244.7150 246.1509 246.6173 245.7716 243.6335 240.6552 237.5671
[27] 235.0793 233.6443 233.1628 233.1355 233.0680 232.8363 232.7047 233.0217 233.6871 234.2804 234.4706 234.3758 234.3499
[40] 234.6092 234.9029 234.8466 234.2408 233.2284 232.1488 231.4066 231.2678 231.7850 232.7036 233.5984 234.1609 234.3484
[53] 234.2691 233.9816 233.3777 232.4376 231.3410 230.4102 229.8892 229.8522 230.1715 230.7638 231.5425 232.4463 233.2623
[66] 233.6718 233.4365 232.6799 231.7403 230.8678 230.0652 229.2859 228.6838 228.5074 228.8121 229.3556 229.7951 229.9027
[79] 229.6878 229.4379 229.4518 229.8222 230.2116 230.0848 229.1287 227.6748 226.3208 225.5929 225.5168 225.8168 226.1857
[92] 226.6095 227.1621 227.9854 229.0069 230.0090 230.6248 230.5858 229.8167 228.5927 227.3285 226.4740 226.3326 227.0656
[105] 228.5380 230.2352 231.3932 231.5244 230.7624 229.7291 228.9754 228.6983 228.7625 228.9255 228.9384 228.7033 228.3043
[118] 228.0134 227.9666 228.0917 228.1875 228.1488 227.9449 227.6741 227.4930 227.6600 228.3287 229.4018 230.5264 231.3598
[131] 231.6801 231.4682 230.8229 229.9822 229.2805 229.0042 229.1640 229.5511 229.8566 229.8864 229.6364 229.2475 229.0023
[144] 229.1962 229.8818 230.7192 231.2130 231.0298 230.3309 229.5943 229.3242 229.7338 230.6492 231.5070 231.7533 231.1864
[157] 230.0751 228.9164 228.0676 227.5459 227.1329 226.5930 225.9650 225.6443 226.0817 227.3612 229.1007 230.7700 232.0325
[170] 232.6905 232.6230 231.8652 230.7888 229.8894 229.4231 229.2515 229.1650 229.1405 229.3660 229.9086 230.6628 231.5592
[183] 232.6527 233.9808 235.2204 235.7327 235.0906 233.5433 231.8480 230.7532 230.5137 230.8861 231.3773 231.4348 230.7212
[196] 229.2835 227.5932 226.2693 225.7172 225.9979 226.9497 228.3352 229.9047 231.3620 232.3448 232.5644 231.9719 230.8428
[209] 229.6780 228.8927 228.6388 228.7827 229.0852 229.2585 229.0861 228.5279 227.8193 227.3099 227.2153 227.3737 227.4687
[222] 227.3537 227.2405 227.5056 228.3912 229.7565 231.1929 232.1869 232.3462 231.5886 230.1819 228.6406 227.4083 226.6535
[235] 226.2692 226.1078 226.0490 226.0672 226.1533 226.3744 226.8251 227.5461 228.3705 229.0176 229.2847 229.2409 229.1827
[248] 229.3528 229.6814 229.7743 229.2757 228.1597 226.8407 225.7904 225.2823 225.2419 225.4822 225.8536 226.2924 226.7401
[261] 227.2538 227.9561 228.9449 230.1053 231.0524 231.4347 231.3164 231.0174 230.8189 230.6380 230.1904 229.3901 228.5312
[274] 228.0010 228.0446 228.5365 229.1978 229.8455 230.4798 231.1337 231.6734 231.6971 230.9466 229.5094 227.7270 225.9358
[287] 224.4412 223.5521 223.6206 224.7087 226.4337 228.1688 229.4986 230.3508 230.8655 231.1476 231.2006 231.0506 230.8940
[300] 230.9973 231.4355 232.0024 232.2884 231.9492 230.9376 229.5911 228.4758 228.1680 228.8825 230.2790 231.6503 232.3262
[313] 232.0554 231.0104 229.5627 228.0308 226.6659 225.6241 225.0177 224.8597 225.0663 225.5363 226.2252 227.1657 228.2678
[326] 229.2072 229.4990 228.9213 227.6839 226.3222 225.2822 224.8024 224.8590 225.2139 225.4299 225.2175 224.7031 224.4441
[339] 224.8776 225.9359 227.0397 227.6451 227.6254 227.3316 227.1533 227.2168 227.3058 227.2498 227.1406 227.2257 227.5258
[352] 227.8516 227.9429 227.8153 227.6665 227.6890 227.8762 228.1227 228.2908 228.3203 228.1524 227.6999 226.9812 226.1446
[365] 225.4715 225.1519 225.2638 225.7996 226.7092 227.6514 228.0678 227.4495 225.7957 223.6511 221.8174 220.8472 220.8525
[378] 221.5372 222.4049 222.9932 223.1882 223.2608 223.6972 224.7944 226.2796 227.4684 227.8197 227.3396 226.5473 226.0068
[391] 225.8763 225.9741 225.9821 225.6906 225.1877 224.8278 224.9677 225.7380 226.8241 227.6843 227.9276 227.5743 226.9753
[404] 226.6216 226.7111 227.0659 227.2613 227.0059 226.3547 225.7202 225.4678 225.7427 226.3210 226.7884 226.7327 226.1003
[417] 225.1691 224.4992 224.4680 225.1349 226.2193 227.3901 228.3387 228.9765 229.3776 229.8110 230.4877 231.4077 232.2365
[430] 232.5675 232.0819 230.7884 228.9094 226.9365 225.4271 224.8536 225.2607 226.2654 227.1960 227.5924 227.4167 227.0111
[443] 226.8148 227.0450 227.5500 227.9108 227.7417 226.9486 225.8374 224.9159 224.6570 225.2508 226.4978 227.8689 228.7526
[456] 228.7860 228.0177 226.8526 225.7802 225.1940 225.1800 225.5004 225.7099 225.5086 224.8626 224.0830 223.4781 223.1693
[469] 222.9908 222.7608 222.4101 222.1306 222.0761 222.2943 222.6902 223.2356 223.9196 224.7412 225.5730 226.3154 226.8586
[482] 227.1464 227.1219 226.8351 226.3709 225.8824 225.3930 224.8828 224.3431 223.9414 223.9288 224.5988 225.9278 227.5750
[495] 228.9512 229.6517 229.5593 228.8783 227.8046 226.5379 225.2064 223.9996 223.0432 222.4379 222.1961 222.2976 222.6239
[508] 222.9915 223.1479 222.9089 222.3649 221.9248 221.9700 222.4601 222.9752 223.2268 223.4135 224.0067 225.0794 226.1530
[521] 226.5827 226.1634 225.2197 224.3282 223.7493 223.3608 222.9234 222.4301 222.0786 222.0542 222.3351 222.8010 223.3483
[534] 223.8752 224.2828 224.6043 225.0153 225.6765 226.4385 226.9173 226.8107 226.2333 225.5711 225.2025 225.0868 225.0088
[547] 224.8685 224.9344 225.4806 226.4911 227.5344 228.2410 228.4899 228.3460 227.7772 226.7738 225.5758 224.6452 224.3104
[560] 224.5264 224.8950 225.0713 225.0313 225.0116 225.2029 225.5339 225.6665 225.4329 225.0038 224.6970 224.6536 224.7822
[573] 224.9416 225.1298 225.3758 225.5799 225.5897 225.4102 225.2634 225.3128 225.4256 225.3073 224.8782 224.3931 224.1291
[586] 224.0415 223.9040 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[599] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[612] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[625] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[638] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[651] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[664] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[677] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[690] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[703] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[716] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[729] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[742] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[755] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[768] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[781] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[794] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[807] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[820] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[833] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[846] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[859] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[872] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[885] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[898] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[911] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[924] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[937] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
[950] 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

jakeeckersley121
Posts: 2
Joined: Sun Jul 09, 2023 2:12 am America/New_York

### Re: Calculating PAI from GEDI waveform

Hello!

ctampion, did you ever solve this problem? I'm trying to find a means of doing the same thing you were attempting when you posted this, creating my own algorithm to derive vertical PAI and PAVD estimates at 1 m intervals (the ecosystems I work in reach a max height of 5 m). Would love to communicate further if you have written a working script.

Jake

LP DAAC - dgolon
User Services
Posts: 276
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Has thanked: 15 times
Been thanked: 2 times
Contact:

### Re: Calculating PAI from GEDI waveform

Hi @ctampion and @jakeeckersley121

If you are looking for higher resolution vertical profiles please visit https://github.com/armstonj/gedipy/blob/master/notebooks/gedi_l2b_vertical_plant_profiles.ipynb

It is important to mention that there was a bug in the Earthdata Subsetter for L1B/L2B waveform/pgap_theta_z datasets that has been fixed. If you haven't already done so, we recommend redownloading your data now that the subsetter is working correctly for L1B/L2B waveform/pgap_theta_z.
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.