In [14]:
%matplotlib inline

In [12]:
import numpy as np
import matplotlib.pyplot as plt
from astropy.io import ascii

Graficos dados do Kepler


In [10]:
data = ascii.read('/home/glauffer/Dropbox/FURG/final_project/data/kplr001026032-2009166043257_llc.dat')
data
# Time (days), Raw Flux, Raw Flux error, Corrected Flux, Corrected Flux error


Out[10]:
col1col2col3col4col5
54964.512713512319.0024.0182967217661.98635.71493769
54964.533148212321.86134.0185136817651.82035.7225852
54964.553582912317.91894.0181841917646.83795.72262812
54964.574017412307.45314.0173931117634.75595.71586132
54964.59445212308.4174.0175166117634.86525.72388887
54964.614886712315.83114.0179524417649.21885.719244
54964.635321212316.90144.0179443417653.32035.71940374
54964.655755812316.95214.0180802317655.06645.72260284
54964.676190512307.18554.0173792817641.39655.72496271
54964.696625112309.1684.0174384117644.11335.72099781
54964.717059612318.30764.0181813217658.64655.71628428
...............
54997.780030812541.06154.033092517682.3345.7287097
54997.800465212551.21294.0339055117700.77155.73312283
54997.820899512539.72174.0331001317682.59575.73356152
54997.841333712548.28714.0336923617693.8735.72497129
54997.861768112542.62794.0333337817680.56255.72649193
54997.882202412553.94144.0341930417690.65825.72741556
54997.902636612541.32134.0332632117676.88095.7296176
54997.923070912549.75394.0337934517684.17775.73302174
54997.943505312551.2084.0338783317688.94735.72724915
54997.963939512547.05664.033617517679.77545.73365974
54997.984373812547.2084.0336480117688.37895.72657919

In [15]:
plt.plot(data['col1'], data['col4'])


Out[15]:
[<matplotlib.lines.Line2D at 0x7f0c1a473cf8>]

In [19]:
#convertendo fluxo em magnitude
mag = -2.5 * np.log(data['col4'])
mag


Out[19]:
<Column name='col4' unit=None format=None description=None>
array([-24.44792486, -24.44648548, -24.44577973, ..., -24.45173819,
       -24.45044158, -24.45165786])

In [22]:
plt.plot(data['col1'], mag)
plt.gca().invert_yaxis()
plt.xlabel('Dias [JD]')
plt.ylabel('Magnitude')


Out[22]:
<matplotlib.text.Text at 0x7f0c198cc898>

In [28]:
kpl6b = ascii.read('/home/glauffer/Dropbox/FURG/final_project/data/kplr010874614-2009131105131_llc.dat')
#kpl6b
mag6b = -2.5 * np.log(kpl6b['col4'])

plt.clf()
plt.plot(kpl6b['col1'], mag6b)
#plt.plot(kpl6b['col1'], kpl6b['col4'])
plt.gca().invert_yaxis()
plt.title('Kepler 6B - KIC 10874614')
plt.xlabel('Dias [JD]')
plt.ylabel('Magnitude')


Out[28]:
<matplotlib.text.Text at 0x7f0c19dd9e10>

In [29]:
#supernova KSN 2011a
sn = ascii.read('/home/glauffer/Dropbox/FURG/final_project/data/kplr008480662-2011271113734_llc.dat')
magSN = -2.5 * np.log(sn['col4'])

plt.clf()
plt.plot(sn['col1'], magSN)
plt.gca().invert_yaxis()
plt.title('KSN 2011a - KIC 8480662')
plt.xlabel('Dias [JD]')
plt.ylabel('Magnitude')


Out[29]:
<matplotlib.text.Text at 0x7f0c1a63aac8>

In [ ]: