.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_radynversion_adapter.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_radynversion_adapter.py: =========================== Simple Radynversion Example =========================== The following illustrates configuring and using Radynversion with some small SST/CRISP images. To load this data we use the `crispy package `_. .. GENERATED FROM PYTHON SOURCE LINES 9-15 .. code-block:: default from crispy import CRISPSequence from crispy.utils import CRISP_sequence_constructor from matplotlib import pyplot as plt from smug.radynversion_adapter import RadynversionAdapter from smug.radynversion_model import model_params, pretrained_radynversion .. GENERATED FROM PYTHON SOURCE LINES 16-17 Plot the Halpha intensity map (see crispy's documentation for how this is used.). .. GENERATED FROM PYTHON SOURCE LINES 17-25 .. code-block:: default files = [ "../tests/mini_crisp_l2_20140906_152724_6563_r00459.fits", "../tests/mini_crisp_l2_20140906_152724_8542_r00459.fits", ] ims = CRISPSequence(CRISP_sequence_constructor(files)) ims.list[0][7].intensity_map() plt.show() .. image-sg:: /auto_examples/images/sphx_glr_plot_radynversion_adapter_001.png :alt: 2014-09-06T16:55:57.057 λ=6564.58Å (Δλ = -0.0Å) :srcset: /auto_examples/images/sphx_glr_plot_radynversion_adapter_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/astropy/wcs/wcs.py:725: FITSFixedWarning: 'datfix' made the change 'Set MJD-AVG to 56906.705521 from DATE-AVG'. warnings.warn( /opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/astropy/wcs/wcs.py:725: FITSFixedWarning: 'datfix' made the change 'Set MJD-AVG to 56906.705580 from DATE-AVG'. warnings.warn( /opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/astropy/wcs/wcsapi/fitswcs.py:493: AstropyUserWarning: target cannot be converted to ICRS, so will not be set on SpectralCoord warnings.warn('target cannot be converted to ICRS, so will ' .. GENERATED FROM PYTHON SOURCE LINES 26-28 Configure model, and Adapter class containing utilities to run the model and correctly transform the parameters. .. GENERATED FROM PYTHON SOURCE LINES 28-35 .. code-block:: default radynversion_version = "1.1.1" ad = RadynversionAdapter( model=pretrained_radynversion(version=radynversion_version), **model_params[radynversion_version] ) .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading: "https://www.astro.gla.ac.uk/users/USER-MANAGED/solar_model_weights/Radynversion_1.1.1.pth.tar" to /home/runner/.cache/torch/hub/checkpoints/Radynversion_1.1.1.pth.tar 0%| | 0.00/45.2M [00:00` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_radynversion_adapter.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_