[obspy-users] PPSD amplitude units

Tobias Megies megies at geophysik.uni-muenchen.de
Mon May 8 16:31:36 CEST 2017


Hi Joshua,

that's some strange units for a PPSD.. I'm guessing that's square root
of PSD of displacement spectrum..??

I think you'll have to subclass ObsPy's PPSD and reimplement the
__process() method (copy/paste/adapt the original __process method), i.e.:


```python
from obspy.signal import PPSD

class MyPPSD(PPSD):
    def __process(self, tr):
        # do your own processing here and insert data
        self.__insert_processed_data(tr.stats.starttime, smoothed_psd)
        return True

my_ppsd = MyPPSD(...)
my_ppsd.add(...)
...
```


cheers,
T



On 26/04/17 10:27, Joshua McCann wrote:
> Hi All,
> 
> I am currently plotting the PPSD and am trying to find a way to change
> the amplitude units.
> 
> They are currently Amplitude [m2/s4/Hz] [dB] but I would like them in
> m/(Hz)^1/2.
> 
> Doe anybody know if this can be done in a similar way to changing the x
> axis to frequency 'xaxis_frequency=True'?
> 
> If not how can I go about this?
> 
> Thanks
> 
> -- 
> Joshua McCann | BE(Hons) GradIEAust
> PhD Candidate
> E: joshua.mccann at research.uwa.edu.au
> <mailto:joshua.mccann at research.uwa.edu.au>
> E: mccannj at iinet.net.au <mailto:mccannj at iinet.net.au>
> M: +61419942172
> School of Physics
> University of Western Australia
> 
> 
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.swapbytes.de
> http://lists.swapbytes.de/mailman/listinfo/obspy-users
> 

-- 
Dipl.-Geophys. Tobias Megies

EMail: tobias.megies at lmu.de
WWW: https://www.geophysik.uni-muenchen.de

Geophysikalisches Observatorium
Ludwigshöhe 8
82256 Fürstenfeldbruck

Tel: +49 (0) 89 2180-73981
Fax: +49 (0) 89 2180-73970

Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München

Tel: +49 (0) 89 2180-4326
Fax: +49 (0) 89 2180-4205


More information about the obspy-users mailing list