Help with Python computation to calculate age of universe

Click For Summary

Discussion Overview

The discussion revolves around using Python to compute the age of the universe by calculating the distance modulus for a set of galaxies using the V and I bands. Participants are addressing issues related to unit conversions and the accuracy of the Hubble constant in their calculations.

Discussion Character

  • Homework-related
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant describes their approach to calculating the age of the universe using Python, mentioning issues with unit conversion leading to inaccurate results.
  • Another participant questions the meaning of AVG_DPC_V and the formula used to calculate it, highlighting concerns about the Hubble constant being too large and its impact on the age calculation.
  • A suggestion is made to use "code" tags for better code visibility and understanding.
  • There is a discussion about the formula for average distance in the V band, with one participant proposing a potential solution related to the placement of the +1 in the exponent of the equation.
  • Another participant confirms that the +1 should indeed be in the exponent, indicating a possible correction to the formula.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the correct placement of terms in the formula and whether the Hubble constant is accurately represented. There is no clear consensus on the resolution of these issues.

Contextual Notes

Participants have not fully resolved the mathematical steps related to the calculation of distance and the implications for the age of the universe. There are also dependencies on definitions that remain unclear.

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: 572
Technology news 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
2K
  • · 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