{ "cells": [ { "cell_type": "markdown", "id": "c517647d-3226-4224-bfac-5ebc53a64bbe", "metadata": { "tags": [] }, "source": [ "# Prepare Aeromagnetic data" ] }, { "cell_type": "markdown", "id": "3d8939aa-84cf-4ed5-9de3-cf115acb5c9e", "metadata": {}, "source": [ "This tutorial demonstrates the preparation of XYZ airborne magnetic data for QC.\n", "___" ] }, { "cell_type": "markdown", "id": "43dcceee-3807-438d-bfa9-c87d7458c729", "metadata": {}, "source": [ "First, import the required python packages, ..." ] }, { "cell_type": "code", "execution_count": null, "id": "6541a9e4-d579-44cf-839d-a97a80ef6513", "metadata": { "tags": [] }, "outputs": [], "source": [ "from pathlib import Path\n", "import galileoQC as qc" ] }, { "cell_type": "markdown", "id": "61d1ac72-d0fe-4eab-aad3-bf2335ce52a5", "metadata": {}, "source": [ "... then set the path to the geowhizz files.\n", "\n", "This is all very much step by step to illustrate the process, and you can certainly compress some of these steps in your own work." ] }, { "cell_type": "code", "execution_count": null, "id": "b0ec9460-4290-44bd-8840-e76d537ee3e0", "metadata": {}, "outputs": [], "source": [ "dx = Path(r'./MagData/FD013_Mag.xyz')\n", "dh = dx.with_suffix(\".hdf5\")" ] }, { "cell_type": "code", "execution_count": null, "id": "a5e570dd-26c5-4974-a8e0-9d1c68c07bb1", "metadata": {}, "outputs": [], "source": [ "# asegToHdf fails if the file exists so delete it if it does. CHECK\n", "if dx.with_suffix('.hdf5').exists(): \n", " dx.with_suffix('.hdf5').unlink()" ] }, { "cell_type": "markdown", "id": "3d1e649d-16bf-4b6a-8750-3630f60ef33c", "metadata": {}, "source": [ "**The Measured Survey Data**" ] }, { "cell_type": "code", "execution_count": null, "id": "32ae67d6-4215-403b-8e37-b93be09551f5", "metadata": {}, "outputs": [], "source": [ "dh = qc.xyzToHDF(dx, projectName='Melbourne Aeromag', verbose=True)" ] }, { "cell_type": "code", "execution_count": null, "id": "57d039c4-7050-4fcc-bad6-cf93d4015a3a", "metadata": {}, "outputs": [], "source": [ "block_name = 'FD013 field data'\n", "qc.updateProject(dh, acquirer='SGL', blockID=block_name)\n", "qc.updateCoordFrame(dh, \n", " lat='LAT', \n", " lon='LONG', \n", " x='MGA-X', \n", " y='MGA-Y', \n", " time='FTIME', \n", " alt='MGA-Z', \n", " geoDatum='GDA2020', \n", " htDatum='GRS80', \n", " projection='UTM', \n", " utmz='55')" ] }, { "cell_type": "code", "execution_count": null, "id": "909ff398-c73b-4ba2-8101-0bdee9d3bd2e", "metadata": {}, "outputs": [], "source": [ "qc.updateLineAttributes(dh, line_type='SGL_GA', flight_chan='FLIGHT')" ] }, { "cell_type": "code", "execution_count": null, "id": "ce49fed5-facc-45f3-88c9-be1f7b01aa69", "metadata": {}, "outputs": [], "source": [ "qc.updateChannelAttributes(dh, 'MGA-X', units='m')\n", "qc.updateChannelAttributes(dh, 'MGA-Y', units='m')\n", "qc.updateChannelAttributes(dh, 'MGA-Z', units='m')\n", "qc.updateChannelAttributes(dh, 'MSL-Z', units='m')\n", "qc.updateChannelAttributes(dh, 'DEM', units='m')\n", "qc.updateChannelAttributes(dh, 'LAT', units='deg')\n", "qc.updateChannelAttributes(dh, 'LONG', units='deg')\n", "qc.updateChannelAttributes(dh, 'DIURNAL', units='nT')\n", "qc.updateChannelAttributes(dh, 'COMPMAG', units='nT')\n", "qc.updateChannelAttributes(dh, 'DCMAG', units='nT')\n", "qc.updateChannelAttributes(dh, 'IGRFMAG', units='nT')\n", "qc.updateChannelAttributes(dh, 'LVLDMAG', units='nT')" ] }, { "cell_type": "code", "execution_count": null, "id": "ff95a7f4-19a1-4cd4-99cb-97d5a93455a0", "metadata": {}, "outputs": [], "source": [ "qc.reportLines(dh)" ] }, { "cell_type": "code", "execution_count": null, "id": "fff53cc4-800c-4036-bcc3-6612f218b0d6", "metadata": {}, "outputs": [], "source": [ "qc.reportSampling(dh)" ] }, { "cell_type": "code", "execution_count": null, "id": "3a0b5484-74ac-4eea-b8fb-704061418aaf", "metadata": {}, "outputs": [], "source": [ "qc.reportChannels(dh, verbose=True)" ] }, { "cell_type": "markdown", "id": "55561434-65d4-4896-a3f7-d0658e704dcb", "metadata": {}, "source": [ "**Make a survey flight-line map**\n", "\n", "A map showing the flown lines (blue) against the planned lines (red). This provides a visual check that the lines are in about the right location and shows the amount of the survey flown so far. The map title, and the x and y axes are labelled using metadata stored in the `geoWhizz` file." ] }, { "cell_type": "code", "execution_count": null, "id": "7448cd64-02b4-4fc2-a4dd-82d3f7a31b04", "metadata": {}, "outputs": [], "source": [ "qc.linesMap([Path(dh)])" ] }, { "cell_type": "code", "execution_count": null, "id": "0f6215aa-14ef-4cb3-9302-ff459d22d53e", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.18" } }, "nbformat": 4, "nbformat_minor": 5 }