We wrote the code in python to accomplish these calculations. From the rectangular patch, it's area was calculated in square degrees. Since the sky sphere is covered entirely by 1 radian, it was converted to degrees and surface area of entire sky was calculated. It is estimated that there are 5500 Galaxies in one patch. Code is given below.
"""
PROJECT: ESTIMATING THE TOTAL GALAXIES IN THE OBSERVABLE UNIVERSE
DATA SOURCE: NASA Hubble eXtreme Deep Field (XDF)
The XDF is a tiny 'keyhole' view of the sky. By calculating how many
of these 'keyholes' fit into the entire sky, we can estimate the total
number of galaxies in existence.
"""
import math
# --- 1. CONVERSION CONSTANTS ---
# Geometry of the sky is measured in arcminutes and arcseconds.
# 1 degree = 60 arcminutes. This is essential for converting tiny telescope
# patches into standard degrees.
ONE_DEGREE = 60 # arcminutes per degree
ONE_ARCMIN = 60 # arcseconds per arcminute
# --- 2. THE XDF PATCH DIMENSIONS ---
# The XDF patch is incredibly small: 2.3 x 2.0 arcminutes.
# For context, the Full Moon is about 31 arcminutes wide!
width_arcmins, height_arcmins = 2.3, 2.0
# Convert arcminutes to decimal degrees so we can calculate area
width_degs = width_arcmins / ONE_DEGREE
height_degs = height_arcmins / ONE_DEGREE
print(f"XDF Patch Width: {width_degs:.4f}°")
print(f"XDF Patch Height: {height_degs:.4f}°")
# Area of a rectangle (on a small scale) = width * height
area_patch = width_degs * height_degs
print(f"Area of XDF Patch: {area_patch:.7f} sq. degrees")
# --- 3. CALCULATING THE TOTAL SURFACE AREA OF THE SKY ---
# Space is a sphere surrounding the Earth. The surface area of a sphere is 4πr².
# To get square degrees, we treat the 'radius' as 180/π degrees.
radius_in_degrees = 180 / math.pi
# The total area of the entire sky (sphere) in square degrees
# This should result in approximately 41,253 sq. deg.
area_sky = 4 * math.pi * (radius_in_degrees**2)
print(f"Total Area of Sky: {area_sky:,.2f} sq. degrees")
# --- 4. SCALING UP ---
# How many XDF-sized 'tiles' would it take to cover the whole sky?
num_patches = area_sky / area_patch
print(f"Total XDF patches needed to cover sky: {num_patches:,.0f}")
# Based on the XDF data, there are roughly 5,500 galaxies in this one tiny tile.
galaxies_per_patch = 5500
total_universe_galaxies = galaxies_per_patch * num_patches
print(f"\nESTIMATED TOTAL GALAXIES IN SKY: {total_universe_galaxies:,.0f}")
print("-" * 65)
# --- 5. THE COSMIC TIME MACHINE (LOOKBACK TIME) ---
# Because light takes time to travel, looking further away is looking
# deeper into the past.
galaxies_distribution = {
10: "Seen as they were < 5 Billion Years ago",
30: "Seen as they were 5 to 9 Billion Years ago",
60: "Seen as they were > 9 Billion Years ago (Ancient Universe)"
}
print(f"{'COSMIC AGE DISTRIBUTION':<45 count="">15}")
print("-" * 65)
for pct, description in galaxies_distribution.items():
# Calculating the subset of the total population
count = (pct / 100) * total_universe_galaxies
print(f"{description:<45 count:="">15,.0f}")
45>45>
If you like it, please encourage me. My name is Ranjit Singh. I retired from ONGC as a scientist. 
No comments:
Post a Comment