# Is window length and overlapping is available is PPSD	function?

**URL:** https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [May 12, 2020, 4:00pm UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891 "2020-05-12T16:00:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Vivek.G.Babu](https://discourse.obspy.org/user_avatar/discourse.obspy.org/vivek.g.babu/32/378_2.png) [@Vivek.G.Babu](https://discourse.obspy.org/u/Vivek.G.Babu)
#### Post date: [May 12, 2020, 4:00pm UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891/1 "2020-05-12T16:00:22Z")

</div>

Is it possible to include window length and overlapping in PPSD function?

---

<div class="post-metadata">

### Author: ![ThomasLecocq](https://discourse.obspy.org/user_avatar/discourse.obspy.org/thomaslecocq/32/10_2.png) [@ThomasLecocq](https://discourse.obspy.org/u/ThomasLecocq)
#### Post date: [May 15, 2020, 6:19am UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891/2 "2020-05-15T06:19:26Z")

</div>

yes:

[https://docs.obspy.org/packages/autogen/obspy.signal.spectral\_estimation.PPSD. **init**.html#obspy.signal.spectral\_estimation.PPSD. **init**](https://docs.obspy.org/packages/autogen/obspy.signal.spectral_estimation.PPSD. __init__.html#obspy.signal.spectral_estimation.PPSD. __init__ )

---

<div class="post-metadata">

### Author: ![Beatriz\_Gaite\_Castri](https://discourse.obspy.org/user_avatar/discourse.obspy.org/beatriz_gaite_castri/32/269_2.png) [@Beatriz\_Gaite\_Castri](https://discourse.obspy.org/u/Beatriz_Gaite_Castri)
#### Post date: [June 3, 2020, 4:41pm UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891/3 "2020-06-03T16:41:20Z")

</div>

Dear all,

I am wondering how to extract the time of each PSD using PPSD.

I get PSD value for each segment and the period limits and center period using extract\_psd\_values(self, period):

However, how can I get the corresponding time of each PSD segment. If I use all the record it is quite easy to guess the corresponding time, but in case I am not filling the gaps, and therefore, the number of segments is not the default one, I do not know the time that corresponds to each PSD segment.

Any idea is welcome.  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![ThomasLecocq](https://discourse.obspy.org/user_avatar/discourse.obspy.org/thomaslecocq/32/10_2.png) [@ThomasLecocq](https://discourse.obspy.org/u/ThomasLecocq)
#### Post date: [June 4, 2020, 5:24am UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891/4 "2020-06-04T05:24:23Z")

</div>

Hi,

You can access to the internals; either look at the PPSD.plot() method in the obspy code , or check how we did here:

Best regards,

Thomas

---

<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: [June 4, 2020, 7:29am UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891/5 "2020-06-04T07:29:39Z")

</div>

Hi Beatriz,

as mentioned in the documentation for PPSD.extract\_psd\_values() you can  
access ppsd.times\_processed to look up the start times of each PSD  
segment. The ordering is the same. The full PSD segments can be accessed  
via PPSD.psd\_values as well, if you are not looking for one specific  
frequency.

> **[obspy.signal.spectral\_estimation.PPSD.extract\_psd\_values — ObsPy...](https://docs.obspy.org/master/packages/autogen/obspy.signal.spectral_estimation.PPSD.extract_psd_values.html?highlight=time)**

best,  
Tobias

---

<div class="post-metadata">

### Author: ![Beatriz\_Gaite\_Castri](https://discourse.obspy.org/user_avatar/discourse.obspy.org/beatriz_gaite_castri/32/269_2.png) [@Beatriz\_Gaite\_Castri](https://discourse.obspy.org/u/Beatriz_Gaite_Castri)
#### Post date: [June 4, 2020, 7:54am UTC](https://discourse.obspy.org/t/is-window-length-and-overlapping-is-available-is-ppsd-function/891/6 "2020-06-04T07:54:04Z")

</div>

Thank you Tobias.

I feel a bit embarrassed, I skip this command (ppsd.times\_processed) when reading the information.

Regards.  
Beatriz
