In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from keputils import koiutils as ku
from vespa.populations import HEBPopulation, EBPopulation
from vespa.transit_basic import MAInterpolationFunction
In [2]:
import logging
rootLogger = logging.getLogger()
rootLogger.setLevel(logging.INFO)
In [7]:
#MAfn = MAInterpolationFunction(nzs=200,nps=200,pmin=0.05,pmax=1/0.05)
MAfn = MAInterpolationFunction(nzs=200,nps=400,pmin=0.007,pmax=1/0.007)
In [8]:
mags = ku.KICmags(87) #Kepler-22
mass = (0.83, 0.05)
age = (9.6, 0.1)
feh = (0.0, 0.1)
period = ku.get_property(87, 'koi_period')
pop = HEBPopulation(mass=mass, age=age, feh=feh, mags=mags,
period=period, n=1000, MAfn=MAfn)
#pop = EBPopulation(mass=mass, age=age, feh=feh, mags=mags,
# period=period, n=1000, MAfn=MAfn)
In [9]:
pop.save_hdf('test_heb.h5', overwrite=True)
In [4]:
pop = HEBPopulation().load_hdf('/u/tdm/testheb_trapfits.h5')
In [10]:
pop.prophist2d('duration', 'slope', interpolation='bicubic', logscale=True)
In [14]:
pop2 = EBPopulation().load_hdf('test_heb.h5')
In [15]:
pop2._properties
Out[15]:
In [14]:
pop2 = EBPopulation().load_hdf('test_heb.h5')
In [16]:
for p in pop2._properties:
print p,getattr(pop2,p)
In [12]:
pop2.orbpop.scatterplot(rmax=10000)
In [11]:
import starutils
In [33]:
class A(object):
def __init__(self):
pass
@property
def __prop(self):
return 'a'
class B(object):
def __init__(self):
pass
@property
def __prop(self):
return 'b'
class C(A,B):
def __init__(self):
B.__init__(self)
pass
@property
def __prop(self):
return 'c' + super(C,self)._A__prop + self._B__prop
In [37]:
C().prop
In [20]:
pop._properties
Out[20]:
In [22]:
super(HEBPopulation, pop)
Out[22]:
In [26]:
pop
Out[26]:
In [27]:
pop.stars.columns
Out[27]:
In [1]:
from starutils.utils import fluxfrac
In [2]:
fluxfrac(10,12,11)
Out[2]:
In [3]:
fluxfrac(10,10)
Out[3]:
In [ ]: