In [302]:
try:
    reload(gaia_rc)
except NameError:
    import gaia_rc
import numpy
from apogee.samples import rc
figsize(8,6)

The red-clump in Gaia

Red-clump magnitude in Gaia

Compare to Girardi & Salaris using $G-i= 0.4$, $I-i= -0.45$ (Jordi et al. 2006) $\rightarrow$ $G-I= 0.85$ $\rightarrow$ $G = I+0.85$; seems to agree for solar at least


In [171]:
iso= gaia_rc.load_iso()

In [156]:
ages= iso.logages()
ages= ages[ages >= 9.]
plot(10.**(ages-9.),[gaia_rc.G(a,0.017,iso)[0] for a in ages])
plot(10.**(ages-9.),[gaia_rc.G(a,0.0035,iso)[0] for a in ages])
plot(10.**(ages-9.),[gaia_rc.G(a,0.035,iso)[0] for a in ages])


Out[156]:
[<matplotlib.lines.Line2D at 0x10eec5c10>]

In [267]:
Zs= iso.Zs()
tage= iso.logages()[62]
plot(Zs,[gaia_rc.G(tage,z,iso)[0] for z in Zs],'-')
plot(gaia_rc.load_ZG(iso,s=0.00005)(numpy.linspace(0.1,0.9,101)),numpy.linspace(0.1,0.9,101),'r-')
plot(Zs,[gaia_rc.G(tage,z,iso)[1]*10. for z in Zs],'-')
ylim(2,-2)
xlim(0.,0.06)


Out[267]:
(0.0, 0.06)

In [301]:
Gs= numpy.linspace(0.1,1.9,201)
ZG= gaia_rc.load_ZG(iso)
pG= numpy.array([gaia_rc.Gdist(g,ZG) for g in Gs])
m,s= numpy.sum(Gs*pG)/numpy.sum(pG), numpy.sqrt(numpy.sum(Gs**2.*pG)/numpy.sum(pG)-(numpy.sum(Gs*pG)/numpy.sum(pG))**2.)
plot(Gs,pG/numpy.sum(pG)/(Gs[1]-Gs[0]))
#plot(Gs,1./numpy.sqrt(2.*numpy.pi)/s*numpy.exp(-0.5*(Gs-m)**2./s**2.))
xlim(0.,1.)
Gmax= Gs[numpy.argmax(pG)]
sGs= Gs[Gs < Gmax]
spG= pG[Gs < Gmax]
lGs= Gs[Gs > Gmax]
lpG= pG[Gs > Gmax]
f= (lGs[numpy.argmin(numpy.fabs(lpG-numpy.nanmax(pG)/2.))]-sGs[numpy.argmin(numpy.fabs(spG-numpy.nanmax(pG)/2.))])/2.355
print "mean = %f, std. dev. = %f, std.dev from fwhm = %f" % (m,s,f)


mean = 0.644959, std. dev. = 0.098126, std.dev from fwhm = 0.080255

In [305]:
Gs= numpy.linspace(0.1,1.9,201)
ZG= gaia_rc.load_ZG(iso)
pG= numpy.array([gaia_rc.Gdist(g,ZG) for g in Gs])
plot(Gs,pG/numpy.sum(pG)/(Gs[1]-Gs[0]))
xlim(0.,1.)
Gsamples= gaia_rc.sample_Gdist(iso,n=100000)
hist(Gsamples,bins=101,histtype='step',normed=True)


