Help with Python computation to calculate age of universe

Pavkazz
Messages
2
Reaction score
0

Homework Statement


I'm using python to calculate the age of the universe, by working out the distmodulus for a set of galaxys (using the V and I bands) then working out the distance in parsecs and then hubbles constant etc... I keep getting values that are 10s of magnitudes out which I assume has something to do with my unit conversion.

Homework Equations


vrec = H0*Dgal.
5 log dpc − 5 + AV = µ + AV

The Attempt at a Solution


Below is my code to work out hubbles constant. My Distance mod is accurate [/B]
 

Attachments

  • Screen Shot 2016-01-29 at 14.52.30.png
    Screen Shot 2016-01-29 at 14.52.30.png
    102.8 KB · Views: 586
on Phys.org
What is AVG_DPC_V and what does the formula calculating it mean? What is f?
The Hubble constant is a factor 10 too large, that error propagates to the age of the universe.
 
By the way, if you enclose your code in "code" tags, we can see your code with the appropriate formatting and even run it if we like. This makes it easier for people to understand code related questions. Below is an example.

Code:
import numpy as np
x = 0.5
y = np.sin(x)
print "The sine of %f is %f"%(x,y)
 
mfb said:
What is AVG_DPC_V and what does the formula calculating it mean? What is f?
The Hubble constant is a factor 10 too large, that error propagates to the age of the universe.
Average distance in the V band and the formula calculating is (5 log dpc − 5 + AV = µ + AV) which is dpc = 10^u/5 + 1. I think I may have solved the issue? Is it simply the bracket in the equation above where I am calculating (10^u/5) +1 not 10^(u/5 + 1)?
 
The +1 should be in the exponent, right.
 

Similar threads

Replies
5
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
17K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K