exosim.tasks.sed.createPlanckStar#
Classes#
Create a star SED using the Planck function. |
Module Contents#
- class CreatePlanckStar[source]#
Bases:
exosim.tasks.task.TaskCreate a star SED using the Planck function.
The star emission is simulated by
astropy.modeling.physical_models.BlackBody. The resulting sed is then converted into \(W/m^2/sr/\mu m\) and scaled by the solid angle \(\pi \left( \frac{R}{D} \right)^2\).- Returns:
Star Sed
- Return type:
Examples
>>> from exosim.tasks.sed import CreatePlanckStar >>> import astropy.units as u >>> import numpy as np >>> createPlanckStar = CreatePlanckStar() >>> wl = np.linspace(0.5, 7.8, 10000) * u.um >>> T = 6086 * u.K >>> R = 1.18 * u.R_sun >>> D = 47 * u.au >>> sed = createPlanckStar(wavelength=wl, T=T, R=R, D=D)
>>> import matplotlib.pyplot as plt >>> plt.plot(sed.spectral, sed.data[0,0]) >>> plt.ylabel(sed.data_units) >>> plt.xlabel(sed.spectral_units) >>> plt.show()