.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_examples/Basic_Plots/plot_fits_files.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_fits_files.py: Plots fits files for a selected imager -------------------------------------- This example shows how to download data for a selected imager, process the fits files, and plot an image. .. GENERATED FROM PYTHON SOURCE LINES 9-10 Import Required Modules .. GENERATED FROM PYTHON SOURCE LINES 10-19 .. code-block:: Python from datetime import datetime, timedelta import matplotlib.pyplot as plt from sunpy.net import attrs as a from PyThea.config import selected_imagers from PyThea.utils import (download_fits, load_fits, make_figure, single_imager_maps_process) .. GENERATED FROM PYTHON SOURCE LINES 20-21 Select the imager and specify the time range of the query. .. GENERATED FROM PYTHON SOURCE LINES 21-28 .. 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 29-30 Download the fits files from VSO using the ``download_fits`` utility. .. GENERATED FROM PYTHON SOURCE LINES 30-34 .. 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_fits_files.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_fits_files.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_