.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/map_interface.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_map_interface.py: Plotting Data on a Map ====================== This example demonstrates how to use the `MapInterface` to plot instrument data, such as radar scans, on a geographical map. .. GENERATED FROM PYTHON SOURCE LINES 10-17 .. code-block:: Python import datetime from arguslib import MapInstrument, Radar, Position from arguslib.camera.camera_array import CameraArray from arguslib.misc.plotting import plot_range_rings dt = datetime.datetime(2025, 3, 25, 9, 0, 0) .. GENERATED FROM PYTHON SOURCE LINES 18-23 Plotting a Radar Scan on a Map ------------------------------ The ``MapInstrument`` can be used to annotate ``Positions`` on a map. We can use it to visualise the position of other instruments. .. GENERATED FROM PYTHON SOURCE LINES 23-47 .. code-block:: Python mapper = MapInstrument.from_config("uk_wide") ax = mapper.show(dt) # Time is not used, but required for interface consistency mapper.annotate_positions( [Position(-0.17915, 51.49934, 0.0)], dt, ax, color="blue", marker="x", label="Imperial College London", ) mapper.annotate_positions( [Position(-2.80896, 54.05547, 0.0)], dt, ax, color="red", marker="x", label="Lancaster Castle", ) multicam = CameraArray.from_config("COBALTArray") plot_range_rings( mapper, multicam, None, ax=ax, ranges=[10], label="10 km from a COBALT camera" ) ax.legend() .. image-sg:: /auto_examples/images/sphx_glr_map_interface_001.png :alt: map interface :srcset: /auto_examples/images/sphx_glr_map_interface_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 23.252 seconds) .. _sphx_glr_download_auto_examples_map_interface.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: map_interface.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: map_interface.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: map_interface.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_