# ppsd.plot\_temporal

**URL:** <https://discourse.obspy.org/t/ppsd-plot-temporal/873>\
**Category:** Users Mailing List Archive\
**Tags:** archive\
**Created:** [February 28, 2020, 10:52am UTC](https://discourse.obspy.org/t/ppsd-plot-temporal/873 "2020-02-28T10:52:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jordi\_Diaz](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@Jordi\_Diaz](https://discourse.obspy.org/u/Jordi_Diaz)\
**Post date:** [February 28, 2020, 10:52am UTC](https://discourse.obspy.org/t/ppsd-plot-temporal/873/1 "2020-02-28T10:52:44Z")

</div>

Hi,

I’m using PPSD package in Obspy to calculate the PSD of a set of stations for several months. I’ve stocked the results for each station in a npz file using save\_npz. Then I recover them using load\_npz to plot different segments of the data.  
Using ppsd.calculate\_histogram(month=8) and then ppsd.plot I can plot the PDF curves for this August month. However, when using ppsd.plot\_temporal(1) or ppsd.plot\_spectrogram I get the plots of the full period, not for the selected month. How can I solve this ??

Best Regards  
Jordi

---

<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 28, 2020, 11:04am UTC](https://discourse.obspy.org/t/ppsd-plot-temporal/873/2 "2020-02-28T11:04:33Z")

</div>

Hi Jordi,

See [https://krischer.github.io/seismo\_live\_build/html/Ambient%20Seismic%20Noise/Probabilistic%20Power%20Spectral%20Densities\_wrapper.html](https://krischer.github.io/seismo_live_build/html/Ambient%20Seismic%20Noise/Probabilistic%20Power%20Spectral%20Densities_wrapper.html)

> **[obspy.signal.spectral\_estimation.PPSD.calculate\_histogram — ObsPy...](https://docs.obspy.org/master/packages/autogen/obspy.signal.spectral_estimation.PPSD.calculate_histogram.html)**

Also on ppsd you have an attribute `times_processed` that you can use to identify specific psd pieces.. look up the time value of interest, then use the index in the list to get the PSD from `psd_values` (same index as for the time info).

cheers,  
Tobias
