Note
Go to the end to download the full example code
Plot a Reference CCF
Traceback (most recent call last):
File "D:\PythonForSource\MSNoise_Stack\MSNoise\examples\plot_ref.py", line 24, in <module>
db = connect()
File "D:\PythonForSource\MSNoise_Stack\MSNoise\msnoise\core\db.py", line 104, in connect
engine = get_engine(inifile)
File "D:\PythonForSource\MSNoise_Stack\MSNoise\msnoise\core\db.py", line 67, in get_engine
dbini = read_db_inifile(inifile)
File "D:\PythonForSource\MSNoise_Stack\MSNoise\msnoise\core\db.py", line 156, in read_db_inifile
raise DBConfigNotFoundError(
msnoise.DBConfigNotFoundError: No db.ini file in this directory, please run 'msnoise db init' in this folder to initialize it as an MSNoise project folder.
import os
if "SPHINX_DOC_BUILD" in os.environ:
if "MSNOISE_DOC" in os.environ:
os.chdir(os.environ["MSNOISE_DOC"])
import matplotlib
matplotlib.use("agg")
import matplotlib.pyplot as plt
plt.style.use("ggplot")
from msnoise.core.db import connect
from msnoise.results import MSNoiseResult
# connect to the database
db = connect()
# Build a result object at the refstack step
result = MSNoiseResult.from_ids(db, preprocess=1, cc=1, filter=1, stack=1, refstack=1)
# Get the reference CCF for two stations, filter 1, ZZ component:
ref = result.get_ref(pair="PF.FJS.00:PF.FOR.00", components="ZZ",
)
ref.plot(figsize=(8, 8))
#EOF
Total running time of the script: ( 0 minutes 0.007 seconds)