j-faria / kima

Exoplanet detection in RVs with DNest4 and GPs
http://www.kima.science
MIT License
15 stars 10 forks source link

write a getting started guide #4

Closed j-faria closed 6 years ago

j-faria commented 7 years ago

Write some examples in the wiki on how to start using kima.

j-faria commented 7 years ago

Maybe @jdavidrcamacho can do this?

jdavidrcamacho commented 7 years ago

Sure, it's gonna be useful to me later on :D

jdavidrcamacho commented 7 years ago

Check Gedi's read me file and tell me if something similar to that would be useful in kima

j-faria commented 7 years ago

Exactly, that would be great! Add it to the wiki when you can and then we iterate

jdavidrcamacho commented 6 years ago

In the part of the analysis of results before I continue we need to decide what graphics are shown when we type 1,2,3,... some don't work

j-faria commented 6 years ago

With the latest version, 1 ... 5 should all work Then there is also hist_offset(), plot_random_planets() and corner_planet_parameters()

jdavidrcamacho commented 6 years ago

Ok I'll check it :D

jdavidrcamacho commented 6 years ago

Well number 4 keeps not working for me xD

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/joaocamacho/GitHub/kima/scripts/showresults.py in <module>()
     16 if posterior.shape[0] > 5:
     17     from display import DisplayResults
---> 18     res = DisplayResults(options)
     19 else:
     20     print 'Too few samples, keep running the model'

/home/joaocamacho/GitHub/kima/scripts/display.py in __init__(self, options, data_file, fiber_offset, hyperpriors, posterior_samples_file)
    259             self.make_plot3()
    260         if '4' in options:
--> 261             self.make_plot4()
    262         if '5' in options:
    263             self.make_plot5()

/home/joaocamacho/GitHub/kima/scripts/display.py in make_plot4(self)
    611         available_etas = [v for v in dir(self) if v.startswith('eta')]
    612 
--> 613         fig, axes = plt.subplots(2, len(available_etas)/2.)
    614         for i, eta in enumerate(available_etas):
    615             ax = axes[i]

/home/joaocamacho/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.pyc in subplots(nrows, ncols, sharex, sharey, squeeze, subplot_kw, gridspec_kw, **fig_kw)
   1180     axs = fig.subplots(nrows=nrows, ncols=ncols, sharex=sharex, sharey=sharey,
   1181                        squeeze=squeeze, subplot_kw=subplot_kw,
-> 1182                        gridspec_kw=gridspec_kw)
   1183     return fig, axs
   1184 

/home/joaocamacho/anaconda2/lib/python2.7/site-packages/matplotlib/figure.pyc in subplots(self, nrows, ncols, sharex, sharey, squeeze, subplot_kw, gridspec_kw)
   1170 
   1171         # Create array to hold all axes.
-> 1172         axarr = np.empty((nrows, ncols), dtype=object)
   1173         for row in range(nrows):
   1174             for col in range(ncols):

TypeError: 'float' object cannot be interpreted as an index

I wonder if the problem might be mine, maybe there something I don't have installed.

j-faria commented 6 years ago

Should be fixed

jdavidrcamacho commented 6 years ago

Yes it is :+1:

j-faria commented 6 years ago

I think we can close this