{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plot a Reference CCF\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import os\nif \"SPHINX_DOC_BUILD\" in os.environ:\n if \"MSNOISE_DOC\" in os.environ:\n os.chdir(os.environ[\"MSNOISE_DOC\"])\n\nimport matplotlib\nmatplotlib.use(\"agg\")\n\nimport matplotlib.pyplot as plt\n\nplt.style.use(\"ggplot\")\n\nfrom msnoise.core.db import connect\nfrom msnoise.results import MSNoiseResult\n\n# connect to the database\ndb = connect()\n\n# Build a result object at the refstack step\nresult = MSNoiseResult.from_ids(db, preprocess=1, cc=1, filter=1, stack=1, refstack=1)\n\n# Get the reference CCF for two stations, filter 1, ZZ component:\nref = result.get_ref(pair=\"PF.FJS.00:PF.FOR.00\", components=\"ZZ\",\n )\n\nref.plot(figsize=(8, 8))\n\n#EOF" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.15" } }, "nbformat": 4, "nbformat_minor": 0 }