Calculate absolute magnitude from visual magnitude for Sirius and Tau Ceti

import math
vmag = float(input("Visual magnitude?: "))
dist = float(input("Distance in light-years?: "))
amag = vmag-5*((math.log(dist/3.26156)/math.log(10))-1)
print ("Absolute magnitude=",amag)


About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s