# -*- coding: utf-8 -*-
"""
Created on Wed Oct  7 11:14:54 2015

@author: O. Wertz
"""
from numpy import array

def get_planet_data(planet):
    """
    """
    # HR8799b
    if planet == 'hr8799b':
        ob = {'decPosition':array([1.004,  0.986,  0.919,  0.884,  0.856,  0.815,  0.805,  0.799,
                                   0.801,  0.798,  0.78 ,  0.796,  0.785,  0.777,  0.816,  0.783,
                                   0.8  ,  0.757,  0.748,  0.734,  0.725,  0.706,  0.729,  0.708,
                                   0.718]), 
              'raPosition':array([1.418,  1.411,  1.481,  1.471,  1.496,  1.522,  1.512,  1.527,
                                  1.527,  1.528,  1.542,  1.532,  1.536,  1.538,  1.535,  1.532,
                                  1.54 ,  1.547,  1.546,  1.579,  1.546,  1.563,  1.558,  1.562,
                                  1.563]),
              'timePosition': ['1998-10-30 00:00:00','1998-10-30 00:00:00','2002-07-19 00:00:00',
                               '2004-07-14 00:00:00','2005-07-15 00:00:00','2007-08-02 00:00:00',
                               '2007-10-25 00:00:00','2008-07-11 00:00:00','2008-08-12 00:00:00',
                               '2008-09-18 00:00:00','2008-11-21 00:00:00','2008-11-21 00:00:00',
                               '2009-08-15 00:00:00','2009-09-12 00:00:00','2009-10-05 00:00:00',
                               '2009-10-08 00:00:00','2009-11-01 00:00:00','2010-07-21 00:00:00',
                               '2010-10-30 00:00:00','2011-10-16 00:00:00','2011-11-09 00:00:00',
                               '2012-06-13 00:00:00','2012-10-30 00:00:00','2013-10-21 00:00:00',
                               '2013-10-21 00:00:00']}   
                             
        er = {'decError':array([0.02 ,  0.009,  0.017,  0.005,  0.005,  0.003,  0.005,  0.004,
                                0.002,  0.003,  0.014,  0.02 ,  0.01 ,  0.03 ,  0.02 ,  0.007,
                                0.019,  0.009,  0.005,  0.011,  0.011,  0.005,  0.009,  0.008,
                                0.009]),
              'raError':array([0.022,  0.009,  0.023,  0.005,  0.005,  0.003,  0.005,  0.004,
                              0.002,  0.003,  0.01 ,  0.02 ,  0.01 ,  0.03 ,  0.02 ,  0.007,
                              0.019,  0.006,  0.005,  0.011,  0.011,  0.005,  0.006,  0.008,
                              0.009])}
    
    # HR8799c                          
    elif planet == 'hr8799c':
        ob = {'decPosition':array([0.483,  0.612,  0.63 ,  0.674,  0.681,  0.701,  0.706,  0.706,
                                   0.7  ,  0.671,  0.665,  0.725,  0.697,  0.692,  0.716,  0.72 ,
                                   0.725,  0.737,  0.752,  0.767,  0.765,  0.763,  0.774,  0.794]), 
              'raPosition':array([-0.836, -0.739, -0.713, -0.672, -0.674, -0.658, -0.657, -0.657,
                                  -0.654, -0.631, -0.612, -0.625, -0.634, -0.636, -0.627, -0.63 ,
                                  -0.606, -0.598, -0.561, -0.578, -0.558, -0.557, -0.538, -0.539]),
              'timePosition': ['1998-10-30 00:00:00','2004-07-14 00:00:00','2005-07-15 00:00:00',
                               '2007-08-02 00:00:00','2007-10-25 00:00:00','2008-07-11 00:00:00',
                               '2008-08-12 00:00:00','2008-09-18 20:00:00','2008-11-21 17:00:00',
                               '2008-11-21 17:00:00','2009-01-09 00:00:00','2009-09-12 00:00:00',
                               '2009-09-12 00:00:00','2009-10-05 09:00:00','2009-10-08 00:00:00',
                               '2009-11-01 14:00:00','2010-07-21 00:00:00','2010-10-30 22:00:00',
                               '2011-10-16 08:00:00','2011-11-09 00:00:00','2012-06-13 00:00:00',
                               '2012-10-30 00:00:00','2013-10-21 15:00:00','2013-10-21 15:00:00']}   
                             
        er = {'decError':array([0.016,  0.005,  0.005,  0.005,  0.005,  0.004,  0.002,  0.003,
                                0.02 ,  0.02 ,  0.03 ,  0.02 ,  0.03 ,  0.04 ,  0.007,  0.013,
                                0.006,  0.005,  0.01 ,  0.01 ,  0.004,  0.009,  0.006,  0.006]),
              'raError':array([0.02 ,  0.005,  0.005,  0.005,  0.005,  0.004,  0.002,  0.003,
                               0.02 ,  0.015,  0.03 ,  0.02 ,  0.03 ,  0.04 ,  0.007,  0.013,
                               0.006,  0.005,  0.01 ,  0.01 ,  0.004,  0.006,  0.006,  0.006])}  

    # HR8799d                          
    elif planet == 'hr8799d':
        ob = {'decPosition':array([-0.532, -0.578, -0.589, -0.582, -0.582, -0.582, -0.608, -0.59 ,
                                   -0.6  , -0.586, -0.58 , -0.58 , -0.567, -0.563, -0.549, -0.529,
                                   -0.555, -0.543, -0.533]), 
              'raPosition':array([0.132, -0.087, -0.17 , -0.208, -0.216, -0.216, -0.217, -0.282,
                                  -0.27 , -0.241, -0.24 , -0.269, -0.283, -0.299, -0.32 , -0.323,
                                  -0.343, -0.375, -0.38]),
              'timePosition': ['1998-10-30 00:00:00','2005-07-15 00:00:00','2007-08-02 16:00:00',
                               '2008-07-11 00:00:00','2008-08-12 00:00:00','2008-09-18 00:00:00',
                               '2008-11-21 00:00:00','2009-09-12 00:00:00','2009-10-05 09:00:00',
                               '2009-10-08 00:00:00','2009-11-01 14:00:00','2010-07-21 00:00:00',
                               '2010-10-30 22:00:00','2011-10-16 00:00:00','2011-11-09 00:00:00',
                               '2012-06-13 00:00:00','2012-10-30 00:00:00','2013-10-21 00:00:00',
                               '2013-10-21 00:00:00']}   
                             
        er = {'decError':array([0.028,  0.01 ,  0.008,  0.004,  0.002,  0.003,  0.02 ,  0.03 ,
                                0.07 ,  0.007,  0.014,  0.006,  0.005,  0.01 ,  0.01 ,  0.006,
                                0.006,  0.007,  0.007]),
              'raError':array([0.028,  0.01 ,  0.008,  0.004,  0.002,  0.003,  0.02 ,  0.03 ,
                               0.07 ,  0.007,  0.014,  0.006,  0.005,  0.01 ,  0.01 ,  0.006,
                               0.006,  0.007,  0.007])} 

    # HR8799e                          
    elif planet == 'hr8799e':
        ob = {'decPosition':array([-0.217, -0.209, -0.217, -0.196, -0.173, -0.175, -0.178, -0.162,
                                   -0.119, -0.127, -0.09 , -0.08 , -0.043, -0.028]), 
              'raPosition':array([-0.299, -0.303, -0.306, -0.304, -0.325, -0.324, -0.329, -0.334,
                                  -0.326, -0.382, -0.366, -0.371, -0.391, -0.396]),
              'timePosition': ['2009-07-31 00:00:00','2009-08-01 00:00:00','2009-10-08 00:00:00',
                               '2009-11-01 00:00:00','2010-07-13 00:00:00','2010-07-21 00:00:00',
                               '2010-07-21 00:00:00','2010-10-30 00:00:00','2011-10-16 00:00:00',
                               '2011-11-09 00:00:00','2012-06-13 00:00:00','2012-10-30 00:00:00',
                               '2013-10-21 00:00:00','2013-10-21 00:00:00']}   
                             
        er = {'decError':array([0.019,  0.013,  0.007,  0.01 ,  0.008,  0.011,  0.006,  0.01 ,
                                0.011,  0.011,  0.006,  0.006,  0.012,  0.009]),
              'raError':array([0.019,  0.013,  0.007,  0.01 ,  0.008,  0.011,  0.006,  0.01 ,
                               0.011,  0.011,  0.006,  0.006,  0.012,  0.009])}          
                               
    # beta Pic b                          
    elif planet == 'betapicb':
        ob = {'decPosition':array([0.341, -0.257, -0.26 , -0.3  , -0.331, -0.326, -0.33 , -0.35 ,
                                   -0.367, -0.391, -0.387, -0.402, -0.387, -0.294]),
              'raPosition': [0.233, -0.153, -0.163, -0.173, -0.193, -0.207, -0.209, -0.211,
                               -0.214, -0.229, -0.241, -0.232, -0.234, -0.187],
              'timePosition': ['2003-11-10 00:00:00','2009-10-25 00:00:00','2009-12-29 00:00:00',
                                '2010-04-10 00:00:00','2010-09-28 00:00:00','2010-11-16 00:00:00',
                                '2010-11-17 00:00:00','2011-02-01 00:00:00','2011-03-26 00:00:00',
                                '2011-11-07 00:00:00','2012-01-11 00:00:00','2012-11-26 00:00:00',
                                '2013-02-01 02:00:00','2014-12-08 00:00:00']}   
                             
        er = {'decError':array([0.022,  0.014,  0.008,  0.007,  0.011,  0.01 ,  0.014,  0.01 ,
                                0.014,  0.013,  0.014,  0.014,  0.01 ,  0.003]),
              'raError':array([0.022,  0.014,  0.009,  0.007,  0.011,  0.008,  0.013,  0.009,
                               0.012,  0.014,  0.013,  0.014,  0.01 ,  0.003])}                               

    else:
        return None, None
    
    return ob, er
