PPSD amplitude units

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?


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.:

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(...)