Replies: 1 comment
-
Hi there, I would do the following: Before plotting, just create a Best, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone. I’m running into an issue when trying to work with CorrBulk objects. What I want to do is calculate the envelope of the correlations with the envelope() method after stacking them for a year, and then correct the decay of the envelope's amplitude using the correct_decay() method.
However, since it seems that it can not be apply envelope() and correct_decay() directly to a CorrStream object, my approach has been to create a CorrBulk object first, then calculate the envelope and correct the decay. But I’m encountering the following error:
Traceback (most recent call last):
File "/home/viana/SeisMIC-main/plot_corr.py", line 105, in
correnvelope_decay.plot(ylimits = [stime, etime])
File "/home/SeisMIC-main/src/seismic/correlate/stream.py", line 101, in plot
ax = plot_corr_bulk(self, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/SeisMIC-main/src/seismic/plot/plot_correlation.py", line 236, in plot_corr_bulk
raise NotImplementedError(
NotImplementedError: Correlation times have to be sampled at equal intervals.
This is part of the code:
stime = UTCDateTime("2020-01-01T00:00:00")
print(stime)
etime = UTCDateTime("2020-12-31T23:59:59")
print(etime)
###PLOTTING
for net in networks :
for sta in stations :
for com in comps :
corr_name = f"{net}.{sta}.{com}.h5"
I’m not sure if this is due to something I’m missing or if my logic is not correct in some way. Additionally, I’m wondering if after computing the envelope and correcting the decay, I should convert the CorrBulk object back into a CorrStream object and stack the envelopes again.
I would greatly appreciate any guidance on whether my workflow makes sense, or if there’s a better approach I should follow.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions