{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"drawing\"\n", "\n", "# 2.1.2.\tSynthetic - Data Gridding\n", "\n", "As explained in the [Synthetic - Data Gridding section](http://toolkit.geosci.xyz/content/Demos/SyntheticGrid.html#synthetic-data-gridding), magnetic data should be gridded prior to applying transforms and filters. This means that the flight line data must be interpolated on a regular 2D grid. \n", "\n", "To run the widget, select each cell below (greyed boxes below with \"## Load all libraries...\" and \"view = Simulator.dataGriddingWidget...\") and press **[Shift+Enter]**, or select each cell and click on the **'Run'** button in the menu at the top of the notebook. ![runcell](./images/runcell_30per_ppt.PNG)\n", "\n", "The resulting gridded data shows the larger and smaller magnetic bodies, and the magnetic low related to the northwest trending structure cross-cutting the larger magnetic domain.\n", "\n", "Try changing the grid cell size in the box labelled **'Grid (m)'**, and view the result of gridding using the four different methods listed in the drop down menu labelled **'Method'**.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "## Load all libraries and setup the synthetic problem\n", "from GeoToolkit.Mag import Mag, ProblemSetter, MathUtils, Simulator, DataIO\n", "import numpy as np\n", "\n", "survey = np.loadtxt(\"./assets/TKC/Synthetic_Forward_TMI.dat\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "view = Simulator.dataGriddingWidget(\n", " survey, saveAs=\"./Output/DataGrid\", dataColumn=4,\n", " Method=\"minimumCurvature\", omit=[\"EPSGcode\",\"GetIncDec\",\"saveAs\",\"SaveGrid\"],\n", " shapeFile='./assets/Synthetic/Synthetic_Zcontours.shp')\n", "display(view)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " " ] } ], "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.7.0" } }, "nbformat": 4, "nbformat_minor": 2 }