In [3]:
%matplotlib inline

import numpy as np
import pandas as pd
import time
import matplotlib.pyplot as plt

from vespa.transitsignal import TransitSignal_ASCII
from vespa.populations import HEBPopulation, EBPopulation
from vespa.populations import BEBPopulation, PlanetPopulation
from vespa.populations import PopulationSet

from vespa.transit_basic import MAInterpolationFunction

from keputils import koiutils as ku

import logging
rootLogger = logging.getLogger()
rootLogger.setLevel(logging.INFO)


/u/tdm/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py:1045: UserWarning: /u/tdm/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).

In [2]:
import warnings
warnings.simplefilter("error")
warnings.simplefilter("ignore", DeprecationWarning)

In [4]:
ra,dec = ku.radec(2704)
mags = ku.KICmags(2704)
mass = (0.18, 0.04)
radius = (0.21, 0.03)
feh = (0.27, 0.13)
age = (9.7,0.1)
Teff = 3147
logg = 4.9
rprs = 0.0622
period = ku.get_property(2704,'koi_period')
colors = []
print period


4.871222215

In [5]:
from vespa.transitsignal import TransitSignal_ASCII
sig = TransitSignal_ASCII('2704.02.txt', P=period)
sig.MCMC(savedir='2704_chains/')


INFO:root:MCMC fit already done for .  Loading chains.

In [6]:
popset = PopulationSet('2704_retest.h5')

In [7]:
from vespa.fpp import FPPCalculation
fpp = FPPCalculation(sig, popset)
fpp.set_maxrad(2)

In [10]:
fpp.lhoodcachefile

In [9]:
%timeit fpp['heb'].stars.to_pickle('test.pkl')


10 loops, best of 3: 132 ms per loop

In [11]:
%timeit fpp['heb'].stars.to_hdf('test.h5','df')


10 loops, best of 3: 146 ms per loop

In [12]:
%timeit pd.read_pickle('test.pkl')


1 loops, best of 3: 13.2 ms per loop

In [13]:
%timeit pd.read_hdf('test.h5','df')


1 loops, best of 3: 13.6 ms per loop

In [7]:
fpp.apply_secthresh(0.001)

In [8]:
fpp.constraints


Out[8]:
['secondary depth']

In [8]:
#Uncomment to re-run simulations/fits
#n = 2e4
#t1 = time.time()
#popset = PopulationSet(ra=ra, dec=dec, period=period, mags=mags,
#                       n=n, mass=mass, age=age, feh=feh,
#                       radius=radius, rprs=rprs, colors=colors,
#                       trilegal_filename='2704_starfield.h5',
#                       Teff=Teff, logg=logg, savefile='2704_retest.h5')
#t2 = time.time()
#print '{:.2f} minutes for all simulations/fits.'.format((t2-t1)/60)


