danhey/echelle

plot_echelle() doesn't work for me

Closed this issue · 2 comments

Hi Dan,

I've tried to run plot_echelle for a red giant star I know the dnu and numax for, with a frequency and power obtained through lightkurve. It doesn't seem to work for me,a nd I get the following error message. My notebook can be found here: https://github.com/ojhall94/echelle/blob/Testing/testing_with_lightkurve.ipynb

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-11-3751a2edbb00> in <module>
----> 1 plot_echelle(pg.frequency.value, pg.power.value, dnu, numax, 100., 250. )

~/PhD/Hacks_and_Mocks/echelle/echelle/echelle.py in plot_echelle(freq, power, dnu, fmin, fmax, offset, ax, levels, cmap)
     49                  ax=None, levels=500, cmap='gray_r'):
     50 
---> 51     echx, echy, echz = echelle(freq, power, dnu, fmin, fmax, offset=0.0,)
     52 
     53     if ax is None:

~/PhD/Hacks_and_Mocks/echelle/echelle/echelle.py in echelle(freq, power, dnu, fmin, fmax, offset)
     26 
     27     samplinginterval = np.median(trimx[1:-1] - trimx[0:-2]) * 0.1
---> 28     xp = np.arange(fmin,fmax+dnu,samplinginterval)
     29     yp = np.interp(xp, freq, power)
     30 

ValueError: arange: cannot compute length

Hi Ollie, it should be good to go now! Let me know if there are any more issues

Yep it works now! Awesome :D