Demonstration: The Sun
Bernard Korites · Apress eBooks · 2023
This chapter demonstrates how you can use Python to plot and label curves that represent mathematical functions. Our focus of interest will be the Sun. We will plot Max Planck’s spectrum of radiation, which will be used to represent the energy spectrum emitted by the Sun. Then we will calculate the Sun’s total power output and the amount that reaches Earth, which is called the solar constant . The scientific aspects of this section are quite interesting, as is the history of their development. The major benefit from a Python programming aspect is seeing how Python can be used to set up plots, perform numerical integration, display numerical data, and put labels and notes on the plots. Plus you will learn some interesting facts about solar physics. Much of this chapter relates to photons, which were discussed in Chapter 11. All illustrations in this chapter were produced using Python.