INFO:root:13970 systems simulated to match provided colors (target 20000).
INFO:root:21283 systems simulated to match provided colors (target 20000).
INFO:root:14555 eclipsing HEB systems generated (target 20000)
INFO:root:6289 systems simulated to match provided colors (target 8978).
INFO:root:9541 systems simulated to match provided colors (target 8978).
INFO:root:21163 eclipsing HEB systems generated (target 20000)
WARNING:root:Must do trapezoid fits before making KDE.
INFO:root:18783 systems simulated to match provided colors (target 20000).
INFO:root:20231 systems simulated to match provided colors (target 20000).
INFO:root:15801 Eclipsing EB systems generated (target 20000)
INFO:root:6012 systems simulated to match provided colors (target 6377).
INFO:root:6438 systems simulated to match provided colors (target 6377).
INFO:root:20887 Eclipsing EB systems generated (target 20000)
WARNING:root:Must do trapezoid fits before making KDE.
INFO:root:157 binaries are "too close"; gave up trying to fix.
INFO:root:2447 BEB systems generated (target 20000)
INFO:root:1351 binaries are "too close"; gave up trying to fix.
INFO:root:21810 BEB systems generated (target 20000)
WARNING:root:Must do trapezoid fits before making KDE.
ERROR:root:No eclipse registered for index 603
ERROR:root:No eclipse registered for index 4441
ERROR:root:No eclipse registered for index 9438
INFO:root:11286 Transiting planet systems generated (target 20000)
INFO:root:20708 Transiting planet systems generated (target 20000)
WARNING:root:Must do trapezoid fits before making KDE.
ERROR:root:No eclipse registered for index 323
ERROR:root:No eclipse registered for index 717
ERROR:root:No eclipse registered for index 1453
ERROR:root:No eclipse registered for index 1837
ERROR:root:No eclipse registered for index 2260
ERROR:root:No eclipse registered for index 3160
ERROR:root:No eclipse registered for index 4493
ERROR:root:No eclipse registered for index 4924
ERROR:root:No eclipse registered for index 5102
ERROR:root:No eclipse registered for index 5451
ERROR:root:No eclipse registered for index 5453
ERROR:root:No eclipse registered for index 5513
ERROR:root:No eclipse registered for index 5519
ERROR:root:No eclipse registered for index 5567
ERROR:root:No eclipse registered for index 5762
ERROR:root:No eclipse registered for index 6024
ERROR:root:No eclipse registered for index 6042
ERROR:root:No eclipse registered for index 6086
ERROR:root:No eclipse registered for index 6703
ERROR:root:No eclipse registered for index 6733
ERROR:root:No eclipse registered for index 6928
ERROR:root:No eclipse registered for index 7521
ERROR:root:No eclipse registered for index 8016
ERROR:root:No eclipse registered for index 8040
ERROR:root:No eclipse registered for index 8132
ERROR:root:No eclipse registered for index 8943
ERROR:root:No eclipse registered for index 8965
ERROR:root:No eclipse registered for index 9072
ERROR:root:No eclipse registered for index 9129
ERROR:root:No eclipse registered for index 9549
ERROR:root:No eclipse registered for index 10014
ERROR:root:No eclipse registered for index 10473
ERROR:root:No eclipse registered for index 10926
ERROR:root:No eclipse registered for index 11310
ERROR:root:No eclipse registered for index 11334
ERROR:root:No eclipse registered for index 11699
ERROR:root:No eclipse registered for index 12019
ERROR:root:No eclipse registered for index 12310
ERROR:root:No eclipse registered for index 12641
ERROR:root:No eclipse registered for index 14210
ERROR:root:No eclipse registered for index 14841
ERROR:root:No eclipse registered for index 15033
ERROR:root:No eclipse registered for index 15536
ERROR:root:No eclipse registered for index 15864
ERROR:root:No eclipse registered for index 16222
ERROR:root:No eclipse registered for index 16352
ERROR:root:No eclipse registered for index 16380
ERROR:root:No eclipse registered for index 16559
ERROR:root:No eclipse registered for index 16890
ERROR:root:No eclipse registered for index 17048
ERROR:root:No eclipse registered for index 17089
ERROR:root:No eclipse registered for index 17091
ERROR:root:No eclipse registered for index 17263
ERROR:root:No eclipse registered for index 17511
ERROR:root:No eclipse registered for index 17543
ERROR:root:No eclipse registered for index 17864
ERROR:root:No eclipse registered for index 18520
ERROR:root:No eclipse registered for index 19700
Planets: fitting shape parameters for 20000 systems:  99% |---- | ETA:  0:00:01
18.68 minutes for all simulations/fits.
Planets: fitting shape parameters for 20000 systems:  99% |\\\\ | ETA:  0:00:00

In [4]:
MAfn = MAInterpolationFunction(pmin=0.007, pmax=1/0.007, nzs=200, nps=400)

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [12]:
#uncomment below if you want to redo the simulations/fits
#n = 5e3
#hebpop = HEBPopulation(mass=mass, age=age, feh=feh, colors=[],
#                       period=period, mags=mags, MAfn=MAfn, n=n)
#t0 = time.time()
#hebpop.fit_trapezoids(MAfn=MAfn)
#t1 = time.time()
#print 'Fitting {} systems took {:.2f} minutes.'.format(n,(t1-t0)/60)
#hebpop.save_hdf('heb_2704.02.h5', overwrite=True)

hebpop = HEBPopulation().load_hdf('heb_2704.02.h5')


