In [1]:
%matplotlib inline
from vespa.stars.populations import Observed_BinaryPopulation
from vespa.stars.populations import Observed_TriplePopulation
from vespa.populations import EBPopulation, HEBPopulation
from isochrones.starmodel import BinaryStarModel,TripleStarModel
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
In [2]:
mags = {'H': 10.211,
'J': 10.523,
'K': 10.152000000000001}
#pop = Observed_BinaryPopulation(mags=mags, starmodel=starmodel)
#pop = Observed_BinaryPopulation.load_hdf('test_observedbinary.h5')
starmodel = TripleStarModel.load_hdf('test_observedtriple.h5')
starmodel.save_hdf('test_triple_starmodel.h5')
#pop = Observed_TriplePopulation(mags=mags, n=100, starmodel=starmodel)
In [5]:
pop = Observed_BinaryPopulation.load_hdf('test_observedbinary.h5')
In [6]:
starmodel = pop.starmodel
starmodel.save_hdf('test_binary_starmodel.h5')
In [21]:
ebpop = EBPopulation(starmodel=starmodel, n=100, period=20)
In [22]:
ebpop.fit_trapezoids()
In [3]:
hebpop = HEBPopulation(starmodel=starmodel, n=100, period=20,
mags=mags)
In [23]:
ok = ((ebpop.stars['slope'] > 0) & (ebpop.stars['duration'] > 0) &
(ebpop.stars['duration'] < ebpop.period) & (ebpop.depth > 0) &
ebpop.distok)
In [24]:
ok.sum()
Out[24]:
In [ ]:
In [4]:
mags = {'H': (10.211,0.05),
'J': (10.523, 0.05),
'K': (10.152000000000001,0.05)}
from isochrones.starmodel import TripleStarModel
from isochrones.dartmouth import Dartmouth_Isochrone
dar = Dartmouth_Isochrone()
starpop = TripleStarModel(dar, **mags)
starpop.fit_mcmc()
Out[4]:
In [5]:
starpop.save_hdf('test_observedtriple.h5')
In [ ]: