
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "gallery/lightning-creek-magnetic.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_gallery_lightning-creek-magnetic.py>`
        to download the full example code

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gallery_lightning-creek-magnetic.py:


Magnetic anomaly grid of the Lightning Creek Sill Complex, Australia
--------------------------------------------------------------------

This is a section of an airborne survey acquired in 1990 by the Queensland
Government, Australia. The grid has 50 m resolution (UTM coordinates) and
is at a uniform orthometric height of 500 m.

**Original source:**
`Geophysical Acquisition & Processing Section 2019. MIM Data from Mt Isa
Inlier, QLD (P1029), magnetic line data, AWAGS levelled. Geoscience Australia,
Canberra <http://pid.geoscience.gov.au/dataset/ga/142419>`__

**Pre-processing:** `Source code for preparation of the original dataset for
redistribution in Ensaio
<https://github.com/fatiando-data/lightning-creek-magnetic-grid>`__

.. GENERATED FROM PYTHON SOURCE LINES 25-31

.. code-block:: Python


    import pygmt
    import xarray as xr

    import ensaio








.. GENERATED FROM PYTHON SOURCE LINES 32-33

Download and cache the data and return the path to it on disk

.. GENERATED FROM PYTHON SOURCE LINES 33-36

.. code-block:: Python

    fname = ensaio.fetch_lightning_creek_magnetic(version=1)
    print(fname)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    /home/runner/work/_temp/cache/ensaio/v1/lightning-creek-magnetic-grid.nc




.. GENERATED FROM PYTHON SOURCE LINES 37-38

Load the netCDF grid with xarray

.. GENERATED FROM PYTHON SOURCE LINES 38-41

.. code-block:: Python

    data = xr.load_dataarray(fname)
    data