INFO:root:3525 systems simulated to match provided colors (target 5000).
INFO:root:5324 systems simulated to match provided colors (target 5000).
DEBUG:root:initial probability given mininc starting at 0.0606242132458
DEBUG:root:final prob: 0.0447406693754
INFO:root:3690 eclipsing HEB systems generated (target 5000)
DEBUG:root:0 nans in stars[dpri]
DEBUG:root:0 nans in df[dpri]
INFO:root:1498 systems simulated to match provided colors (target 2130).
INFO:root:2248 systems simulated to match provided colors (target 2130).
DEBUG:root:initial probability given mininc starting at 0.0586403353726
DEBUG:root:final prob: 0.0433057500193
INFO:root:5263 eclipsing HEB systems generated (target 5000)
DEBUG:root:0 nans in stars[dpri]
DEBUG:root:0 nans in df[dpri]
WARNING:root:Must do trapezoid fits before making KDE.

In [23]:
plt.hist(hebpop.stars['mass_A'], histtype='step', lw='3')
plt.hist(hebpop.stars['mass_B'], histtype='step', lw='3')
plt.hist(hebpop.stars['mass_C'], histtype='step', lw='3');
((hebpop.stars['mass_C'] <= hebpop.stars['mass_B']) | 
 (hebpop.stars['mass_C'] <= hebpop.stars['mass_A'])).sum()


Out[23]:
5000

In [13]:
plt.hist(hebpop.dmag('K'))


Out[13]:
(array([    4.,    60.,   317.,   852.,  1663.,   733.,   102.,   272.,
          916.,    81.]),
 array([-2.60626124, -2.22953121, -1.85280117, -1.47607114, -1.0993411 ,
        -0.72261107, -0.34588103,  0.03084901,  0.40757904,  0.78430908,
         1.16103911]),
 <a list of 10 Patch objects>)

In [6]:
#uncomment below if you want to redo the simulations/fits
#n = 5e3
#ebpop = EBPopulation(mass=mass, age=age, feh=feh, colors=[],
#                       period=period, mags=mags, MAfn=MAfn, n=n)
#t0 = time.time()
#ebpop.fit_trapezoids(MAfn=MAfn)
#t1 = time.time()
#print 'Fitting {} systems took {:.2f} minutes.'.format(n,(t1-t0)/60)
#ebpop.save_hdf('eb_2704.02.h5', overwrite=True)

ebpop = EBPopulation().load_hdf('eb_2704.02.h5')


INFO:root:4674 systems simulated to match provided colors (target 5000).
INFO:root:5062 systems simulated to match provided colors (target 5000).
DEBUG:root:initial probability given mininc starting at 0.0596402385239
DEBUG:root:final prob: 0.0476525505806
INFO:root:3995 Eclipsing EB systems generated (target 5000)
DEBUG:root:0 nans in stars[dpri]
DEBUG:root:0 nans in df[dpri]
INFO:root:1410 systems simulated to match provided colors (target 1509).
INFO:root:1530 systems simulated to match provided colors (target 1509).
DEBUG:root:initial probability given mininc starting at 0.0589500791266
DEBUG:root:final prob: 0.0480898259807
INFO:root:5226 Eclipsing EB systems generated (target 5000)
DEBUG:root:0 nans in stars[dpri]
DEBUG:root:0 nans in df[dpri]
WARNING:root:Must do trapezoid fits before making KDE.
EBs: fitting shape parameters for 5000 systems:  99% |\\\\\\\\\ | ETA:  0:00:00
Fitting 5000.0 systems took 0.96 minutes.

In [11]:
#rootLogger.setLevel(logging.DEBUG)
#uncomment below if you want to redo the simulations/fits
#n = 5e3
#bebpop = BEBPopulation(trilegal_filename='2704_starfield.h5', 
#                       ra=ra, dec=dec, period=period, mags=mags,
#                       MAfn=MAfn, n=5e3)
#t0 = time.time()
#bebpop.fit_trapezoids(MAfn=MAfn)
#t1 = time.time()
#print 'Fitting systems took {:.2f} minutes.'.format((t1-t0)/60)
#bebpop.save_hdf('beb_2704.02.h5', overwrite=True)
bebpop = BEBPopulation().load_hdf('beb_2704.02.h5')

