<jupyter_start><jupyter_text>Example to call the SED function<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from MorphSED.morphsed import sed_bc03

import matplotlib as mpl
mpl.rc("xtick", direction="in", labelsize=18)
mpl.rc("ytick", direction="in", labelsize=18)
mpl.rc("xtick.major", width=1., size=8)
mpl.rc("ytick.major", width=1., size=8)
mpl.rc("xtick.minor", width=1., size=5)
mpl.rc("ytick.minor", width=1., size=5)
wave = np.linspace(2000, 5e4, 1000)
z = 0.04  # metallicity
age = [0.5, 1, 5, 9]  # Gyr
logMs = 0

lum = []
for loop, a in enumerate(age):
    lum.append(sed_bc03(wave, z, a, logMs))

fig = plt.figure(figsize=(8, 5))
ax = plt.gca()

for loop, l in enumerate(lum):
    ax.plot(wave, l, color='C{0}'.format(loop), label='{0} Gyr'.format(age[loop]))
ax.legend(loc='upper right', fontsize=18)
ax.set_yscale('log')
ax.set_ylim([5e31, 2e34])
ax.set_xlabel(r'Wavelength ($\mathrm{\AA}$)', fontsize=24)
ax.set_ylabel(r'$\nu L_\nu (\mathrm{erg\,s^{-1}}$)', fontsize=24)
ax.minorticks_on()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20037629350893696, 'fraction_numerical': 0.04891815616180621, 'mean_word_length': 5.777070063694268, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '158896', 'license': 'MIT', 'n_tokens_mistral': 486, 'n_tokens_neox': 451, 'n_words': 94, 'path': 'examples/demo_sed_interp.ipynb', 'repo_name': 'jyshangguan/MorphSED', 'size': '1063'}