.. raw:: html

    <div class="output_subarea output_html rendered_html output_result">
    <div><svg style="position: absolute; width: 0; height: 0; overflow: hidden">
    <defs>
    <symbol id="icon-database" viewBox="0 0 32 32">
    <path d="M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z"></path>
    <path d="M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
    <path d="M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
    </symbol>
    <symbol id="icon-file-text2" viewBox="0 0 32 32">
    <path d="M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z"></path>
    <path d="M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    <path d="M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    <path d="M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    </symbol>
    </defs>
    </svg>
    <style>/* CSS stylesheet for displaying xarray objects in notebooks */

    :root {
      --xr-font-color0: var(
        --jp-content-font-color0,
        var(--pst-color-text-base rgba(0, 0, 0, 1))
      );
      --xr-font-color2: var(
        --jp-content-font-color2,
        var(--pst-color-text-base, rgba(0, 0, 0, 0.54))
      );
      --xr-font-color3: var(
        --jp-content-font-color3,
        var(--pst-color-text-base, rgba(0, 0, 0, 0.38))
      );
      --xr-border-color: var(
        --jp-border-color2,
        hsl(from var(--pst-color-on-background, white) h s calc(l - 10))
      );
      --xr-disabled-color: var(
        --jp-layout-color3,
        hsl(from var(--pst-color-on-background, white) h s calc(l - 40))
      );
      --xr-background-color: var(
        --jp-layout-color0,
        var(--pst-color-on-background, white)
      );
      --xr-background-color-row-even: var(
        --jp-layout-color1,
        hsl(from var(--pst-color-on-background, white) h s calc(l - 5))
      );
      --xr-background-color-row-odd: var(
        --jp-layout-color2,
        hsl(from var(--pst-color-on-background, white) h s calc(l - 15))
      );
    }

    html[theme="dark"],
    html[data-theme="dark"],
    body[data-theme="dark"],
    body.vscode-dark {
      --xr-font-color0: var(
        --jp-content-font-color0,
        var(--pst-color-text-base, rgba(255, 255, 255, 1))
      );
      --xr-font-color2: var(
        --jp-content-font-color2,
        var(--pst-color-text-base, rgba(255, 255, 255, 0.54))
      );
      --xr-font-color3: var(
        --jp-content-font-color3,
        var(--pst-color-text-base, rgba(255, 255, 255, 0.38))
      );
      --xr-border-color: var(
        --jp-border-color2,
        hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))
      );
      --xr-disabled-color: var(
        --jp-layout-color3,
        hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))
      );
      --xr-background-color: var(
        --jp-layout-color0,
        var(--pst-color-on-background, #111111)
      );
      --xr-background-color-row-even: var(
        --jp-layout-color1,
        hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))
      );
      --xr-background-color-row-odd: var(
        --jp-layout-color2,
        hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))
      );
    }

    .xr-wrap {
      display: block !important;
      min-width: 300px;
      max-width: 700px;
      line-height: 1.6;
      padding-bottom: 4px;
    }

    .xr-text-repr-fallback {
      /* fallback to plain text repr when CSS is not injected (untrusted notebook) */
      display: none;
    }

    .xr-header {
      padding-top: 6px;
      padding-bottom: 6px;
    }

    .xr-header {
      border-bottom: solid 1px var(--xr-border-color);
      margin-bottom: 4px;
    }

    .xr-header > div,
    .xr-header > ul {
      display: inline;
      margin-top: 0;
      margin-bottom: 0;
    }

    .xr-obj-type,
    .xr-obj-name {
      margin-left: 2px;
      margin-right: 10px;
    }

    .xr-obj-type,
    .xr-group-box-contents > label {
      color: var(--xr-font-color2);
      display: block;
    }

    .xr-sections {
      padding-left: 0 !important;
      display: grid;
      grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;
      margin-block-start: 0;
      margin-block-end: 0;
    }

    .xr-section-item {
      display: contents;
    }

    .xr-section-item > input,
    .xr-group-box-contents > input,
    .xr-array-wrap > input {
      display: block;
      opacity: 0;
      height: 0;
      margin: 0;
    }

    .xr-section-item > input + label,
    .xr-var-item > input + label {
      color: var(--xr-disabled-color);
    }

    .xr-section-item > input:enabled + label,
    .xr-var-item > input:enabled + label,
    .xr-array-wrap > input:enabled + label,
    .xr-group-box-contents > input:enabled + label {
      cursor: pointer;
      color: var(--xr-font-color2);
    }

    .xr-section-item > input:focus-visible + label,
    .xr-var-item > input:focus-visible + label,
    .xr-array-wrap > input:focus-visible + label,
    .xr-group-box-contents > input:focus-visible + label {
      outline: auto;
    }

    .xr-section-item > input:enabled + label:hover,
    .xr-var-item > input:enabled + label:hover,
    .xr-array-wrap > input:enabled + label:hover,
    .xr-group-box-contents > input:enabled + label:hover {
      color: var(--xr-font-color0);
    }

    .xr-section-summary {
      grid-column: 1;
      color: var(--xr-font-color2);
      font-weight: 500;
      white-space: nowrap;
    }

    .xr-section-summary > em {
      font-weight: normal;
    }

    .xr-span-grid {
      grid-column-end: -1;
    }

    .xr-section-summary > span {
      display: inline-block;
      padding-left: 0.3em;
    }

    .xr-group-box-contents > input:checked + label > span {
      display: inline-block;
      padding-left: 0.6em;
    }

    .xr-section-summary-in:disabled + label {
      color: var(--xr-font-color2);
    }

    .xr-section-summary-in + label:before {
      display: inline-block;
      content: "►";
      font-size: 11px;
      width: 15px;
      text-align: center;
    }

    .xr-section-summary-in:disabled + label:before {
      color: var(--xr-disabled-color);
    }

    .xr-section-summary-in:checked + label:before {
      content: "▼";
    }

    .xr-section-summary-in:checked + label > span {
      display: none;
    }

    .xr-section-summary,
    .xr-section-inline-details,
    .xr-group-box-contents > label {
      padding-top: 4px;
    }

    .xr-section-inline-details {
      grid-column: 2 / -1;
    }

    .xr-section-details {
      grid-column: 1 / -1;
      margin-top: 4px;
      margin-bottom: 5px;
    }

    .xr-section-summary-in ~ .xr-section-details {
      display: none;
    }

    .xr-section-summary-in:checked ~ .xr-section-details {
      display: contents;
    }

    .xr-children {
      display: inline-grid;
      grid-template-columns: 100%;
      grid-column: 1 / -1;
      padding-top: 4px;
    }

    .xr-group-box {
      display: inline-grid;
      grid-template-columns: 0px 30px auto;
    }

    .xr-group-box-vline {
      grid-column-start: 1;
      border-right: 0.2em solid;
      border-color: var(--xr-border-color);
      width: 0px;
    }

    .xr-group-box-hline {
      grid-column-start: 2;
      grid-row-start: 1;
      height: 1em;
      width: 26px;
      border-bottom: 0.2em solid;
      border-color: var(--xr-border-color);
    }

    .xr-group-box-contents {
      grid-column-start: 3;
      padding-bottom: 4px;
    }

    .xr-group-box-contents > label::before {
      content: "📂";
      padding-right: 0.3em;
    }

    .xr-group-box-contents > input:checked + label::before {
      content: "📁";
    }

    .xr-group-box-contents > input:checked + label {
      padding-bottom: 0px;
    }

    .xr-group-box-contents > input:checked ~ .xr-sections {
      display: none;
    }

    .xr-group-box-contents > input + label > span {
      display: none;
    }

    .xr-group-box-ellipsis {
      font-size: 1.4em;
      font-weight: 900;
      color: var(--xr-font-color2);
      letter-spacing: 0.15em;
      cursor: default;
    }

    .xr-array-wrap {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 20px auto;
    }

    .xr-array-wrap > label {
      grid-column: 1;
      vertical-align: top;
    }

    .xr-preview {
      color: var(--xr-font-color3);
    }

    .xr-array-preview,
    .xr-array-data {
      padding: 0 5px !important;
      grid-column: 2;
    }

    .xr-array-data,
    .xr-array-in:checked ~ .xr-array-preview {
      display: none;
    }

    .xr-array-in:checked ~ .xr-array-data,
    .xr-array-preview {
      display: inline-block;
    }

    .xr-dim-list {
      display: inline-block !important;
      list-style: none;
      padding: 0 !important;
      margin: 0;
    }

    .xr-dim-list li {
      display: inline-block;
      padding: 0;
      margin: 0;
    }

    .xr-dim-list:before {
      content: "(";
    }

    .xr-dim-list:after {
      content: ")";
    }

    .xr-dim-list li:not(:last-child):after {
      content: ",";
      padding-right: 5px;
    }

    .xr-has-index {
      font-weight: bold;
    }

    .xr-var-list,
    .xr-var-item {
      display: contents;
    }

    .xr-var-item > div,
    .xr-var-item label,
    .xr-var-item > .xr-var-name span {
      background-color: var(--xr-background-color-row-even);
      border-color: var(--xr-background-color-row-odd);
      margin-bottom: 0;
      padding-top: 2px;
    }

    .xr-var-item > .xr-var-name:hover span {
      padding-right: 5px;
    }

    .xr-var-list > li:nth-child(odd) > div,
    .xr-var-list > li:nth-child(odd) > label,
    .xr-var-list > li:nth-child(odd) > .xr-var-name span {
      background-color: var(--xr-background-color-row-odd);
      border-color: var(--xr-background-color-row-even);
    }

    .xr-var-name {
      grid-column: 1;
    }

    .xr-var-dims {
      grid-column: 2;
    }

    .xr-var-dtype {
      grid-column: 3;
      text-align: right;
      color: var(--xr-font-color2);
    }

    .xr-var-preview {
      grid-column: 4;
    }

    .xr-index-preview {
      grid-column: 2 / 5;
      color: var(--xr-font-color2);
    }

    .xr-var-name,
    .xr-var-dims,
    .xr-var-dtype,
    .xr-preview,
    .xr-attrs dt {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding-right: 10px;
    }

    .xr-var-name:hover,
    .xr-var-dims:hover,
    .xr-var-dtype:hover,
    .xr-attrs dt:hover {
      overflow: visible;
      width: auto;
      z-index: 1;
    }

    .xr-var-attrs,
    .xr-var-data,
    .xr-index-data {
      display: none;
      border-top: 2px dotted var(--xr-background-color);
      padding-bottom: 20px !important;
      padding-top: 10px !important;
    }

    .xr-var-attrs-in + label,
    .xr-var-data-in + label,
    .xr-index-data-in + label {
      padding: 0 1px;
    }

    .xr-var-attrs-in:checked ~ .xr-var-attrs,
    .xr-var-data-in:checked ~ .xr-var-data,
    .xr-index-data-in:checked ~ .xr-index-data {
      display: block;
    }

    .xr-var-data > table {
      float: right;
    }

    .xr-var-data > pre,
    .xr-index-data > pre,
    .xr-var-data > table > tbody > tr {
      background-color: transparent !important;
    }

    .xr-var-name span,
    .xr-var-data,
    .xr-index-name div,
    .xr-index-data,
    .xr-attrs {
      padding-left: 25px !important;
    }

    .xr-attrs,
    .xr-var-attrs,
    .xr-var-data,
    .xr-index-data {
      grid-column: 1 / -1;
    }

    dl.xr-attrs {
      padding: 0;
      margin: 0;
      display: grid;
      grid-template-columns: 125px auto;
    }

    .xr-attrs dt,
    .xr-attrs dd {
      padding: 0;
      margin: 0;
      float: left;
      padding-right: 10px;
      width: auto;
    }

    .xr-attrs dt {
      font-weight: normal;
      grid-column: 1;
    }

    .xr-attrs dt:hover span {
      display: inline-block;
      background: var(--xr-background-color);
      padding-right: 10px;
    }

    .xr-attrs dd {
      grid-column: 2;
      white-space: pre-wrap;
      word-break: break-all;
    }

    .xr-icon-database,
    .xr-icon-file-text2,
    .xr-no-icon {
      display: inline-block;
      vertical-align: middle;
      width: 1em;
      height: 1.5em !important;
      stroke-width: 0;
      stroke: currentColor;
      fill: currentColor;
    }

    .xr-var-attrs-in:checked + label > .xr-icon-file-text2,
    .xr-var-data-in:checked + label > .xr-icon-database,
    .xr-index-data-in:checked + label > .xr-icon-database {
      color: var(--xr-font-color0);
      filter: drop-shadow(1px 1px 5px var(--xr-font-color2));
      stroke-width: 0.8px;
    }
    </style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;total_field_anomaly&#x27; (northing: 370, easting: 346)&gt; Size: 1MB
    array([[  34.99995117,   36.19995117,   36.69995117, ..., -101.10004883,
            -100.40004883,  -99.60004883],
           [  36.49995117,   37.59995117,   37.99995117, ..., -102.20004883,
            -101.50004883, -100.70004883],
           [  37.09995117,   38.19995117,   38.59995117, ..., -103.30004883,
            -102.60004883, -101.90004883],
           ...,
           [ 182.79995117,  172.39995117,  160.79995117, ...,    0.79995117,
             -24.20004883,  -41.80004883],
           [ 182.09995117,  172.59995117,  161.39995117, ...,    5.99995117,
             -21.50004883,  -41.00004883],
           [ 178.79995117,  170.39995117,  160.29995117, ...,   11.39995117,
             -16.00004883,  -35.80004883]], shape=(370, 346))
    Coordinates:
      * northing  (northing) float64 3kB 7.576e+06 7.576e+06 ... 7.595e+06 7.595e+06
      * easting   (easting) float64 3kB 4.655e+05 4.656e+05 ... 4.827e+05 4.828e+05
        height    (northing, easting) float64 1MB 500.0 500.0 500.0 ... 500.0 500.0
    Attributes:
        Conventions:   CF-1.8
        title:         Magnetic total-field anomaly of the Lightning Creek sill c...
        crs:           proj=utm zone=54 south datum=WGS84 units=m no_defs ellps=W...
        source:        Interpolated from airborne magnetic line data using gradie...
        license:       Creative Commons Attribution 4.0 International Licence
        references:    Geophysical Acquisition &amp; Processing Section 2019. MIM Dat...
        long_name:     total-field magnetic anomaly
        units:         nT
        actual_range:  [-1785.  3798.]</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-obj-name'>&#x27;total_field_anomaly&#x27;</div><ul class='xr-dim-list'><li><span class='xr-has-index'>northing</span>: 370</li><li><span class='xr-has-index'>easting</span>: 346</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-28615e26-3376-4282-8df5-269edb8e9fd4' class='xr-array-in' type='checkbox' checked><label for='section-28615e26-3376-4282-8df5-269edb8e9fd4' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>35.0 36.2 36.7 36.6 36.3 35.6 ... 113.1 78.6 43.7 11.4 -16.0 -35.8</span></div><div class='xr-array-data'><pre>array([[  34.99995117,   36.19995117,   36.69995117, ..., -101.10004883,
            -100.40004883,  -99.60004883],
           [  36.49995117,   37.59995117,   37.99995117, ..., -102.20004883,
            -101.50004883, -100.70004883],
           [  37.09995117,   38.19995117,   38.59995117, ..., -103.30004883,
            -102.60004883, -101.90004883],
           ...,
           [ 182.79995117,  172.39995117,  160.79995117, ...,    0.79995117,
             -24.20004883,  -41.80004883],
           [ 182.09995117,  172.59995117,  161.39995117, ...,    5.99995117,
             -21.50004883,  -41.00004883],
           [ 178.79995117,  170.39995117,  160.29995117, ...,   11.39995117,
             -16.00004883,  -35.80004883]], shape=(370, 346))</pre></div></div></li><li class='xr-section-item'><input id='section-8e7bb485-1633-4508-9d95-785bafbd3b2e' class='xr-section-summary-in' type='checkbox' checked /><label for='section-8e7bb485-1633-4508-9d95-785bafbd3b2e' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>northing</span></div><div class='xr-var-dims'>(northing)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>7.576e+06 7.576e+06 ... 7.595e+06</div><input id='attrs-db495e18-a72c-48ab-b079-0ebbf34c9f96' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-db495e18-a72c-48ab-b079-0ebbf34c9f96' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6b6bc501-aebc-4cdc-adac-cd2a31c75be7' class='xr-var-data-in' type='checkbox'><label for='data-6b6bc501-aebc-4cdc-adac-cd2a31c75be7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>UTM northing</dd><dt><span>standard_name :</span></dt><dd>projection_y_coordinate</dd><dt><span>units :</span></dt><dd>m</dd><dt><span>actual_range :</span></dt><dd>[7576368.82029097 7594818.82029097]</dd></dl></div><div class='xr-var-data'><pre>array([7576368.820291, 7576418.820291, 7576468.820291, ..., 7594718.820291,
           7594768.820291, 7594818.820291], shape=(370,))</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>easting</span></div><div class='xr-var-dims'>(easting)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>4.655e+05 4.656e+05 ... 4.828e+05</div><input id='attrs-bb2c435f-8af6-4a57-9326-b82a0c5b3ee1' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-bb2c435f-8af6-4a57-9326-b82a0c5b3ee1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a9bf130c-5e49-4193-9039-739c5bc6f634' class='xr-var-data-in' type='checkbox'><label for='data-a9bf130c-5e49-4193-9039-739c5bc6f634' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>UTM easting</dd><dt><span>standard_name :</span></dt><dd>projection_x_coordinate</dd><dt><span>units :</span></dt><dd>m</dd><dt><span>actual_range :</span></dt><dd>[465533.31767977 482783.31767977]</dd></dl></div><div class='xr-var-data'><pre>array([465533.31768, 465583.31768, 465633.31768, ..., 482683.31768,
           482733.31768, 482783.31768], shape=(346,))</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>height</span></div><div class='xr-var-dims'>(northing, easting)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>500.0 500.0 500.0 ... 500.0 500.0</div><input id='attrs-b51982c2-6c52-41a0-b4ee-02c0cbd66d0d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b51982c2-6c52-41a0-b4ee-02c0cbd66d0d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d64af4a6-587f-4a0d-b2bf-af8dde4fbf5d' class='xr-var-data-in' type='checkbox'><label for='data-d64af4a6-587f-4a0d-b2bf-af8dde4fbf5d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>orthometric height</dd><dt><span>standard_name :</span></dt><dd>height_above_geopotential_datum</dd><dt><span>units :</span></dt><dd>m</dd><dt><span>actual_range :</span></dt><dd>[500. 500.]</dd></dl></div><div class='xr-var-data'><pre>array([[500., 500., 500., ..., 500., 500., 500.],
           [500., 500., 500., ..., 500., 500., 500.],
           [500., 500., 500., ..., 500., 500., 500.],
           ...,
           [500., 500., 500., ..., 500., 500., 500.],
           [500., 500., 500., ..., 500., 500., 500.],
           [500., 500., 500., ..., 500., 500., 500.]], shape=(370, 346))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c002cd2f-a2fa-4b5a-8602-799341b91b74' class='xr-section-summary-in' type='checkbox' checked /><label for='section-c002cd2f-a2fa-4b5a-8602-799341b91b74' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(9)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.8</dd><dt><span>title :</span></dt><dd>Magnetic total-field anomaly of the Lightning Creek sill complex, Australia</dd><dt><span>crs :</span></dt><dd>proj=utm zone=54 south datum=WGS84 units=m no_defs ellps=WGS84 towgs84=0,0,0</dd><dt><span>source :</span></dt><dd>Interpolated from airborne magnetic line data using gradient-boosted equivalent sources</dd><dt><span>license :</span></dt><dd>Creative Commons Attribution 4.0 International Licence</dd><dt><span>references :</span></dt><dd>Geophysical Acquisition &amp; Processing Section 2019. MIM Data from Mt Isa Inlier, QLD (P1029), magnetic line data, AWAGS levelled. Geoscience Australia, Canberra. http://pid.geoscience.gov.au/dataset/ga/142419</dd><dt><span>long_name :</span></dt><dd>total-field magnetic anomaly</dd><dt><span>units :</span></dt><dd>nT</dd><dt><span>actual_range :</span></dt><dd>[-1785.  3798.]</dd></dl></div></li></ul></div></div>
    </div>
    <br />
    <br />

.. GENERATED FROM PYTHON SOURCE LINES 42-43

Make a PyGMT pseudo-color map of the total field magnetic anomaly.

.. GENERATED FROM PYTHON SOURCE LINES 43-59

.. code-block:: Python

    fig = pygmt.Figure()
    scale = 2500
    pygmt.makecpt(cmap="polar+h", series=[-scale, scale], background=True)
    fig.grdimage(
        grid=data,
        cmap=True,
        shading="+a45+nt0.1",
        projection="X15c/17c",
        frame="af",
    )
    fig.colorbar(
        frame='af+l"total field magnetic anomaly [nT]"',
        position="JBC+h+o0/1c+e",
    )
    fig.show()




.. image-sg:: /gallery/images/sphx_glr_lightning-creek-magnetic_001.png
   :alt: lightning creek magnetic
   :srcset: /gallery/images/sphx_glr_lightning-creek-magnetic_001.png
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 60-61

The anomaly at the top right is the  Lightning Creek sill complex.


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 3.228 seconds)


.. _sphx_glr_download_gallery_lightning-creek-magnetic.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: lightning-creek-magnetic.ipynb <lightning-creek-magnetic.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: lightning-creek-magnetic.py <lightning-creek-magnetic.py>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
