Giter VIP home page Giter VIP logo

Comments (5)

jpvantassel avatar jpvantassel commented on August 11, 2024

@mcardenass,

Yes, this is now supported through the hvsrpy.object_io module. An example of how to use the two key functions hvsrpy.object_io.write_hvsr_object_to_file and hvsrpy.object_io.read_hvsr_object_from_file are provided here. The change was necessary to support writing and reading text-based summaries of all HVSR objects in one unified interface.

All the best,
Joe

from hvsrpy.

mcardenass avatar mcardenass commented on August 11, 2024

Joe, thanks for the information. One more request, how extracts the statistical information to a txt file, especially the peak of the average curve and the amplitude. Thanks in advance.
Martin

from hvsrpy.

jpvantassel avatar jpvantassel commented on August 11, 2024

Hi @mcardenass,

This is not currently in the output file, although it probably should be. The solution for now is to access the statistics from the methods of the associated HVSR object. For example: mean_fn_amplitude, mean_fn_frequency, std_fn_frequency, std_fn_amplitude, and mean_curve_peak. If you have the output files already you can use hvsrpy.object_io.read_hvsr_object_from_file to read them back into an object then call the method, without having to reprocess your data.

All the best,
Joe

from hvsrpy.

mcardenass avatar mcardenass commented on August 11, 2024

Thanks Joe!!

hvsr_from_disk = hvsrpy.object_io.read_hvsr_object_from_file(f"{fname_prefix}.csv")
(fre,amp)=hvsr_from_disk.mean_curve_peak()

Martín

from hvsrpy.

jpvantassel avatar jpvantassel commented on August 11, 2024

That's it!

from hvsrpy.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.