.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_examples/Basic_Plots/plot_ellipsod_on_image.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__examples_Basic_Plots_plot_ellipsod_on_image.py: Plot geometrical model to an image ---------------------------------- In this example, we use PyThea's utilities to plot the ellipsoid model to a coronagraphic image from LASCO-C2. This example is a combination of two examples that show how to load, process, and plot an image and how to load a fitting file and construct the geometrical model. .. GENERATED FROM PYTHON SOURCE LINES 9-10 Import Required Modules .. GENERATED FROM PYTHON SOURCE LINES 10-24 .. code-block:: Python from datetime import datetime, timedelta import astropy.units as u import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from sunpy.coordinates import frames from sunpy.net import attrs as a from PyThea.config import selected_imagers from PyThea.data.sample_data import json_fitting_file_sample_data from PyThea.geometrical_models import ellipsoid from PyThea.utils import (download_fits, load_fits, make_figure, model_fittings, single_imager_maps_process) .. GENERATED FROM PYTHON SOURCE LINES 25-26 Select the imager and specify the time range of the query. .. GENERATED FROM PYTHON SOURCE LINES 26-33 .. code-block:: Python imager = 'LC2' date_process = datetime.strptime('2021-10-28T16:30:00', '%Y-%m-%dT%H:%M:%S') time_range = [-1, 1] timerange = a.Time(date_process + timedelta(hours=time_range[0]), date_process + timedelta(hours=time_range[1])) .. GENERATED FROM PYTHON SOURCE LINES 34-35 Download the fits files from VSO using the ``download_fits`` utility. .. GENERATED FROM PYTHON SOURCE LINES 35-39 .. code-block:: Python files = download_fits(timerange, imager) maps = load_fits(files) .. rst-class:: sphx-glr-script-out .. code-block:: none Results from 1 Provider: 10 Results from the VSOClient: Source: https://sdac.virtualsolar.org/cgi/search Data retrieval status: https://docs.virtualsolar.org/wiki/VSOHealthReport Total estimated size: 21.084 Mbyte Start Time End Time Source Instrument Provider Physobs Extent Type Size Mibyte ----------------------- ----------------------- ------ ---------- -------- --------- ----------- ------- 2021-10-28 15:36:06.000 2021-10-28 15:36:31.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 15:48:05.000 2021-10-28 15:48:31.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 16:00:05.000 2021-10-28 16:00:30.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 16:12:05.000 2021-10-28 16:12:30.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 16:24:06.000 2021-10-28 16:24:31.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 16:36:05.000 2021-10-28 16:36:30.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 16:48:05.000 2021-10-28 16:48:30.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 17:00:05.000 2021-10-28 17:00:30.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 17:12:06.000 2021-10-28 17:12:31.000 SOHO LASCO SDAC intensity CORONA 2.01074 2021-10-28 17:24:05.000 2021-10-28 17:24:30.000 SOHO LASCO SDAC intensity CORONA 2.01074 Files Downloaded: 0%| | 0/10 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ellipsod_on_image.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_ellipsod_on_image.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_