# Using obspy to set P and S waves

**URL:** https://discourse.obspy.org/t/using-obspy-to-set-p-and-s-waves/871
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [February 12, 2020, 4:46pm UTC](https://discourse.obspy.org/t/using-obspy-to-set-p-and-s-waves/871 "2020-02-12T16:46:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sergio59](https://discourse.obspy.org/user_avatar/discourse.obspy.org/sergio59/32/477_2.png) [@sergio59](https://discourse.obspy.org/u/sergio59)
#### Post date: [February 12, 2020, 4:46pm UTC](https://discourse.obspy.org/t/using-obspy-to-set-p-and-s-waves/871/1 "2020-02-12T16:46:09Z")

</div>

Hi all,

I have a waveform archive of some stations (about 20) divided in folders that are network/station/channel, and on each channel there are 1 file per day in mseed format. I’d like to find P, S and coincidences to calculate quakes with external program and store output in a dedicated db.

Is possible to do that?

Where I can start on it?

Best regards

Sergio

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [February 14, 2020, 10:16am UTC](https://discourse.obspy.org/t/using-obspy-to-set-p-and-s-waves/871/2 "2020-02-14T10:16:14Z")

</div>

Hi Sergio,

is it a SDS structure? then you can use the SDS Client for getting waveforms out of your folders:

> **[obspy.clients.filesystem.sds — ObsPy 1.4.1.post0+393.g271569d37b.obspy.master...](https://docs.obspy.org/master/packages/autogen/obspy.clients.filesystem.sds.html)**

Then take a look at the (coincidence) trigger Tutorial:

> **[Trigger/Picker Tutorial — ObsPy 1.4.2 documentation](https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html)**

cheers,  
Tobias

---

<div class="post-metadata">

### Author: ![sergio59](https://discourse.obspy.org/user_avatar/discourse.obspy.org/sergio59/32/477_2.png) [@sergio59](https://discourse.obspy.org/u/sergio59)
#### Post date: [February 17, 2020, 11:34am UTC](https://discourse.obspy.org/t/using-obspy-to-set-p-and-s-waves/871/3 "2020-02-17T11:34:44Z")

</div>

Hi Tobias,

Thanks for your answer.

Yes, my data are stored as SDS structure

I have see in the first one, and data are stored like the documentation.

I haven’t understand how import data from the second one (in the example, data are loaded with http access)

After that, data are 1 day long, and If I encoutered more than 1 pick, what can I do? I have to write in a text file? How can I look for coincidence with other stations? and so on

Sergio
