.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_limber.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_limber.py: ===================== Simple Limber Example ===================== A simple example showing how to apply the Limber model to correct for Limb darkening in a small SST/CRISP image. This data is loaded using `astropy.fits`, but crispy could be used too. .. GENERATED FROM PYTHON SOURCE LINES 8-15 .. code-block:: default import matplotlib.pyplot as plt import numpy as np from astropy.io import fits from smug.limber_adapter import LimberAdapter from smug.limber_model import model_params, pretrained_limber .. GENERATED FROM PYTHON SOURCE LINES 16-17 Load the Ca 8542 Angstrom data .. GENERATED FROM PYTHON SOURCE LINES 17-20 .. code-block:: default im = fits.open("../tests/mini_crisp_l2_20140906_152724_8542_r00459.fits") .. GENERATED FROM PYTHON SOURCE LINES 21-22 Load pretrained limber network .. GENERATED FROM PYTHON SOURCE LINES 22-25 .. code-block:: default line = "CaII8542" model = pretrained_limber(line) .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading: "https://www.astro.gla.ac.uk/users/USER-MANAGED/solar_model_weights/Limber_CaII8542_1.0.0.pth.tar" to /home/runner/.cache/torch/hub/checkpoints/Limber_CaII8542_1.0.0.pth.tar 0%| | 0.00/77.7M [00:00` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_limber.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_