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

.. only:: html

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

        :ref:`Go to the end <sphx_glr_download_gallery_morroco_speleothem_qdm.py>`
        to download the full example code

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

.. _sphx_glr_gallery_morroco_speleothem_qdm.py:


QDM magnetic microscopy dataset of a speleothem from Morocco
------------------------------------------------------------

High-resolution magnetic map of a stalagmite sample from Wintimdouine Cave,
Morocco, created using Quantum Diamond Microscope (QDM) measurements at Harvard
University. The data were collected to explore the magnetic remanence
properties of hematite and magnetite within the sample, providing insight into
past geomagnetic field variations recorded in cave deposits.

**Original source:** Carmo, Janine; Fu, Roger; Trindade, Ricardo; Piascik,
Samuel (2023). QDM magnetic microscopy dataset of a speleothem from
Morocco. figshare. Dataset.
`10.6084/m9.figshare.22965200.v1
<https://doi.org/10.6084/m9.figshare.22965200.v1>`__

**Pre-processing:** `Source code for preparation of the original dataset for
redistribution in Ensaio
<https://github.com/fatiando-data/morroco-speleothem-qdm>`__

.. GENERATED FROM PYTHON SOURCE LINES 28-34

.. code-block:: Python


    import matplotlib.pyplot as plt
    import xarray as xr

    import ensaio








.. GENERATED FROM PYTHON SOURCE LINES 35-37

Download and cache the data and return the path to it on disk. We'll use the
netCDF version because it's smaller and can be loaded with xarray easily.

.. GENERATED FROM PYTHON SOURCE LINES 37-40

.. code-block:: Python

    fname = ensaio.fetch_morroco_speleothem_qdm(version=1, file_format="netcdf")
    print(fname)





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

 .. code-block:: none

    /home/runner/work/_temp/cache/ensaio/v1/morroco-speleothem-qdm.nc




.. GENERATED FROM PYTHON SOURCE LINES 41-42

Load the netCDF grid with xarray

.. GENERATED FROM PYTHON SOURCE LINES 42-45

