jpvantassel / hvsrpy

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

Meta data in HV file #32

Open alangi opened 4 days ago

alangi commented 4 days ago

Hi,

Version 1 of hvsrpy produced .hv files that had a load of information about the results in them. The new .csv files don't seem to have the same information in them. I was using this for reporting purposes. Is there a place that I could find this information, or method to generate it?

Some of the items were: "Method", "Azimuth ()", "Window length (s)", "SDs for rejection", "Total windows", "Total azimuths", "Accepted windows", "Upper limit (Hz)", "Lower limit (Hz)", "Distribution of f0", "Median curve distribution", "Frequency range (Hz)", "Median curve peak A", "Median curve f0 (Hz)", "Median f0 (Hz)", "SD of f0 (LN)", "Median T0 (s)", "Range of T0 (s) 1 SD"

jpvantassel commented 2 days ago

Hi @alangi,

Most of these are in the HVSR object methods for example if hvsr is an instance of an HVSR object the following can be called: hvsr.mean_fn_frequency() hvsr.mean_fn_amplitude() hvsr.std_fn_frequency() hvsr.std_fn_amplitude() hvsr.mean_curve() hvsr.std_curve() hvsr.mean_curve_peak() hvsr.nth_std_fn_frequency() hvsr.nth_std_fn_amplitude() hvsr.nth_std_curve()

If the data is not one of these you can check hvsr.meta that includes a whole heap of meta information organized as a dict.

I think that should be everything off of the list, but if something is missing I can start including it in the output file. My thinking is to include the essential information in the output file so that the HVSR can be recreated from the results and then new calculations performed if needed.

Joe