In [9]:
#uncomment below if you want to redo the simulations/fits
#n = 5e3
#plpop = PlanetPopulation(period=period, rprs=0.0622, mass=mass, radius=radius,
#                         Teff=Teff, logg=logg, n=n, MAfn=MAfn)
#t0 = time.time()
#plpop.fit_trapezoids(MAfn=MAfn)
#t1 = time.time()
#print 'Fitting systems took {:.2f} minutes.'.format((t1-t0)/60)
#plpop.save_hdf('pl_2704.02.h5', overwrite=True)
plpop = PlanetPopulation().load_hdf('pl_2704.02.h5')

In [1]:
popset = PopulationSet([ebpop, hebpop, bebpop, plpop])
popset.save_hdf('2704.02_pops.h5', overwrite=True)


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-9c4e6e10ad82> in <module>()
----> 1 popset = PopulationSet([ebpop, hebpop, bebpop, plpop])
      2 popset.save_hdf('2704.02_pops.h5', overwrite=True)

NameError: name 'PopulationSet' is not defined

In [1]:
from vespa.populations import PopulationSet
popset = PopulationSet('2704.02_pops.h5')
#popset.set_maxrad(2)


/u/tdm/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py:1045: UserWarning: /u/tdm/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).

In [2]:
from vespa.transitsignal import TransitSignal_ASCII
sig = TransitSignal_ASCII('2704.02.txt', P=4.871222215)
sig.MCMC(savedir='2704_chains/')

In [3]:
from vespa.fpp import FPPCalculation
import astropy.units as u
fpp = FPPCalculation(sig, popset)
fpp['beb'].set_maxrad(2*u.arcsec)

In [4]:
from starutils.contrastcurve import ContrastCurveFromFile
cc = ContrastCurveFromFile('AO_and_apmask_2704.txt',band='K')

In [5]:
popset.apply_secthresh(1e-3)
popset.apply_cc(cc)

In [16]:
%matplotlib inline
popset['eb'].lhoodplot(sig)
popset['beb'].lhoodplot(sig)
popset['heb'].lhoodplot(sig)
popset['pl'].lhoodplot(sig)



In [6]:
%matplotlib inline
fpp.FPPsummary()



In [9]:
popset.constraints


Out[9]:
['Rsky', 'secondary depth', 'K band']

In [15]:
hebpop.Rsky


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-c5aad64feab6> in <module>()
----> 1 hebpop.Rsky

AttributeError: 'HEBPopulation' object has no attribute 'Rsky'

In [11]:
hebpop.priorfactors, bebpop.priorfactors


Out[11]:
({'f_triple': 0.12}, {'f_binary': 0.4})

In [19]:
hebpop.distance


Out[19]:
<Quantity [ 972.52475248, 826.55625563, 428.01530153,...,  844.83978398,
            921.37083708, 944.549955  ] pc>

In [9]:
sig.plot(plot_trap=True)


DEBUG:root:lo=0.972632432937, hi=1.02672621027

In [22]:
pop = bebpop
pop.stars[(pop.depth <= 0) | (np.isnan(pop.depth))]


Out[22]:
level_0 H_mag H_mag_A J_mag J_mag_A K_mag K_mag_A Kepler_mag Kepler_mag_A Teff_A ... w mass_1 radius_1 mass_2 radius_2 depth duration secdepth secondary slope
4649 2048 NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 124.513192 0.109451 0.127831 0.102049 0.121820 0.144521 0.048862 0.15676 False 2.320787
4765 2164 NaN NaN NaN NaN NaN NaN NaN NaN NaN ... 112.650280 0.107359 0.126139 0.102595 0.122619 0.112920 0.033085 0.00000 False 2.729261

2 rows × 84 columns


In [18]:
pop = bebpop
(np.isnan(pop.depth) | (pop.depth == 0)).sum()


Out[18]:
1

In [8]:
sig.slopefit


Out[8]:
(4.1051488439846811, array([ 2.10249086,  8.66746857]))

In [15]:
plpop.priorfactors


Out[15]:
{'fp_specific': 0.01}

In [14]:
bebpop.density.to('arcsec^-2').value


Out[14]:
0.023046682098765432

In [13]:
bebpop.density.to('arcsec^-2').value*np.pi*64


Out[13]:
4.633810378950456

