jpvantassel / hvsrpy

A Python package for Horizontal-to-Vertical (H/V, HVSR) Spectral Ratio Processing.
https://pypi.org/project/hvsrpy/
Other
71 stars 30 forks source link

HVSRPY: Using Median Curve Instead of Mean Curve in Analysis #29

Open Tongtath opened 2 weeks ago

Tongtath commented 2 weeks ago

Hello Joseph Vantassel,

I am an undergraduate student from Thailand. When I tried performing the H/V ratio analysis using the attached files, I noticed that the H/V and frequency graphs are plotted with a mean curve instead of the median curve in README and example file, as described in Cheng, T., Cox, B. R., Vantassel, J. P., and Manuel, L. (2020). "A statistical approach to account for azimuthal variability in single-station HVSR measurements." Geophysical Journal International, 223(2), 1040–1053. https://doi.org/10.1093/gji/ggaa342.

I would like to know if there has been a theoretical or methodological change that now uses the mean curve (or follows the diffuse field assumption?) instead of the median curve. Additionally, with respect to the code provided, which follows examples/example_mhvsr_traditional.ipynb, how can I modify it to use the median curve instead of the mean curve according to HVSRPY version 1.0.0?

Sincerely, Tongtath Tongsamsi HVSRpy.zip

jpvantassel commented 2 weeks ago

Hi @Tongtath,

The Cheng et al. (2020) paper used the lognormal median curve. The lognormal median curve is not the counted median curve, but rather the mean after converting it to logarithmic space. The mean_curve function when distribution is set to "lognormal" is consistent with the process outlined in Cheng et al. (2020). For clarification, the diffuse field approach is a different procedure for calculating HVSR that is not consistent with that outlined in the Cheng et al. (2020) paper.