Out[305]:
(array([  7.79331972e-03,   4.67599183e-03,   1.24693116e-02,
          9.35198367e-03,   1.24693116e-02,   2.18212952e-02,
          3.11732789e-02,   3.74079347e-02,   4.52012544e-02,
          4.83185823e-02,   5.61119020e-02,   6.54638857e-02,
          5.14359102e-02,   9.81958285e-02,   8.88438448e-02,
          1.18458460e-01,   1.32486435e-01,   1.32486435e-01,
          1.32486435e-01,   1.46514411e-01,   1.58983722e-01,
          1.76129026e-01,   1.90157001e-01,   2.01067649e-01,
          2.43151575e-01,   2.16654288e-01,   2.38475584e-01,
          2.68090198e-01,   2.82118174e-01,   2.89911494e-01,
          2.97704813e-01,   3.49140724e-01,   3.28878092e-01,
          3.46023396e-01,   3.74079347e-01,   3.72520683e-01,
          4.05252626e-01,   4.17721937e-01,   4.62923192e-01,
          4.84744487e-01,   5.34621733e-01,   5.56443028e-01,
          6.42169545e-01,   5.90733635e-01,   7.73097317e-01,
          6.95164119e-01,   8.77527801e-01,   8.66617153e-01,
          8.86879784e-01,   1.01001424e+00,   1.04898083e+00,
          1.17367395e+00,   1.31551237e+00,   1.49164139e+00,
          1.50722803e+00,   1.70829568e+00,   1.81428483e+00,
          2.00444183e+00,   2.23512410e+00,   2.24291742e+00,
          2.53282891e+00,   2.66687401e+00,   2.94587486e+00,
          3.08615461e+00,   3.35268614e+00,   3.45555797e+00,
          3.81716800e+00,   3.91380516e+00,   4.10707949e+00,
          4.22086196e+00,   4.33464443e+00,   4.61987993e+00,
          4.79600896e+00,   4.69001981e+00,   4.59026532e+00,
          4.74613171e+00,   4.80224361e+00,   4.57156135e+00,
          4.61520394e+00,   4.57312001e+00,   4.36425904e+00,
          4.26762188e+00,   3.95588909e+00,   3.60674837e+00,
          3.42126736e+00,   3.25449032e+00,   3.07212663e+00,
          2.85703101e+00,   2.54373956e+00,   2.34267191e+00,
          2.03249778e+00,   1.86883807e+00,   1.57892658e+00,
          1.31083638e+00,   1.02871820e+00,   8.94673104e-01,
          6.45286873e-01,   4.52012544e-01,   3.00822141e-01,
          1.76129026e-01,   1.21575788e-01]),
 array([ 0.19214292,  0.19855867,  0.20497442,  0.21139017,  0.21780592,
         0.22422167,  0.23063742,  0.23705317,  0.24346893,  0.24988468,
         0.25630043,  0.26271618,  0.26913193,  0.27554768,  0.28196343,
         0.28837918,  0.29479493,  0.30121069,  0.30762644,  0.31404219,
         0.32045794,  0.32687369,  0.33328944,  0.33970519,  0.34612094,
         0.3525367 ,  0.35895245,  0.3653682 ,  0.37178395,  0.3781997 ,
         0.38461545,  0.3910312 ,  0.39744695,  0.4038627 ,  0.41027846,
         0.41669421,  0.42310996,  0.42952571,  0.43594146,  0.44235721,
         0.44877296,  0.45518871,  0.46160446,  0.46802022,  0.47443597,
         0.48085172,  0.48726747,  0.49368322,  0.50009897,  0.50651472,
         0.51293047,  0.51934623,  0.52576198,  0.53217773,  0.53859348,
         0.54500923,  0.55142498,  0.55784073,  0.56425648,  0.57067223,
         0.57708799,  0.58350374,  0.58991949,  0.59633524,  0.60275099,
         0.60916674,  0.61558249,  0.62199824,  0.62841399,  0.63482975,
         0.6412455 ,  0.64766125,  0.654077  ,  0.66049275,  0.6669085 ,
         0.67332425,  0.67974   ,  0.68615576,  0.69257151,  0.69898726,
         0.70540301,  0.71181876,  0.71823451,  0.72465026,  0.73106601,
         0.73748176,  0.74389752,  0.75031327,  0.75672902,  0.76314477,
         0.76956052,  0.77597627,  0.78239202,  0.78880777,  0.79522352,
         0.80163928,  0.80805503,  0.81447078,  0.82088653,  0.82730228,
         0.83371803,  0.84013378]),
 <a list of 1 Patch objects>)

In [307]:
Gs[numpy.argmax(pG/numpy.sum(pG)/(Gs[1]-Gs[0]))]


Out[307]:
0.67599999999999993

In [280]:


In [280]:


In [280]:


In [280]:


In [ ]: