ThomasLecocq / SeismoRMS

A simple Jupyter Notebook example for getting the RMS of a seismic signal (from PSDs)
European Union Public License 1.1
86 stars 38 forks source link

Add new module, clock map, and SQLX support #11

Closed FMassin closed 4 years ago

FMassin commented 4 years ago

SQLX compute (P)PSD continuously. If this is available, there is no point in wasting time computing PPSD with obspy. This is adding a PSDspython object for handling PSD from SQLX in a very similar manner to the original notebook SeismoSocialDistancing.ipynb.

For now the interface with SQLX is a rather rough system call to SQLX's script exPSDhour via an ssh connection. None of this is optimised or properly included in the class.

There is also a new very sketchy notebook demonstrating ho to use this new python object.

It now take a few minutes to get 3-component RMS over several months :)

FMassin commented 4 years ago

Should I leave this open for a little while ? What our working scheme for PR :) ? I'll wait from for feedback from at least @ThomasLecocq @claudiodsf ...

FMassin commented 4 years ago

Following uo on the nice clockplots added to the main notebook by @ThomasLecocq and the growing complexity, I mean to start developing within a module, than can be then imported in notebooks.

The module is seismosocialdistancing.py. I am proposing to put all our functions there and import the module in all notebooks instead of creating functions or long codes in notebook cells. In case it is not obvious, while developing a new function in module, one can reload the module with:

import imp
imp.reload(seismosocialdistancing)

I demonstrate how to in sqlxSocialDistancing.ipynb with:

ThomasLecocq commented 4 years ago

good idea !

FMassin commented 4 years ago

OK for merging?

ThomasLecocq commented 4 years ago

but yéé, merge !