In [17]:
hebpop.prior


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-17-c0c3124daf99> in <module>()
----> 1 hebpop.prior

/u/tdm/anaconda/lib/python2.7/site-packages/VESPA-0.0-py2.7-linux-x86_64.egg/vespa/populations.pyc in prior(self)
    133     @property
    134     def prior(self):
--> 135         prior = self.prob * self.selectfrac
    136         for f in self.priorfactors:
    137             prior *= self.priorfactors[f]

AttributeError: 'HEBPopulation' object has no attribute 'prob'

In [32]:
from starutils.populations import DARTMOUTH as dar

In [136]:
mass = bgpop.stars['m_ini'].copy().values
age =  bgpop.stars['logAge'].copy().values
feh =  bgpop.stars['[M/H]'].copy().values

pct = 0.05
mass[mass < dar.minmass*(1+pct)] = dar.minmass*(1+pct)
mass[mass > dar.maxmass*(1-pct)] = dar.maxmass*(1-pct)
age[age < dar.minage*(1+pct)] = dar.minage*(1+pct)
age[age > dar.maxage*(1-pct)] = dar.maxage*(1-pct)
feh[feh < dar.minfeh+0.05] = dar.minfeh+0.05
feh[feh > dar.maxfeh-0.05] = dar.maxfeh-0.05

n = int(1e3)
inds = np.random.randint(len(mass), size=n)
mass = mass[inds]
age = age[inds]
feh = feh[inds]

testpop = MultipleStarPopulation(mA=mass,
                                 age=age,
                                 feh=feh,
                                 f_triple=0, f_binary=1,
                                 distance=bgpop.stars['distance'],
                                 period_long=200.)

In [145]:
print len(testpop.stars['mass_A'])
badA = np.isnan(testpop.stars['mass_A'])
print badA.sum()
len(testpop.stars.dropna(subset=['mass_A']))


1000
10
Out[145]:
990

In [130]:
print len(testpop.stars['mass_B'])
badB = np.isnan(testpop.stars['mass_B'])
print badB.sum()


1000
0

In [131]:
plt.plot(mass[badA], age[badA], '.')


Out[131]:
[<matplotlib.lines.Line2D at 0x125038bd0>]

In [119]:
plt.plot(mass[badB], age[badB], '.')


Out[119]:
[<matplotlib.lines.Line2D at 0x124406250>]

In [77]:
mass[badB]


Out[77]:
2159    1.968872
2306    1.968872
3505    1.968872
3964    1.968872
5840    1.968872
6751    1.968872
7537    1.968872
8621    1.968872
8703    1.968872
9571    1.968872
Name: m_ini, dtype: float64

In [58]:
plt.hist(mass,bins=50)


Out[58]:
(array([ 2613.,  1146.,   926.,   716.,   572.,   479.,   396.,   330.,
          270.,   245.,   202.,   179.,   147.,   141.,   137.,    96.,
          103.,    87.,    82.,    68.,    68.,    52.,    62.,    58.,
           47.,    40.,    33.,    40.,    34.,    28.,    22.,    27.,
           35.,    23.,    31.,    25.,    15.,    17.,    18.,    22.,
           15.,    16.,    11.,    13.,    11.,    11.,    11.,    10.,
           16.,   254.]),
 array([ 0.100462  ,  0.14220548,  0.18394896,  0.22569244,  0.26743592,
         0.3091794 ,  0.35092288,  0.39266636,  0.43440984,  0.47615332,
         0.5178968 ,  0.55964028,  0.60138376,  0.64312724,  0.68487072,
         0.7266142 ,  0.76835768,  0.81010116,  0.85184464,  0.89358812,
         0.9353316 ,  0.97707508,  1.01881856,  1.06056204,  1.10230552,
         1.144049  ,  1.18579248,  1.22753596,  1.26927944,  1.31102292,
         1.3527664 ,  1.39450988,  1.43625336,  1.47799684,  1.51974032,
         1.5614838 ,  1.60322728,  1.64497076,  1.68671424,  1.72845772,
         1.7702012 ,  1.81194468,  1.85368816,  1.89543164,  1.93717512,
         1.9789186 ,  2.02066208,  2.06240556,  2.10414904,  2.14589252,
         2.187636  ]),
 <a list of 50 Patch objects>)

