question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LombScargle not fully working

See original GitHub issue

Description

What steps will reproduce the problem?

  1. LS = LombScargle(t, y, normalization=‘psd’)
  2. frequency, power = LS.autopower()
  3. print (LS.false_alarm_probability(power.max()))

What is the expected output? What do you see instead? One number corresponding to the probability of the peak being significant should be printed. However, this is what I get instead: init() got an unexpected keyword argument ‘normalization’

And if I remove the normalization part from within the brackets, then this is what I get: ‘LombScargle’ object has no attribute ‘false_alarm_probability’

Please provide any additional information below I have astropy 3.0.2 installed and if I go to the core.py (in the lombscargle folder), the def false_alarm_probability IS inside the class LombScargle, as well as the normalization variable. Thus, I am really not sure why it isn’t recognised when I run the code.

Version and main components

  • Spyder Version: 3.2.6
  • Python Version: 3.6.4
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

IPython >=4.0    :  6.2.1 (OK)
cython >=0.21    :  0.27.3 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
numpy >=1.7      :  1.14.0 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.6.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.8.2 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
rope >=0.9.4     :  0.10.7 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
sympy >=0.7.3    :  1.1.1 (OK)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nadiyaikoncommented, Apr 28, 2018

@ccordoba12 I’ve just solved it by transferring some files to another folder. So all is gooood thanks

0reactions
acamargofbcommented, Jul 17, 2018

Hi CAM-Gerlach you were right. I was running an old version of Astropy and to run the new one, I need to install it from python 3.6. I did it and now is working perfectly 😃

Have a nice day, All the best,

Aldo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lomb-Scargle Periodograms — Astropy v5.2
For a detailed practical discussion of the Lomb-Scargle periodogram, with code examples based on astropy , see Understanding the Lomb-Scargle Periodogram 11, ...
Read more >
Understanding the Lomb–Scargle Periodogram - IOPscience
The Lomb–Scargle periodogram is a well-known algorithm for detecting and characterizing periodic signals in unevenly sampled data. This paper presents a ...
Read more >
Use of scipy.signal.lombscargle - Stack Overflow
For class, we are trying to prove a simple example of the Lomb-Scargle Periodogram using the embedded package in ...
Read more >
A Practical Guide to the Lomb-Scargle Periodogram
Figure 24 from Understanding the Lomb-Scargle Periodogram. ... 26 figures and 4 full pages of references, so it's not all that bad).
Read more >
The generalised Lomb-Scargle periodogram
We give an analytic solution for the generalisation to a full sine wave fit, ... First, the Lomb-Scargle periodogram does not take the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found