Friday, June 18, 2010

Likelihood fitting of distance modulus




I have begun writing a Matlab code to compute the distance modulus, reddening, and age of a cluster through Bayesian statistics. As a first step, I am keeping the proper age and fitting only for distance modulus with cluster NGC 752. For a range of distances around the proper value, I computed the tau squared of the fit, the -2 sum of the logs of the probabilities. Right now I am doing this with two for loops, one for each distance and one for each star, but when I get the code better I wish to use only matrix manipulation, since Matlab is optimized for working with matrices.

After correcting a few errors, I did manage to get a plot which looks right and gives back an answer somewhere in the ball park. I get a distance modulus of 7.36. The actual distance modulus is 8.18 and I can see just looking at the graph that 7.36 is too low. This may be occuring from a line of stars to the right of the main sequence and below the red giant area. Moving downward gets them, out in the middle of no where, closer to the sequence.

My next steps involve getting rid of the for loops, figuring out exactly why the fit is bad, and then working in fitting for age as well.

2 comments:

  1. I have eliminated one for loop but it made it much slower and change the distance modulus to 9.7 so I think I need to change things

    ReplyDelete
  2. You should think about assigning weights to various stars. You should demand a good fit near the turn-off and on the giant branch, so give large weights to these stars. Those weirdos scattered off in no-stars-land shouldn't get an equal "vote" on Proposition I(sochrone). So another thought is to make a magnitude cut somewhere below the turn-off. Try various cuts--hopefully the exact cut won't affect the answer overly much.

    ReplyDelete