megies / obspyck

ObsPyck is a GUI application that is intended to cover the tasks in a standard analysis workflow for seismic events in seismological observatory practice.
https://github.com/megies/obspyck/wiki
GNU General Public License v2.0
61 stars 32 forks source link

Get displacements instead of velocities #43

Closed ChrisBail closed 6 years ago

ChrisBail commented 7 years ago

Tobias,

I'm pretty new to obspyck and the tool is great. I'm reading waveforms from an SDS Client and I give my stationXML as an argument in the command line. Is it possible to plot displacements instead of velocities?

Thanks a lot, Ch.

shicks-seismo commented 7 years ago

+1 for this feature. I'd also like to see a differentiate/integrate switch if possible.

megies commented 7 years ago

I'm considering to add this, as it's simple change. My proposal would be to add a config key physical_units with default velocity and reuse the existing m/s switch that would then be m if the config is set to displacement. That would be easiest to implement and would avoid adding more buttons to the already packed GUI.

Comments?

shicks-seismo commented 7 years ago

I think this should be fine. Just be careful in case acceleration traces are read in as well as velocity data (e.g. acceleration will need to be integrated twice compared to velocity).

ChrisBail commented 7 years ago

Yes that sounds great and simple!

megies commented 7 years ago

I think this should be fine. Just be careful in case acceleration traces are read in as well as velocity data (e.g. acceleration will need to be integrated twice compared to velocity).

I'm not concerned with that at all. I'm assuming that all data comes in as digital counts and instrument correction can be done as described by the metadata. Integration is then done internally in obspy using evalresp, specifying which target units it should convert to (m/s or m or m/s**2).

Yes that sounds great and simple!

Alright, I'm gonna add it this way, like I said, most simple and least invasive..

megies commented 7 years ago

Hmm.. actually, I saw that when using metadata from arclink/dataless SEED this is still done using the PAZ dictionary, so I'll have to switch it to use evalresp too..

megies commented 7 years ago

This is now a PR, let me know if it works for you..

ChrisBail commented 7 years ago

Worked for me! Nice one Tobias!

megies commented 6 years ago

Rebasing.. tip previously was at https://github.com/megies/obspyck/pull/43/commits/3a50cb63b7ee7052c1787cfd57b7805004e7a5a7