ThomasLecocq / SeismoRMS

A simple Jupyter Notebook example for getting the RMS of a seismic signal (from PSDs)
European Union Public License 1.1
87 stars 38 forks source link

Regarding power spectral density plot #29

Open Rahul1603 opened 1 year ago

Rahul1603 commented 1 year ago

I am trying to run the code SeismoRMS for Power spectral density. It is successfully running in your given portal. But while running on my computer, it is giving some error. The difference is your data and resp is taken online, and I am giving data from the folder in my computer. Could you help me to solve this?

Error is coming while plotting. Without this, I am not able to proceed.


Exception Traceback (most recent call last) Input In [13], in <cell line: 1>() ----> 1 [ppsd.plot(max_percentage=10) for mseedid, ppsd in ppsds.items()] 2 [ppsd.plot_temporal(0.10) for mseedid, ppsd in ppsds.items()] 3 [ppsd.plot_spectrogram(clim=(-160,-100)) for mseedid, ppsd in ppsds.items()]

Input In [13], in (.0) ----> 1 [ppsd.plot(max_percentage=10) for mseedid, ppsd in ppsds.items()] 2 [ppsd.plot_temporal(0.10) for mseedid, ppsd in ppsds.items()] 3 [ppsd.plot_spectrogram(clim=(-160,-100)) for mseedid, ppsd in ppsds.items()]

File ~\anaconda3\lib\site-packages\obspy\signal\spectral_estimation.py:1894, in PPSD.plot(self, filename, show_coverage, show_histogram, show_percentiles, percentiles, show_noise_models, grid, show, max_percentage, period_lim, show_mode, show_mean, cmap, cumulative, cumulative_number_of_colors, xaxis_frequency, show_earthquakes) 1821 """ 1822 Plot the 2D histogram of the current PPSD. 1823 If a filename is specified the plot is saved to this file, otherwise (...) 1891 in Hertz as opposed to the default of period in seconds. 1892 """ 1893 import matplotlib.pyplot as plt -> 1894 self.__check_histogram() 1895 fig = plt.figure() 1896 fig.ppsd = AttribDict()

File ~\anaconda3\lib\site-packages\obspy\signal\spectral_estimation.py:820, in PPSD.__check_histogram(self) 818 else: 819 msg = 'No data accumulated' --> 820 raise Exception(msg)

Exception: No data accumulated

FMassin commented 1 year ago

There is a channel for which "no data is accumulated" i.e. missing response or waveform, so you need to find it and remove it....