Art and Web Design
Contact me for information about rates and availability.
Planetary Science Using Python
In the following tutorials we will explore the solar system using Python and popular data science libraries NumPy and Matplotlib, to perform various functions and to visualize large amounts of planetary data. By the end of these tutorials, we will have learned how to use Python to perform scientific calculations and Matplotlib to create visulaizations, and will hopefuly have gained new insights into our solar system's eternal journey around the galactic core.
Wein's Displacement Law
Wien's displacement law can be used to describe the relationship between the true temperature of a blackbody in degrees Kelvin and its dominant wavelength (λmax). The dominant wavelength of an object is important to thermal remote sensing and can be used to classify stars based on their temperature.
λmax = k / T
k = 2892 μm
T = temperature of object (in Kelvin)
The Solar System
Since the dawn of mankind we have look towards the stars with awe and wonder. Over the centuries, astronomy-priests have identified and tracked various celestial bodies that surround our world in a better attempt to understand the universe. Exploring our solar system gives us insight into the formation of our own planet and a possible view into the possible future of our planet. Everything from the sun, asteroids and comets, to dwarf planets, terrestrial planets and gas giants, have been explored and charted.
Before we begin coding our script, we need to collect the necessary planetary data. Most of the following data was obtained using the NASA Planetary Fact Sheet.
In this multi-part tutorial we will use Python and Matplotlib to calculate various atmospheric and aerodynamic variables that an object flying through Earth's atmosphere at various altitudes and velocities will encounter. Before we get into the Python code, we will take a closer look at the different layers of Earth's atmosphere.
With most of Earth's atmospheric gases located in the lowest layer of the atmosphere, the troposphere, the air becomes more dense as an object flies (or falls) at lower altitudes. Atmospheric gases are affected by incident solar radiation coming in from above and terrestrial drivers, such as hurricanes and tropical storms, forest fires, volcanic erruptions and nuclear detonations, coming up from below. It is within the lowest atmospheric layer, the troposphere, that most of life on earth can be found. Therefore, we will pay particular attention to this layer.
Severe Weather Tracker
Incoming solar radiation enters the Earth’s atmosphere, where some of this energy is absorbed by atmospheric gases, water vapor and dust particles. Some of this energy is scattered by the atmosphere and a portion is reflected by clouds in the troposphere. Energy that reaches Earth’s surface is absorbed by the ground, water and other surface features or reflected back towards space.
Earth’s weather is created by the interaction between incident solar energy and water vapor suspended in the atmosphere, although the air is not significantly heated by the sun directly. Earth’s surface absorbs most of this heat and the lowest layer of the atmosphere is then warmed from being in contact with the Earth’s surface through a process of heat exchange known as conduction. Warm air gradually spreads upwards and outwards as it cools, creating a movement of air in the process. This constant movement of air from high- to low-pressure areas, combined with the effects caused by Earth’s spinning, forces air to move counterclockwise and into low-pressure areas, while moving clockwise and out of high-pressure areas.
Sunspots are about 4000 K (compared to the normal 6000 K temperatures of the sun’s surface) which causes sunspots to appear dimmer than the surrounding photosphere. Sunspots show where the sun’s magnetic field is strongest. For example, the average magnetic field on the sun’s surface is 1 gauss, but in a sunspot, the magnetic field can be over 3,000 gauss. The higher magnetic fields within these areas keep the sunspots cool and therefore dark.
While most sunspots disappear with a day or two, some sunspots can be identified and tracked for weeks or even months at a time. The apparent movement of sunspots across the Sun’s surface indicates that the solar surface is rotating anticlockwise.
Effects of Gravity on Altitude
The planetary weight calculator allows you to calculate your weight while on the planet's surface and assumes that the surface of the planet is of uniform distance from its center. These equations therefore will not accurately reflect the weight of objects in space around Earth, or other planetary body.
Gravity is affected by only two variables and one constant. The universal gravitational constant (6.67408 * 10-11) cannot be changed and the planet's mass (5.98 * 1024) stays pretty much the same, therefore only your distance from the center of the Earth can be changed. Earth's surface is approximately 6378 * 102 km in altitude. When calculating the altitude of spacecraft and satellites, don't forget to add this distance to the distance of the spacecraft above the Earth's surface.
ge = G * Me / d2
In this tutorial we will explore the gravitational forces of the Sun and planets using Python and then learn how to plot these features for comparison using Matplotlib. For this tutorial we will be storing the mass and radius of each planet as a list of intergers and then calculating the gravitational acceleration (gp) and gravitational parameters (μ) for each planet.
Planetary Weight Calculator
This simple Python tutorial will show you how to build your own planetary weight calculator, will allow you to quickly calculate the weight of any object on each planet, the sun and the moon. To calculate your weight on each planet, use the gravitational acceleration vector for each planetary body, which is the product of the Universal Gravitational Constant (G) multiplied by the mass (m) of each planetary body (p) divided by the radius (r) of each body, squared.
gp = G * (mp/rp2)