<jupyter_start><jupyter_text>Spectrally variable `SPOT`<jupyter_code><script>
    // Force "pop out" links to open in the browser (rather than download)
    document.addEventListener("DOMContentLoaded", function(event) { 
        var links = document.getElementsByClassName("reference download internal")
            for (var i = 0; i < links.length; i++) { 
                links[i].outerHTML = links[i].outerHTML.replace("download=\"\"", "");
            }
    });
</script><jupyter_output><empty_output><jupyter_text>%matplotlib inline %run notebook_setup.py import starryfrom pathlib import Pathstarry_path = Path(starry.__file__).parents[0]starry.config.lazy = Falsestarry.config.quiet = True<jupyter_code>In this notebook we'll instantiate a Doppler map with spectrally variable features and visualize it with the interactive ``show()`` method. The plots below are fully interactive: move the mouse and scroll over the maps to control the spectra that are displayed below them.<jupyter_output><empty_output><jupyter_text>import starryimport numpy as np  Instantiatemap = starry.DopplerMap(15, nt=20, nc=4, inc=60, veq=30000) Four images containing each of the letters in "SPOT" We'll flip them so that they are brightimage = np.flipud(plt.imread(starry_path / "img" / "spot.png"))image = np.mean(image[:, :, :3], axis=2)nlat, nlon = image.shapeimages = np.zeros((4, nlat, nlon))for n in range(4):    images[n] = np.zeros_like(image)    idx = slice(n * nlon // 4, (n + 1) * nlon // 4)    images[n][:, idx] = 1 - image[:, idx]images += 0.1 Four corresponding absorption linesmu = np.array([642.925, 642.975, 643.025, 643.075])sig = 0.0085dw = map.wav0.reshape(1, -1) - mu.reshape(-1, 1)spectra = 1.0 - np.exp(-0.5 * dw ** 2 / sig ** 2) Load it all into the mapmap.load(maps=images, spectra=spectra, smoothing=0.075) Visualizemap.visualize() map.visualize(file="doppler_variable.html")<jupyter_code>Click here to :download:`pop out <doppler_variable.html>` the visualization.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13595617529880477, 'fraction_numerical': 0.03386454183266932, 'mean_word_length': 4.707386363636363, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '439501', 'license': 'MIT', 'n_tokens_mistral': 711, 'n_tokens_neox': 656, 'n_words': 178, 'path': 'notebooks/DopplerImagingGallery_Variable.ipynb', 'repo_name': 'rodluger/starry', 'size': '2008'}