In [23]:
plt.hist(testpop.stars['mass_A'], histtype='step', normed=True)
plt.hist(testpop.stars['mass_B'], histtype='step', normed=True)


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-23-9245b6a0e4f5> in <module>()
----> 1 plt.hist(testpop.stars['mass_A'], histtype='step', normed=True)
      2 plt.hist(testpop.stars['mass_B'], histtype='step', normed=True)

/Users/tdm/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.pyc in hist(x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, hold, **kwargs)
   2894                       histtype=histtype, align=align, orientation=orientation,
   2895                       rwidth=rwidth, log=log, color=color, label=label,
-> 2896                       stacked=stacked, **kwargs)
   2897         draw_if_interactive()
   2898     finally:

/Users/tdm/anaconda/lib/python2.7/site-packages/matplotlib/axes/_axes.pyc in hist(self, x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs)
   5650             # this will automatically overwrite bins,
   5651             # so that each histogram uses the same bins
-> 5652             m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
   5653             m = m.astype(float)  # causes problems later if it's an int
   5654             if mlast is None:

/Users/tdm/anaconda/lib/python2.7/site-packages/numpy/lib/function_base.pyc in histogram(a, bins, range, normed, weights, density)
    174         if (mn > mx):
    175             raise AttributeError(
--> 176                 'max must be larger than min in range parameter.')
    177 
    178     if not iterable(bins):

AttributeError: max must be larger than min in range parameter.

In [59]:
from scipy.interpolate import LinearNDInterpolator

In [60]:
LinearNDInterpolator?

In [146]:
bgpop._properties


Out[146]:
['trilegal_args', 'mags', '_maxrad', 'density', 'name']

In [147]:
bgpop.trilegal_args


Out[147]:
{'AV': 0.187,
 'area': 1,
 'b': 15.792341021533613,
 'binaries': False,
 'filterset': 'kepler_2mass',
 'l': 79.0919611755139,
 'maglim': 27,
 'sigma_AV': 0.1,
 'version': '1.6'}

In [151]:
bgpop.density


Out[151]:
$124962 \; \mathrm{\frac{1}{{}^{\circ}^{2}}}$

In [152]:
pop


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-152-a16dcb754991> in <module>()
----> 1 pop

NameError: name 'pop' is not defined

In [5]:
MAfn = MAInterpolationFunction(pmin=0.05, pmax=1/0.05)

In [6]:
bgpop = BGEBPopulation(trilegal_filename='kep22field.h5', period=200,
                       MAfn=MAfn, n=2e4)


INFO:root:364 BGEB systems generated (target 20000)
INFO:root:8220 BGEB systems generated (target 20000)
INFO:root:16188 BGEB systems generated (target 20000)
INFO:root:20997 BGEB systems generated (target 20000)
WARNING:root:Must do trapezoid fits before making KDE.

In [9]:
np.arange(1e2)


Out[9]:
array([  0.,   1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.,
        11.,  12.,  13.,  14.,  15.,  16.,  17.,  18.,  19.,  20.,  21.,
        22.,  23.,  24.,  25.,  26.,  27.,  28.,  29.,  30.,  31.,  32.,
        33.,  34.,  35.,  36.,  37.,  38.,  39.,  40.,  41.,  42.,  43.,
        44.,  45.,  46.,  47.,  48.,  49.,  50.,  51.,  52.,  53.,  54.,
        55.,  56.,  57.,  58.,  59.,  60.,  61.,  62.,  63.,  64.,  65.,
        66.,  67.,  68.,  69.,  70.,  71.,  72.,  73.,  74.,  75.,  76.,
        77.,  78.,  79.,  80.,  81.,  82.,  83.,  84.,  85.,  86.,  87.,
        88.,  89.,  90.,  91.,  92.,  93.,  94.,  95.,  96.,  97.,  98.,
        99.])

In [7]:
np.atleast_1d(None) * 1


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-1fe4a94e9b84> in <module>()
----> 1 np.atleast_1d(None) * 1

TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

In [2]:
fpp['heb']


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-656eb031bb49> in <module>()
----> 1 fpp['heb']

NameError: name 'fpp' is not defined

In [ ]: