obspy.signal.spectral_estimation.PPSD.__init__¶
- PPSD.__init__(stats, paz=None, parser=None, skip_on_gaps=False, is_rotational_data=False, db_bins=(-200, -50, 1.0), ppsd_length=3600.0, overlap=0.5, water_level=600.0)[source]¶
Initialize the PPSD object setting all fixed information on the station that should not change afterwards to guarantee consistent spectral estimates. The necessary instrument response information can be provided in two ways:
- Providing an obspy.xseed Parser, e.g. containing metadata from a Dataless SEED file. This is the safer way but it might a bit slower because for every processed time segment the response information is extracted from the parser.
- Providing a dictionary containing poles and zeros information. Be aware that this leads to wrong results if the instrument’s response is changing with data added to the PPSD. Use with caution!
Note : When using is_rotational_data=True the applied processing steps are changed. Differentiation of data (converting velocity to acceleration data) will be omitted and a flat instrument response is assumed, leaving away response removal and only dividing by paz[‘sensitivity’] specified in the provided paz dictionary (other keys do not have to be present then). For scaling factors that are usually multiplied to the data remember to use the inverse as paz[‘sensitivity’].
Parameters: - stats (Stats) Stats of the station/instrument to process
- paz (dict, optional) Response information of instrument. If not specified the information is supposed to be present as stats.paz.
- parser (obspy.xseed.parser.Parser, optional) Parser instance with response information (e.g. read from a Dataless SEED volume)
- skip_on_gaps (bool, optional) Determines whether time segments with gaps should be skipped entirely. [McNamara2004] merge gappy traces by filling with zeros. This results in a clearly identifiable outlier psd line in the PPSD visualization. Select skip_on_gaps=True for not filling gaps with zeros which might result in some data segments shorter than ppsd_length not used in the PPSD.
- is_rotational_data (bool, optional) If set to True adapt processing of data to rotational data. See note for details.
- db_bins (tuple of three ints/floats) Specify the lower and upper boundary and the width of the db bins. The bin width might get adjusted to fit a number of equally spaced bins in between the given boundaries.
- ppsd_length (float, optional) Length of data segments passed to psd in seconds. In the paper by [McNamara2004] a value of 3600 (1 hour) was chosen. Longer segments increase the upper limit of analyzed periods but decrease the number of analyzed segments.
- overlap (float, optional) Overlap of segments passed to psd. Overlap may take values between 0 and 1 and is given as fraction of the length of one segment, e.g. ppsd_length=3600 and overlap=0.5 result in an overlap of 1800s of the segments.
- water_level (float, optional) Water level used in instrument correction.