{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np \n", "import sys\n", "sys.path.append(\"../../utils/\")\n", "\n", "from tomoatt_data_retrieval import get_data_from_ascii\n", "\n", "#\n", "# plot calculated travel time field\n", "\n", "# number of grids\n", "nx = 50 \n", "ny = 50\n", "nz = 10\n", "\n", "# read coordiantes from file\n", "fname_grid = \"OUTPUT_FILES/out_grid.out\"\n", "\n", "\n", "# read data\n", "_src_id = 0\n", "_inv_id = 0\n", "\n", "# filling 0 for digit\n", "inv_id = str(_inv_id).zfill(4)\n", "src_id = str(_src_id).zfill(4)\n", "fname_data = \"OUTPUT_FILES/T_res_inv_{}_src_{}.dat\".format(inv_id, src_id)\n", "\n", "data = get_data_from_ascii(fname_data, fname_grid, nz, ny, nx, 2, 1,2, verbose=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# plot\n", "import matplotlib.pyplot as plt\n", "\n", "fig, axs = plt.subplots(3, 1, figsize=(15, 5))\n", "\n", "axs[0].imshow(data[5,:,:], cmap='jet', interpolation='nearest')\n", "axs[0].set_title('lon-lat')\n", "\n", "axs[1].imshow(data[:,25,:], cmap='jet', interpolation='nearest')\n", "axs[1].set_title('r-lon')\n", "\n", "axs[2].imshow(data[:,:,25], cmap='jet', interpolation='nearest')\n", "axs[2].set_title('r-lat')\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.1 64-bit ('3.9.1')", "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.9.1" }, "vscode": { "interpreter": { "hash": "02f83e1f4cd9619657a6845405e2dd67c4de23753ba48bca5dce2ebf57b3813a" } } }, "nbformat": 4, "nbformat_minor": 2 }