.. 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;bz&#x27; (y: 600, x: 960)&gt; Size: 2MB
    array([[ 352.40588  ,   94.89138  ,   41.619244 , ...,  470.18835  ,
             129.20056  ,   18.50121  ],
           [ 525.0481   ,  624.8466   ,   53.45418  , ...,  450.42517  ,
             240.12456  ,  -73.61368  ],
           [ 105.09393  ,  638.7656   ,  307.60736  , ...,  236.91327  ,
             386.84982  ,  -86.442154 ],
           ...,
           [ -83.74368  ,   32.98078  , -411.75073  , ...,  745.9937   ,
            1036.2003   , -140.64317  ],
           [ 171.17114  , -214.47801  ,  159.23438  , ...,  124.58138  ,
             258.5433   ,  -90.33769  ],
           [  80.609505 ,  273.08368  ,  118.23499  , ...,   -4.1957254,
             -53.55728  ,    2.1033592]], shape=(600, 960), dtype=float32)
    Coordinates:
      * y        (y) float64 5kB 0.0 2.35 4.7 7.05 ... 1.403e+03 1.405e+03 1.408e+03
      * x        (x) float64 8kB 0.0 2.35 4.7 7.05 ... 2.249e+03 2.251e+03 2.254e+03
        z        (y, x) float32 2MB 5.0 5.0 5.0 5.0 5.0 5.0 ... 5.0 5.0 5.0 5.0 5.0
    Attributes:
        Conventions:   CF-1.8
        title:         QDM magnetic microscopy dataset of a speleothem from Morocco
        source:        Measured on a Quantum Diamond Microscope (QDM) at Harvard ...
        license:       CC0 1.0 Universal
        references:    Carmo, Janine; Fu, Roger; Trindade, Ricardo; Piascik, Samu...
        long_name:     vertical magnetic field
        units:         nT
        actual_range:  [-236933.  301265.]</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;bz&#x27;</div><ul class='xr-dim-list'><li><span class='xr-has-index'>y</span>: 600</li><li><span class='xr-has-index'>x</span>: 960</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-f85dffdb-7f9a-46ee-b01e-b813366be7e5' class='xr-array-in' type='checkbox' checked><label for='section-f85dffdb-7f9a-46ee-b01e-b813366be7e5' 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>352.4 94.89 41.62 288.4 404.5 ... 101.0 -186.6 -4.196 -53.56 2.103</span></div><div class='xr-array-data'><pre>array([[ 352.40588  ,   94.89138  ,   41.619244 , ...,  470.18835  ,
             129.20056  ,   18.50121  ],
           [ 525.0481   ,  624.8466   ,   53.45418  , ...,  450.42517  ,
             240.12456  ,  -73.61368  ],
           [ 105.09393  ,  638.7656   ,  307.60736  , ...,  236.91327  ,
             386.84982  ,  -86.442154 ],
           ...,
           [ -83.74368  ,   32.98078  , -411.75073  , ...,  745.9937   ,
            1036.2003   , -140.64317  ],
           [ 171.17114  , -214.47801  ,  159.23438  , ...,  124.58138  ,
             258.5433   ,  -90.33769  ],
           [  80.609505 ,  273.08368  ,  118.23499  , ...,   -4.1957254,
             -53.55728  ,    2.1033592]], shape=(600, 960), dtype=float32)</pre></div></div></li><li class='xr-section-item'><input id='section-6cb46ab1-57b0-4212-a37b-17a6870289c9' class='xr-section-summary-in' type='checkbox' checked /><label for='section-6cb46ab1-57b0-4212-a37b-17a6870289c9' 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'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 2.35 ... 1.405e+03 1.408e+03</div><input id='attrs-6fd46659-62e2-42ec-bd37-64b3798b62b7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6fd46659-62e2-42ec-bd37-64b3798b62b7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8d6e2d85-b331-4e61-a4fb-b1d8b6697fd9' class='xr-var-data-in' type='checkbox'><label for='data-8d6e2d85-b331-4e61-a4fb-b1d8b6697fd9' 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>units :</span></dt><dd>µm</dd></dl></div><div class='xr-var-data'><pre>array([   0.  ,    2.35,    4.7 , ..., 1402.95, 1405.3 , 1407.65], shape=(600,))</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 2.35 ... 2.251e+03 2.254e+03</div><input id='attrs-9b3d8c0d-0866-4c53-ad01-74c31b7923aa' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9b3d8c0d-0866-4c53-ad01-74c31b7923aa' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ebb613a4-065a-4b1c-a17c-347c45c60051' class='xr-var-data-in' type='checkbox'><label for='data-ebb613a4-065a-4b1c-a17c-347c45c60051' 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>units :</span></dt><dd>µm</dd></dl></div><div class='xr-var-data'><pre>array([   0.  ,    2.35,    4.7 , ..., 2248.95, 2251.3 , 2253.65], shape=(960,))</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>z</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>5.0 5.0 5.0 5.0 ... 5.0 5.0 5.0 5.0</div><input id='attrs-61dc27ca-ca18-4d25-b448-61f18e6580d9' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-61dc27ca-ca18-4d25-b448-61f18e6580d9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-75dd47c2-1f5c-457a-b642-8e9b2cdcfcf3' class='xr-var-data-in' type='checkbox'><label for='data-75dd47c2-1f5c-457a-b642-8e9b2cdcfcf3' 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>sensor sample distance</dd><dt><span>units :</span></dt><dd>µm</dd></dl></div><div class='xr-var-data'><pre>array([[5., 5., 5., ..., 5., 5., 5.],
           [5., 5., 5., ..., 5., 5., 5.],
           [5., 5., 5., ..., 5., 5., 5.],
           ...,
           [5., 5., 5., ..., 5., 5., 5.],
           [5., 5., 5., ..., 5., 5., 5.],
           [5., 5., 5., ..., 5., 5., 5.]], shape=(600, 960), dtype=float32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-aa030ef4-bcc4-4ff4-ac52-fac67ee6d5af' class='xr-section-summary-in' type='checkbox' checked /><label for='section-aa030ef4-bcc4-4ff4-ac52-fac67ee6d5af' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(8)</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>QDM magnetic microscopy dataset of a speleothem from Morocco</dd><dt><span>source :</span></dt><dd>Measured on a Quantum Diamond Microscope (QDM) at Harvard University, using a stalagmite from Wintimdouine cave (Morroco).</dd><dt><span>license :</span></dt><dd>CC0 1.0 Universal</dd><dt><span>references :</span></dt><dd>Carmo, Janine; Fu, Roger; Trindade, Ricardo; Piascik, Samuel (2023). QDM magnetic microscopy dataset of a speleothem from Morocco. figshare. Dataset. https://doi.org/10.6084/m9.figshare.22965200.v1</dd><dt><span>long_name :</span></dt><dd>vertical magnetic field</dd><dt><span>units :</span></dt><dd>nT</dd><dt><span>actual_range :</span></dt><dd>[-236933.  301265.]</dd></dl></div></li></ul></div></div>
    </div>
    <br />
    <br />

.. GENERATED FROM PYTHON SOURCE LINES 46-48

Make a pseudo-color map of the magnetic microscopy data and adjust the scale
because of some very strong sources.

.. GENERATED FROM PYTHON SOURCE LINES 48-53

.. code-block:: Python

    fig, ax = plt.subplots(1, 1, figsize=(9, 4.8), layout="constrained")
    scale = 2500
    data.plot.imshow(ax=ax, cmap="RdBu_r", vmin=-scale, vmax=scale)
    ax.set_aspect("equal")
    plt.show()



.. image-sg:: /gallery/images/sphx_glr_morroco_speleothem_qdm_001.png
   :alt: morroco speleothem qdm
   :srcset: /gallery/images/sphx_glr_morroco_speleothem_qdm_001.png
   :class: sphx-glr-single-img






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

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


.. _sphx_glr_download_gallery_morroco_speleothem_qdm.py:

.. only:: html

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

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

      :download:`Download Jupyter notebook: morroco_speleothem_qdm.ipynb <morroco_speleothem_qdm.ipynb>`

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

      :download:`Download Python source code: morroco_speleothem_qdm.py <morroco_speleothem_qdm.py>`


.. only:: html

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

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