In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [2]:
import pandas as pd
import seaborn as sns
sns.set_context("talk")

In [3]:
bhb=pd.read_csv('../LISA/newhalodcoparameters.dat',delim_whitespace=True,header=None)
    M1 = parameters(1)
    M2 = parameters(2)
    Porb = parameters(3)
    d = parameters(4)
    thetas = parameters(5)
    phis = parameters(6)
    thetal = parameters(7)
    phil = parameters(8)
    phio = parameters(9)
    gam = parameters(10)
    e = parameters(11)

In [4]:
bhb.columns=['M1','M2','Period','Dist','theta_s','phi_s','theta_l','phi_l','phi_o','gamma','e','bhb']

In [5]:
bhb.describe().ix[[3,7]]


Out[5]:
M1 M2 Period Dist theta_s phi_s theta_l phi_l phi_o gamma e
min 1.212225 1.159066 4.402512e+03 7.272752e+02 0.010957 0.000032 0.013222 0.000194 0.000051 0.000010 0.002313
max 25.964150 32.364620 7.739648e+17 1.074319e+07 3.134960 6.282903 3.130007 6.282926 6.283092 6.283091 0.980000

In [ ]:


In [ ]:


In [16]:
pop=pd.read_csv('/Users/domi/Desktop/LISA/population.dat',delim_whitespace=True,header=None)

In [17]:
pop.columns=['h0','e','f']

In [18]:
pop.describe()


Out[18]:
h0 e f
count 1.000000e+02 100.000000 1.000000e+02
mean 7.466758e-25 0.412210 4.369515e-07
std 2.433641e-24 0.322285 1.804891e-06
min 3.957510e-30 0.015024 4.002134e-13
25% 1.440662e-26 0.071599 8.568407e-11
50% 7.505745e-26 0.388203 1.060388e-09
75% 3.344292e-25 0.696951 4.201545e-08
max 1.637405e-23 0.971493 1.395937e-05

In [19]:
ax = subplot(111)
# Axis scale must be set prior to declaring the Formatter
# If it is not the Formatter will use the default log labels for ticks.
ax.set_xscale('log')
ax.set_yscale('log')

scatter(pop.f,pop.h0)


Out[19]:
<matplotlib.collections.PathCollection at 0x1165a33c8>

In [27]:
spec=pd.read_csv('../LISA/spectrum.dat',delim_whitespace=True,header=None)

In [28]:
tim=pd.read_csv('../LISA/time.dat',delim_whitespace=True,header=None)

In [29]:
spec.describe().ix[['min','max']]


Out[29]:
0 1 2 3
min 0.000000 -2.652008e-16 -2.210016e-16 -1.262110e-16
max 0.003323 1.604174e-16 1.957390e-16 1.699157e-16

In [37]:
tim.describe()#.ix[['min','max']]


Out[37]:
0 1 2 3
count 1.048576e+06 1.048576e+06 1.048576e+06 1.048576e+06
mean 7.889530e+07 -2.693103e-24 6.610641e-23 -3.273015e-23
std 4.555029e+07 1.974668e-21 1.977796e-21 1.334110e-21
min 0.000000e+00 -8.199107e-21 -8.224560e-21 -5.798551e-21
25% 3.944765e+07 -1.342998e-21 -1.268234e-21 -9.175249e-22
50% 7.889530e+07 -2.321263e-24 6.437028e-23 -2.339624e-23
75% 1.183429e+08 1.332689e-21 1.397425e-21 8.496073e-22
max 1.577906e+08 8.582353e-21 8.741668e-21 5.524214e-21

In [46]:
scatter(tim[0],((tim[1]*10**20)),alpha=0.2)


Out[46]:
<matplotlib.collections.PathCollection at 0x12296aef0>

In [25]:
spec2=pd.read_csv('/Users/domi/Desktop/LISA/mp/spectrum.dat',delim_whitespace=True,header=None)

In [40]:
scatter(log10(spec2[0]),log10(abs(spec2[1])),alpha=0.2)


/Users/domi/anaconda3/envs/py35/lib/python3.5/site-packages/ipykernel/__main__.py:1: RuntimeWarning: divide by zero encountered in log10
  if __name__ == '__main__':
Out[40]:
<matplotlib.collections.PathCollection at 0x119c8f470>

In [44]:
scatter(log10(spec2[0]),log10((spec2[1])),alpha=0.2)


/Users/domi/anaconda3/envs/py35/lib/python3.5/site-packages/ipykernel/__main__.py:1: RuntimeWarning: divide by zero encountered in log10
  if __name__ == '__main__':
/Users/domi/anaconda3/envs/py35/lib/python3.5/site-packages/ipykernel/__main__.py:1: RuntimeWarning: invalid value encountered in log10
  if __name__ == '__main__':
Out[44]:
<matplotlib.collections.PathCollection at 0x10ec77160>

In [41]:
scatter(log10(spec[0]),log10(abs(spec[1])),alpha=0.2)


/Users/domi/anaconda3/envs/py35/lib/python3.5/site-packages/ipykernel/__main__.py:1: RuntimeWarning: divide by zero encountered in log10
  if __name__ == '__main__':
Out[41]:
<matplotlib.collections.PathCollection at 0x11a41f6d8>

In [14]:
lisa=pd.read_csv('../data/LISA20pmrtHzStrain.dat',sep='\t',comment='#',names=['f_gw','strain'])

In [15]:
lisa.head(5)


Out[15]:
f_gw strain
0 9.765035e-08 1.465146e-15
1 9.992561e-08 1.399184e-15
2 1.022538e-07 1.336193e-15
3 1.046364e-07 1.276037e-15
4 1.070744e-07 1.218588e-15

In [18]:
loglog(spec[0],spec[1],alpha=0.2,ls='None',marker='o',ms=5,mec='k',mew=0.2,label='BBH inspirals')
xlabel('Binary Frequency')
ylabel('Strain Amplitude')
loglog(lisa.f_gw,lisa.strain,label='LISA Standard Configurations')
xlim([1e-9,1e-2])
legend()

# savefig('../Fig/signal_specture.jpeg',dpi=200,bbox_inches='tight')


Out[18]:
<matplotlib.legend.Legend at 0x111751eb8>

In [ ]:


In [55]:
sns.pairplot(spec,x_vars=[0],y_vars=[1,2,3],kind='scatter')


Out[55]:
<seaborn.axisgrid.PairGrid at 0x123af2b10>

In [56]:
sns.pairplot(tim,x_vars=[0],y_vars=[1,2,3],kind='scatter')


Out[56]:
<seaborn.axisgrid.PairGrid at 0x14906ba10>

In [ ]:


In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [17]:
random.choice(["ita",'sea'])


Out[17]:
'ita'

In [ ]: