Code Monkey home page Code Monkey logo

superfreq's Introduction

SuperFreq

Frequency analysis of orbital time series.

Build Status coverage

This is close to that implemented by Monica Valluri in NAFF, which itself is an implementation of the algorithm first used by Jacques Laskar (see this review and citations within).

Documentation

The documentation is available here.

Installation

SuperFreq is easily installed via pip. To install the latest version:

pip install git+https://github.com/adrn/superfreq

For the object-oriented interface to SuperFreq, these are the only requirements. For more automated frequency finding, you’ll also need to install gala.

superfreq's People

Contributors

adrn avatar eteq avatar michael-petersen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

superfreq's Issues

expected 'double' but got 'float'

Hello,

I have an orbit calculated using agama package. I then try to calculate its frequencies using superfreq.find_fundamental_frequencies().
However I get this error message:

Buffer dtype mismatch, expected 'double' but got 'float'

I already tried to convert my vector of positions and velocities to 'double', using
pos = pos.astype("double")

but I still get the same error.

Any clue with what is happening?

Documentation Needs Update

Hey Adrian,

Just want to note that the documentation could use an update. Especially for the "getting started" example you have, it no longer works since "freqs, tbl, ix = sf.find_fundamental_frequencies(fs)" --> "result_obj = sf.find_fundamental_frequencies(fs)
freqs = result_obj.fund_freqs" and so on.

Trouble following tutorial

Hi Adrian! I'm trying to use SuperFreq for some analysis on a few Gala Orbits I have. I followed the "Getting Started" page, but using the older version on the docs.io page

sf= SuperFreq(t)
fs = [(w[:,i] * 1j*w[:,i+ndim//2]) for i in range(ndim//2)]
freqs, tbl, ix = sf.find_fundamental_frequencies(fs)

and the newer version on the repository

result_obj = sf.find_fundamental_frequencies(fs)
freqs = result_obj.fund_freqs

both return the following ValueError tree:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_599/3348153705.py in <module>
----> 1 result_obj = sf.find_fundamental_frequencies(fs)
      2 freqs = result_obj.fund_freqs

/srv/conda/envs/notebook/lib/python3.8/site-packages/superfreq/naff.py in find_fundamental_frequencies(self, fs, min_freq, min_freq_diff, **frecoder_kwargs)
    381 
    382         for i in range(ndim):
--> 383             omega,A,phi = self.frecoder(fs[i][:self.n], **frecoder_kwargs)
    384             freqs.append(omega)  # angular frequencies
    385             As.append(A*np.exp(1j*phi))  # complex amplitudes

/srv/conda/envs/notebook/lib/python3.8/site-packages/superfreq/naff.py in frecoder(self, f, nintvec, break_condition)
    218         for k in range(nintvec):
    219             try:
--> 220                 omega[k] = self.frequency(fk)
    221             except RuntimeError:
    222                 if self.keep_calm:

/srv/conda/envs/notebook/lib/python3.8/site-packages/superfreq/naff.py in frequency(self, f, omega0, return_fft)
    170         Im_f = f.imag.copy()
    171 
--> 172         freq = naff_frequency(omega0, self.tz, self.chi, Re_f, Im_f, self.T)
    173 
    174         if return_fft:

superfreq/_naff.pyx in superfreq._naff.naff_frequency()

ValueError: Buffer dtype mismatch, expected 'double' but got 'float'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.