• Can you process seismographic signals in Python or should I switch to M

    From a a@21:1/5 to All on Sat Mar 11 15:54:08 2023
    My project https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to a a on Sun Mar 12 00:02:11 2023
    On 3/11/2023 6:54 PM, a a wrote:
    My project https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.html

    If your goal is to step through this Matlab example, then clearly you
    should use Matlab. If you do not have access to Matlab or cannot afford
    it, then you would have to use something else, and Python would be a
    prime candidate. However, each of the techniques and graphs in the
    lesson have been pre-packaged for you in the Matlab case but not with
    Python (many other case studies on various topics that use Python Python
    can be found, though).

    Everything in the Matlab analysis can be done with Python and associated libraries. You would have to learn various processing and graphing
    techniques. You would also have to get the data from somewhere. It's prepackaged for this analysis and you would have to figure out where to
    get it. There is at least one Python package that can read and convert
    Matlab files - I do not remember its name, though.

    A more important question is whether doing the Matlab example prepares
    you to do any other analyses on your own. To shed some light on this,
    here is a post on some rather more advanced analysis using data on the
    same earthquake, done with Python tools -

    https://towardsdatascience.com/earthquake-time-series-forecasts-using-a-hybrid-clustering-lstm-approach-part-i-eda-6797b22aed8c

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From avi.e.gross@gmail.com@21:1/5 to All on Sat Mar 11 23:36:08 2023
    A a,

    Consider asking a more specific question. Many things can be done in many different programming languages.

    Are you asking if there are helpers you can use such as modules that
    implement parts of the algorithms you need? Are you asking about speed or efficiency?

    Have you considered how few people here are likely to know much about a specialized field and perhaps a search using a search engine might get you something like this:

    https://www.google.com/search?q=python+process+seimographic+signals&oq=pytho n+process+seimographic+signals&aqs=chrome..69i57j0i546l5.16718j0j7&sourceid= chrome&ie=UTF-8

    For example:

    https://www.geophysik.uni-muenchen.de/~megies/www_obsrise/

    You can of course search for say signal processing or whatever makes sense
    to you.

    My answer, if not clear, is that your question may not be primarily about Python and about finding whatever environment gives you both access to
    software that helps you as well as a language that lets you wrap lots of it together, make reports and so on. Python is likely a decent choice but
    perhaps others are better for your own situation, such as having others
    nearby you can learn from.

    Good luck.

    -----Original Message-----
    From: Python-list <python-list-bounces+avi.e.gross=gmail.com@python.org> On Behalf Of a a
    Sent: Saturday, March 11, 2023 6:54 PM
    To: python-list@python.org
    Subject: Can you process seismographic signals in Python or should I switch
    to Matlab ?

    My project https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.htm
    l
    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From avi.e.gross@gmail.com@21:1/5 to a a on Sun Mar 12 00:17:29 2023
    I have used GNU Octave as a sort of replacement for MATLAB as a free
    resource. I have no idea if it might meet your needs.

    Although Python is a good environment for many things, if you have no
    knowledge of it yet, it can take a while to know enough and if you just need
    it for one project, ...

    -----Original Message-----
    From: Python-list <python-list-bounces+avi.e.gross=gmail.com@python.org> On Behalf Of Thomas Passin
    Sent: Sunday, March 12, 2023 12:02 AM
    To: python-list@python.org
    Subject: Re: Can you process seismographic signals in Python or should I
    switch to Matlab ?

    On 3/11/2023 6:54 PM, a a wrote:
    My project

    https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.htm
    l

    If your goal is to step through this Matlab example, then clearly you
    should use Matlab. If you do not have access to Matlab or cannot afford
    it, then you would have to use something else, and Python would be a
    prime candidate. However, each of the techniques and graphs in the
    lesson have been pre-packaged for you in the Matlab case but not with
    Python (many other case studies on various topics that use Python Python
    can be found, though).

    Everything in the Matlab analysis can be done with Python and associated libraries. You would have to learn various processing and graphing
    techniques. You would also have to get the data from somewhere. It's prepackaged for this analysis and you would have to figure out where to
    get it. There is at least one Python package that can read and convert
    Matlab files - I do not remember its name, though.

    A more important question is whether doing the Matlab example prepares
    you to do any other analyses on your own. To shed some light on this,
    here is a post on some rather more advanced analysis using data on the
    same earthquake, done with Python tools -

    https://towardsdatascience.com/earthquake-time-series-forecasts-using-a-hybr id-clustering-lstm-approach-part-i-eda-6797b22aed8c



    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From a a@21:1/5 to avi.e...@gmail.com on Sun Mar 12 21:39:07 2023
    On Sunday, 12 March 2023 at 06:17:54 UTC+1, avi.e...@gmail.com wrote:
    I have used GNU Octave as a sort of replacement for MATLAB as a free resource. I have no idea if it might meet your needs.

    Although Python is a good environment for many things, if you have no knowledge of it yet, it can take a while to know enough and if you just need it for one project, ...
    -----Original Message-----
    From: Python-list <python-list-bounces+avi.e.gross=gmai...@python.org> On Behalf Of Thomas Passin
    Sent: Sunday, March 12, 2023 12:02 AM
    To: pytho...@python.org
    Subject: Re: Can you process seismographic signals in Python or should I switch to Matlab ?
    On 3/11/2023 6:54 PM, a a wrote:
    My project

    https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.htm l

    If your goal is to step through this Matlab example, then clearly you
    should use Matlab. If you do not have access to Matlab or cannot afford
    it, then you would have to use something else, and Python would be a
    prime candidate. However, each of the techniques and graphs in the
    lesson have been pre-packaged for you in the Matlab case but not with
    Python (many other case studies on various topics that use Python Python
    can be found, though).

    Everything in the Matlab analysis can be done with Python and associated libraries. You would have to learn various processing and graphing techniques. You would also have to get the data from somewhere. It's prepackaged for this analysis and you would have to figure out where to
    get it. There is at least one Python package that can read and convert Matlab files - I do not remember its name, though.

    A more important question is whether doing the Matlab example prepares
    you to do any other analyses on your own. To shed some light on this,
    here is a post on some rather more advanced analysis using data on the
    same earthquake, done with Python tools -

    https://towardsdatascience.com/earthquake-time-series-forecasts-using-a-hybr id-clustering-lstm-approach-part-i-eda-6797b22aed8c
    --
    https://mail.python.org/mailman/listinfo/python-list
    Thank you my dear friends for your kind opinions.

    Matlab is pro, commercial, paid and demo is available for tests only.
    So it's hard to dicuss projects, apps in Matlab if cannot be verified by peers.

    What is hot today is the following 3D plot animation in Matplotlib

    https://twitter.com/gmrpetricca/status/1633477532526817281

    But some unknown reasons Matplotlib and numpy crash my Python 3.8 for Windows , 32-bit and no support is offered

    Ok, I can read 100 research papers daily, preview hundreds pages of text from search engines.

    But what I need is analysis of seismograms from 4,000 seismographs world wide to detect P-wave energy distribution underground around the earthquake to verify EQ Domino Effect

    As you can see below, the Matlab project named in my first submission turned into Python project
    and EQ energy envelope makes sense.

    But I would prefer to join 100+ man project in seismology since it may take me months to download
    seismograms, process seismograms, preview, select features and build EQ energy envelope 3D plots for earthquakes in Turkey alone.

    To develop another theory, to get data, process data and get results for analysis to verify EQ energy envelope Domino Effect


    I am afraid there are no team research projects in seismology.
    What is published and discussed is one-man project.

    ----

    PICOSS: Python Interface for the Classification of
    Seismic Signals
    A. Buenoa, L. Zuccarellob,c, A. D ́ıaz-Morenod, J. Woolamd, M. Titosb, L. Garc ́ıaa, I. ́Alvareza, J. Prudenciob, S. De Angelisd
    aDepartment of Signal Theory, Telematic and Communications, University of Granada,
    Spain.
    bDepartment of Theoretical Physics and Cosmos, University of Granada, Spain. cIstituto Nazionale di Geofisica e Vulcanologia, Sezione di Pisa, Italy dDepartment of Earth, Ocean and Ecological Sciences, University of Liverpool, UK

    https://core.ac.uk/download/pdf/334413225.pdf


    seismic-signal

    https://github.com/topics/seismic-signal

    STA-LTA Algorithm and Seismometer Trajectory visualization in 3D

    Tonumoy /
    STA-LTA-Algorithm-and-Seismometer-Trajectory-visualization-in-3D


    https://github.com/Tonumoy/STA-LTA-Algorithm-and-Seismometer-Trajectory-visualization-in-3D


    PICOSS

    A Python Interface for the Classification of Seismic Signals.

    PICOSS is a Python GUI designed as a modular data-curator platform for volcano-seismic data analysis. Detection, segmentation and classification. With exportability and standardization at its core, users can select automatic or manual workflows to
    annotate seismic data from the suite of included tools.

    Originally, PICOSS was designed for the purposes of seismicity research as a collaboration between University of Granada (UGR) and University of Liverpool (UoL). However, the system can be used within a wide range of geophysical applications.
    We are currently working on switching the interface from Python 2.7 to Python 3.0+

    https://github.com/srsudo/PICOSS

    https://github.com/srsudo/PICOSS/blob/master/info/tutorials/howto.md


    Simulations of the Loma Prieta earthquake using an energy-based envelope shape.
    https://www.researchgate.net/figure/Simulations-of-the-Loma-Prieta-earthquake-using-an-energy-based-envelope-shape-Response_fig12_315724830

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to a a on Mon Mar 13 11:11:32 2023
    On 3/13/2023 12:39 AM, a a wrote:
    But some unknown reasons Matplotlib and numpy crash my Python 3.8 for Windows , 32-bit and no support is offered

    It is possible, using pip, to downgrade versions (e.g., of Matplotlob
    and numpy) to see if you can find versions that work. Of course moving
    to 64-bit Python >= 3.10 would be better, but if that were possible I
    imagine you would have done it already.

    BTW, it would be useful if you said what operating system you are using
    (I've been assuming Windows).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From a a@21:1/5 to Thomas Passin on Mon Mar 13 08:40:46 2023
    On Monday, 13 March 2023 at 16:16:28 UTC+1, Thomas Passin wrote:
    On 3/13/2023 12:39 AM, a a wrote:
    But what I need is analysis of seismograms from 4,000 seismographs world wide to detect P-wave energy distribution underground around the earthquake to verify EQ Domino Effect
    In that case, you will have to do a great deal of work to get all that
    data into a common usable form, cleaned and errors removed. That will
    be a lot of effort no matter what language you use. In the Matplotlib
    lesson you pointed to, the work was already done, for one one earthquake
    at one location.

    The reference I gave, https://towardsdatascience.com/earthquake-time-series-forecasts-using-a-hybr

    id-clustering-lstm-approach-part-i-eda-6797b22aed8c

    actually includes a Python script that does this work for some selected ranges of data, so it might be a good starting point.
    Thank you
    excellent example

    "The imported json files were heavily-nested; hence, during data cleaning, I “denested” the json files, transformed them into dataframes, fixed the column datatypes, imputed the NaN values, and finally concatenated them into a global dataframe, which
    was workable. For a full description of data cleaning, visit my GitHub profile. Finally, I indexed the dataframe by timestamps as a time-series dataframe:

    https://towardsdatascience.com/earthquake-time-series-forecasts-using-a-hybrid-clustering-lstm-approach-part-i-eda-6797b22aed8c


    I would like to work with Saied Mighani one day but unfortunately, seismology projects, studies are one-man activity.

    I am success oriented in building Earthquake Prediction System
    and I am sure, P-wave energy envelope calculate for every earthquake, for every seismographic station can give valuable hints on how earthquake energy is distributed underground, since what is recorded by surface seismographs is some form of such P-wave
    envelope energy transferred at the direction of surface placed seismograph.

    Ideas are great but life is for real ;)

    thank you

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Rich Shepard on Mon Mar 13 11:41:39 2023
    On 3/13/2023 11:23 AM, Rich Shepard wrote:
    On Mon, 13 Mar 2023, Thomas Passin wrote:

    But what I need is analysis of seismograms from 4,000 seismographs
    world wide to detect P-wave energy distribution underground around
    the earthquake to verify EQ Domino Effect

    In that case, you will have to do a great deal of work to get all that
    data into a common usable form, cleaned and errors removed. That will
    be a
    lot of effort no matter what language you use. In the Matplotlib lesson
    you pointed to, the work was already done, for one one earthquake at one
    location.

    Wouldn't Pandas help here?

    No doubt, depending on the data formats used. But it's still going to
    be a big task.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Shepard@21:1/5 to Thomas Passin on Mon Mar 13 08:23:15 2023
    On Mon, 13 Mar 2023, Thomas Passin wrote:

    But what I need is analysis of seismograms from 4,000 seismographs world
    wide to detect P-wave energy distribution underground around the earthquake >> to verify EQ Domino Effect

    In that case, you will have to do a great deal of work to get all that
    data into a common usable form, cleaned and errors removed. That will be a lot of effort no matter what language you use. In the Matplotlib lesson
    you pointed to, the work was already done, for one one earthquake at one location.

    Wouldn't Pandas help here?

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to a a on Mon Mar 13 11:15:59 2023
    On 3/13/2023 12:39 AM, a a wrote:
    But what I need is analysis of seismograms from 4,000 seismographs world wide to detect P-wave energy distribution underground around the earthquake to verify EQ Domino Effect

    In that case, you will have to do a great deal of work to get all that
    data into a common usable form, cleaned and errors removed. That will
    be a lot of effort no matter what language you use. In the Matplotlib
    lesson you pointed to, the work was already done, for one one earthquake
    at one location.

    The reference I gave, https://towardsdatascience.com/earthquake-time-series-forecasts-using-a-hybr

    id-clustering-lstm-approach-part-i-eda-6797b22aed8c

    actually includes a Python script that does this work for some selected
    ranges of data, so it might be a good starting point.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From a a@21:1/5 to Thomas Passin on Mon Mar 13 08:30:12 2023
    On Monday, 13 March 2023 at 16:12:04 UTC+1, Thomas Passin wrote:
    On 3/13/2023 12:39 AM, a a wrote:
    But some unknown reasons Matplotlib and numpy crash my Python 3.8 for Windows , 32-bit and no support is offered
    It is possible, using pip, to downgrade versions (e.g., of Matplotlob
    and numpy) to see if you can find versions that work. Of course moving
    to 64-bit Python >= 3.10 would be better, but if that were possible I imagine you would have done it already.

    BTW, it would be useful if you said what operating system you are using (I've been assuming Windows).
    sorry
    Windows 7

    My concept in building Earthquake Prediction System based on Precognition is
    to use RTL Software Defined Radio (SDR) to receive data from outdoor seismic sensors (smartphones turned into seismographs - sending acceleration data via audio output, to be transmitted by radio transmitter to a remote RTL SDR station, for real time
    processing, P-wave energy envelope calculation, earthquake depth calculation sine in case of Turkey, USGS assigns 10km depth value by default to a single EQ event.

    Why SDR ?
    Since I don't expect Cellular network to work and be operational in remote, mountain regions of Turkey after the strong 7,8 earthquake, so SDR should work as backup for cellular 3G/LTE network in the region.

    In case of Android smartphones I need to switch to Python for Android to get flexibility offered by scripting to support earthquake study ideas just in time and to share such ideas with friends.


    ---

    python-for-android · PyPI
    https://pypi.org/project/python-for-android

    python-for-android is a packaging tool for Python apps on Android. You can create your own Python distribution including the modules and dependencies you want, and bundle it in an APK or AAB along with your own code. Features include: Different app
    backends including Kivy, PySDL2, and a WebView with Pyt… See more Documentation

    Follow the quickstartinstructionsto install and begin creating APKs and AABs. Quick instructions: install python-for-android with: (for the develop branch: pip install git+https://github.com/kivy/… See more
    Contributing

    We love pull requests and discussing novel ideas. Check out the Kivyproject contribution guideandfeel free to improve python-for-android. See ou… See more
    Support

    If you need assistance, you can ask for help on our mailing list: 1. User Group: https://groups.google.com/group/kivy-users 2. Email: kivy-users@googlegroups.com … See more
    History

    In 2015 these tools wer
  • From Thomas Passin@21:1/5 to Passin on Mon Mar 13 14:10:14 2023
    On 3/13/2023 11:54 AM, Rich Shepard wrote:> On Mon, 13 Mar 2023, Thomas
    Passin wrote:

    No doubt, depending on the data formats used. But it's still going
    to be a big task.

    Thomas,

    True, but once you have a dataframe with all the information about
    all the earthquakes you can extract data for every analysis you want
    to do.
    This message would better have gone to the list instead of just me.

    I'm not saying that Pandas is a bad choice! I'm saying that getting all
    that data into shape so that it can be ingested into a usable dataframe
    will be a lot of hard work.

    If you've not read Wes McKinney's "Python for Data Analysis: Data
    Wrangling with Pandas, NumPy, and IPython" I encourage you to do so.

    I've been interested in that title, but since I don't currently have any
    large, complex data wrangling problems I've put it off.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Shepard@21:1/5 to Thomas Passin on Mon Mar 13 10:46:26 2023
    On Mon, 13 Mar 2023, Thomas Passin wrote:

    No doubt, depending on the data formats used. But it's still going to be a big task.

    Thomas,

    True, but once you have a dataframe with all the information about all the earthquakes you can extract data for every analysis you want to do.

    If you've not read Wes McKinney's "Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython" I encourage you to do so.

    Regards,

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From avi.e.gross@gmail.com@21:1/5 to Passin on Mon Mar 13 15:00:54 2023
    Hi,

    This seems again to be a topic wandering. Was the original question whether Python could be used for dealing with Seismic data of some unspecified sort
    as in PROCESSING it and now we are debating how to clean various aspects of data and make things like data.frames and extract subsets for analysis?

    Plenty of the above can be done in any number of places ranging from
    languages like Python and R to databases and SQL. If the result you want to analyze can then be written in a format with rows and columns containing the usual suspects like numbers and text and dates and so on, then this part of
    the job can be done anywhere you want.

    And when you have assembled your data and now want to make a query to
    generate a subset such as data in a date range that is from a set of
    measuring stations and with other qualities, then you can simply save the
    data to a file in whatever format, often something like a .CSV.

    It is the following steps where you want to choose your language based on
    what is available. Are you using features like a time series, for example?
    Are you looking or periodicity. Is graphing a major aspect and do you need
    some obscure graph types not easily found but that are parts of packages/modules in some language like R or Python? Do you need the analysis
    to have interactive aspects such as from a GUI, or a web page? Does any
    aspect of your work include things like statistical analyses or machine learning? The list goes on.

    As mentioned, people who do lots of stuff along these lines can share some tools in python, or elsewhere, they find useful and that might help fit the needs of the OP but they work best when they have a better idea of what
    exactly you want to do. Part of what I gleaned, was a want to do a 3-D graph that rotates. Python has multiple graphics packages and so on as do
    languages like R. The likelihood of finding something useful goes up if you identify if there are communities of people doing similar work and can share some of their tools.

    Hence the idea of focused searches. Asking here will largely get you people mainly who use Python and if it turns out R or something entirely else meets your needs better, perhaps Mathematica even if you have to pay for it if
    that is expected by your peers.

    My guess is that python would be a decent choice as it can do almost
    anything, but for practical purposes, you do not want to stick with what is
    in the base and probably want to use extensions like numpy/pandas and
    perhaps others like scipy and if doing graphics, there are too many
    including matplotlib and seaborn but you may need something specialized for your needs.

    I cannot stress the importance of making sure the people evaluating and
    using your work can handle it. Python is fairly mainstream and free enough
    that it can foot your bill. But it has various versions and clearly nobody would advise you to use version 2. Some versions are packaged with many of
    the tools you may want to use, such as Anaconda. It depends on your level of expertise already and how much you want to learn to get this task done. You make it sound like your kind of work must be done alone, and that can
    simplify things but also mean more work for you.

    -----Original Message-----
    From: Python-list <python-list-bounces+avi.e.gross=gmail.com@python.org> On Behalf Of Thomas Passin
    Sent: Monday, March 13, 2023 2:10 PM
    To: python-list@python.org
    Subject: Re: Can you process seismographic signals in Python or should I
    switch to Matlab ?

    On 3/13/2023 11:54 AM, Rich Shepard wrote:> On Mon, 13 Mar 2023, Thomas
    Passin wrote:

    No doubt, depending on the data formats used. But it's still going
    to be a big task.

    Thomas,

    True, but once you have a dataframe with all the information about
    all the earthquakes you can extract data for every analysis you want
    to do.
    This message would better have gone to the list instead of just me.

    I'm not saying that Pandas is a bad choice! I'm saying that getting all
    that data into shape so that it can be ingested into a usable dataframe
    will be a lot of hard work.

    If you've not read Wes McKinney's "Python for Data Analysis: Data
    Wrangling with Pandas, NumPy, and IPython" I encourage you to do so.

    I've been interested in that title, but since I don't currently have any
    large, complex data wrangling problems I've put it off.




    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)